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

23rd
Sep 2015
Tim Howard
@tghoward
Sep 23 2015 00:28
Doh! My clock on the RPi was off. I had already built a script to fix it (and have just noticed yours too, @scottleibrand ), but neglected to run it, I guess.
Dana Lewis
@danamlewis
Sep 23 2015 00:29
Heh. Always the clock it seems
Tim Howard
@tghoward
Sep 23 2015 00:30
But that makes it interesting -- it looks like one of the if statements (rarely used?) in determine-basal doesn't assign duration and rate and openaps doesn't like that anymore?
@danamlewis yes, right! and then there are the time zones that really mess me up
Not sure, just guessing. Most likely it is me.
Ali Mazaheri
@amazaheri
Sep 23 2015 00:33
u see that when there is no temp to cancel or if no action is needed
so the result of ur requestedtemp.json doesnt have rate and duration
we need to add a catch to openaps toolkit to cover that, already asked @bewest about it :)
Tim Howard
@tghoward
Sep 23 2015 00:35
right, but now, when passing a requestedtemp.json to "openaps use pump set_temp_basal" it bails?
Ben West
@bewest
Sep 23 2015 00:35
yeah, we need to dividing this up into more phases
and think about pre-flight/post-flight
should have sanity reports that tell the system to halt/continue
Ali Mazaheri
@amazaheri
Sep 23 2015 00:35
yeah! the one and only pump whisperer is here
Ben West
@bewest
Sep 23 2015 00:35
yeah, I'm reviewing loops now
Ali Mazaheri
@amazaheri
Sep 23 2015 00:36
:+1:
Ben West
@bewest
Sep 23 2015 00:36
I really want an openaps-loop tool, but not quite ready
Ali Mazaheri
@amazaheri
Sep 23 2015 00:36
goingthrough Windows setup as we discussed :)
yes I want that too hehe
Tim Howard
@tghoward
Sep 23 2015 00:39
@bewest is my glitch a new thing ("openaps use pump set_temp_basal" doesn't like it when rate and duration aren't passed)? Or (more likely) nothing has changed and I'm just messing up?
Ben West
@bewest
Sep 23 2015 00:39
yeah, it probably hates that
Ali Mazaheri
@amazaheri
Sep 23 2015 00:40
not new
Tim Howard
@tghoward
Sep 23 2015 00:40
Ok, thanks muchly to both of you.
Ali Mazaheri
@amazaheri
Sep 23 2015 00:43
:+1:
Capture.PNG @bewest this is for you :)
Ben West
@bewest
Sep 23 2015 00:48
hehe, nice
did you catch export EDITOR=nano for using nano with crontab?
Ali Mazaheri
@amazaheri
Sep 23 2015 00:48
yeah :) multi tasking
[TAB]
Ben West
@bewest
Sep 23 2015 00:48
tab tab tab
Ali Mazaheri
@amazaheri
Sep 23 2015 00:48
rebuilding everything
Ben West
@bewest
Sep 23 2015 00:49
quadruple enter ;-)
Ali Mazaheri
@amazaheri
Sep 23 2015 00:49
yeah like that picture of urs lol
Ben West
@bewest
Sep 23 2015 00:51
yeah, lot of good pictures
Ali Mazaheri
@amazaheri
Sep 23 2015 00:52
remind me whichcommand to install openaps so i dont install decvoding-carelink manually
Ben West
@bewest
Sep 23 2015 00:53
easy_install -Z openaps
Ali Mazaheri
@amazaheri
Sep 23 2015 00:55
:clap:
Scott Leibrand
@scottleibrand
Sep 23 2015 00:55
Or just always use -ZU so it will upgrade if you already have it.
Ben West
@bewest
Sep 23 2015 00:55
yup
Ali Mazaheri
@amazaheri
Sep 23 2015 00:55
u guys with your commands
I want setup.exe with a GUI
:)
Ben West
@bewest
Sep 23 2015 00:55
lol
Ali Mazaheri
@amazaheri
Sep 23 2015 00:55
ClickOnce
Ben West
@bewest
Sep 23 2015 00:56
eventually
one step at a time
walk before we run
best GUIs just format cli stuff under hood
Ali Mazaheri
@amazaheri
Sep 23 2015 00:56
OMG FML! now my domain joined OS wont let me install driver for CareLink
time to join a workgroup lol
Scott Leibrand
@scottleibrand
Sep 23 2015 00:59
Hahaha. Classic Windows.
Ali Mazaheri
@amazaheri
Sep 23 2015 01:48
:)
diabeticgonewild
@diabeticgonewild
Sep 23 2015 02:12
An endocrine doc in general would be pretty excited to see someone like me, well controlled or not, cause I have 2 forms of autoimmune neuropathy. The autoimmune autonomic ganglionopathy/neuropathy is pretty stunning as it is virtually indistinguishable from t1d autonomic neuropathy except it affects my eyes which is hard to pick up on and makes it hard to diagnose. The crazy part is they think the autonomic neuropathy caused my t1d.
But I see an endocrine nurse practitioner who was assigned to me at the hospital when I was hospitalized the first time as an adult for autonomic neuropathy problem. She even diagnosed the very rare autoimmune disease and became convinced it was not diabetes related. But I have always viewed t1d as "here's your insulin, test strips, and diabetes paraphernalia" and "have fun". At least with t1d you can call shots with it. The rare stuff I don't get to call any shots whatsoever.
I'm a once in a career type of an encounter for an endo, at best, if not a lot less. The autoimmune autonomic ganglionopathy is considered very rare, and I was ultimately tested for a disease I should have never had—but I did.
diabeticgonewild
@diabeticgonewild
Sep 23 2015 02:18
But back to doing laundry. Not going to be able to work on OpenAPS much tonight but maybe tomorrow will be a better day.
diabeticgonewild
@diabeticgonewild
Sep 23 2015 02:45
But here's what I got for the install script so far.... https://gist.github.com/anonymous/6bbc69a958023d968f00
The heart of making the install script work really well, OpenAPS will come down to learning this really well (I think)... http://www.grymoire.com/Unix/Sed.html
It's called sed
It's editing files basically, at the command line/terminal
Chris Oattes
@cjo20
Sep 23 2015 02:48
if you're just doing a series of calls like that, why not just write a bash script?
diabeticgonewild
@diabeticgonewild
Sep 23 2015 02:48
It's nicer in Python. It can go either way.
Chris Oattes
@cjo20
Sep 23 2015 02:49
right now you've basically got a bash script with each line wrapped in "os.system"
diabeticgonewild
@diabeticgonewild
Sep 23 2015 02:49
I know
There's nothing wrong with that....at least not yet
sed and awk are apparently where it's at in Unix/Linux for configuring a lot of this.
Chris Oattes
@cjo20
Sep 23 2015 02:53
what exactly do you want to configure?
diabeticgonewild
@diabeticgonewild
Sep 23 2015 02:53
All of it, as much as I can, from the install instructions to the OpenAPS configuration to closed loop operation
It's all possible, at the terminal/command line
Dana Lewis
@danamlewis
Sep 23 2015 02:54
Define what you mean by close loop operation?
diabeticgonewild
@diabeticgonewild
Sep 23 2015 02:55
So like configure it in a basic way (besides adding serial numbers before executing the script) so that openaps-js can be used right from the bat
Chris Oattes
@cjo20
Sep 23 2015 02:56
sed and awk are very powerful tools, but I don't think a lot of "installers" use them. Doing much more than copying files in to the right place is giving people a "click here for a pancreas!", which isn't necessarily a good idea
Dana Lewis
@danamlewis
Sep 23 2015 02:56
Right
diabeticgonewild
@diabeticgonewild
Sep 23 2015 02:56
Of course there are things like pebble.js that are optional, but still. I think 2 weeks of working on it nonstop would work.
Most people are terrified of the command line.
Chris Oattes
@cjo20
Sep 23 2015 02:56
that's not a bad thing
Dana Lewis
@danamlewis
Sep 23 2015 02:56
Anyone learning to do this is going to have to learn a lot of things
diabeticgonewild
@diabeticgonewild
Sep 23 2015 02:57
True
Dana Lewis
@danamlewis
Sep 23 2015 02:57
I am asking people to read this: http://bit.ly/1gIBobb
Chris Oattes
@cjo20
Sep 23 2015 02:57
if they're terrified of the command line and they want to do it, they'll ask for help, so they'll get the advice they need / warnings / etc.
diabeticgonewild
@diabeticgonewild
Sep 23 2015 02:57
That's why I don't see what's wrong with it, given it's all explained and documented properly
I read that.
Dana Lewis
@danamlewis
Sep 23 2015 02:57
k thanks
Chris Oattes
@cjo20
Sep 23 2015 02:58
If someone is afraid of the command line, they'll look and say "well, I could read all that, but I'll just click this shiny 'closed loop now' button someone just gave me"
diabeticgonewild
@diabeticgonewild
Sep 23 2015 02:58
You still have to edit the script to make it work. Nobody can put in serials unless you do "scanf" in the code
Dana Lewis
@danamlewis
Sep 23 2015 02:59
While we want to ease use, we still need to think through where we document, and what is critical to do in terms of gaining confidence in learning things, to be able to deal with understanding what breaks, when, etc.
building from the ground up helps that learning process, vs. being able to blindly figure out what went wrong with "that script I installed".
@audiefile has been giving some good input on what people are doing behaviorally over various nightscout tools that have gotten easier and easier to install
Chris Oattes
@cjo20
Sep 23 2015 03:02
@diabeticgonewild my understanding is that automating things so that people only have to do something like enter their own serial numbers has been deliberately avoided to protect both the project and the users
diabeticgonewild
@diabeticgonewild
Sep 23 2015 03:03
which I am not going to do. I was just pointing out that it was theoretically possible with install scripts.
Dana Lewis
@danamlewis
Sep 23 2015 03:03
yep. theoretically possible. not a direction we want to go, though. good discussion so we're all on the same page :) thanks for clarifying your intentions.
Chris Oattes
@cjo20
Sep 23 2015 03:05
Ah, you see, I was confused by me asking what you were trying to configure, and your response being all of it, up to and including closed loop operation, just excluding the serial numbers :)
diabeticgonewild
@diabeticgonewild
Sep 23 2015 03:05
K. Thanks and you're welcome. :D
Chris Oattes
@cjo20
Sep 23 2015 03:07
so, what exactly do you want to configure?
Rachel Sandlain
@audiefile
Sep 23 2015 03:09
Even people who live with (them or their child) diabetes can display a fundamental lack of understanding of basic concepts. A closed loop in their hands could kill.
diabeticgonewild
@diabeticgonewild
Sep 23 2015 03:10
At least the Raspberry Pi configuration, if not more. It's kind of a play it by ear thing for me. I haven't been feeling that great lately and this dude who I am friends with made me call a suicide hotline last night or he said he was going to call the police on me for a welfare check. The problem is he's a lawyer and he went to Harvard Law so he can bend the law almost any way he wants...
Rachel Sandlain
@audiefile
Sep 23 2015 03:10
People have asked how to cancel iob. not insulin delivery. The insulin is in the body but its to much and they want to remove it.
diabeticgonewild
@diabeticgonewild
Sep 23 2015 03:10
crazy
Chris Oattes
@cjo20
Sep 23 2015 03:11
@audiefile leeches :P
Dana Lewis
@danamlewis
Sep 23 2015 03:11
@diabeticgonewild no, that is not crazy what he did.
diabeticgonewild
@diabeticgonewild
Sep 23 2015 03:11
No, the cancelling IOB
Dana Lewis
@danamlewis
Sep 23 2015 03:11
k
@cjo20 where are you on your stuff these days?
Chris Oattes
@cjo20
Sep 23 2015 03:15
I spent last night / today playing with Nightscout, becuase I hadn't actually had it set up before. I don't have a way of getting CGM data from the pump to NS at the moment, so I was just manually entering it (hence the script I wrote). It looks promising getting carelink stuff through windows, the error messages I gave bewest seemed to help him get comlink2-uart working
Dana Lewis
@danamlewis
Sep 23 2015 03:16
cool. and we are having a side convo right now about how to better integrate OpenAPS with Nightscout, so more to come on that soon for better display
Rachel Sandlain
@audiefile
Sep 23 2015 03:16
YAY! That makes me very happy :)
@cjo20 what type of cgm do you have?
Chris Oattes
@cjo20
Sep 23 2015 03:18
BG has been up and down, so not had a suitable time to do any more testing of carb absorbtion rates, and I'm still thinking about that delayMinutes algorithm, because something about it bugs me. And I still need to get round to actually looking at the OpenAPS code itself, plus working on my standalone BG estimator just so I can play with different algorithms with that
@audiefile Medtronic (Enlite) with a 554 pump
Dana Lewis
@danamlewis
Sep 23 2015 03:19
All in your free time, right? :D #knowthefeeling
Chris Oattes
@cjo20
Sep 23 2015 03:19
yeah, fitting it around gaming (I still can't quit WoW -_-)
and work, and my better half :P
Rachel Sandlain
@audiefile
Sep 23 2015 03:19
Ah the one NS setup I know basically nothing about ;)
Chris Oattes
@cjo20
Sep 23 2015 03:21
I've got an order for a raspberry pi waiting to submit, becuse that seems like it'd be easier than windows. But then again, either of those would be easier than using this: https://github.com/cjo20/ns-api-uploader
Rachel Sandlain
@audiefile
Sep 23 2015 03:22
Hey if it works for you, it works
Chris Oattes
@cjo20
Sep 23 2015 03:23
yeah, there's only so long I can manually type each BG from my pump in to a python script for :P
Rachel Sandlain
@audiefile
Sep 23 2015 03:24
Try the openaps cgm stuff. That might be easiest considering you are planning to go that route anyway. (Keep in mind all I know about the medtronic uploader for nightscout is that it requires an android phone)
Chris Oattes
@cjo20
Sep 23 2015 03:26
I'll dig around in that during lunch tomorrow probably
Chris Oattes
@cjo20
Sep 23 2015 03:31
@audiefile where exactly si the openaps cgm stuff?
diabeticgonewild
@diabeticgonewild
Sep 23 2015 03:32
Somebody has an iPhone and is using Medtronic CGM
Rachel Sandlain
@audiefile
Sep 23 2015 03:34
@cjo20 the glucose commands in openaps. With medtronic cgm I think you read straight from the pump
so openaps use item_glucose or something
@diabeticgonewild you can view any nightscout setup from anything with a browser but some setups require specific types of uploader phones
the medtronic app was written for android only
I should say the medtronic uploader app
Ben West
@bewest
Sep 23 2015 03:36
openaps use pump iter_glucose
diabeticgonewild
@diabeticgonewild
Sep 23 2015 03:39
you could use iPhone whenever the rileylink protocol is figured out ( I am not on that board)
Ben West
@bewest
Sep 23 2015 03:39
almost, not quite
rileylink protocol is medtronic RF protocol, and we have it
the main app for rileylink runs on iphone and emulates sentry
could use that as-is probably
diabeticgonewild
@diabeticgonewild
Sep 23 2015 03:42
I have been out of the loop recently
What's the app?
Ben West
@bewest
Sep 23 2015 03:44
rileylink
diabeticgonewild
@diabeticgonewild
Sep 23 2015 03:45
Or where is it (given its in development)
diabeticgonewild
@diabeticgonewild
Sep 23 2015 03:47
Well I guess I need to join that Gitter chat...
Been out of the loop. I hate being sick, having no job, not being in school, and only really being able to focus on my health, at best....maybe
diabeticgonewild
@diabeticgonewild
Sep 23 2015 03:53
Can't stand being sick...
Chris Oattes
@cjo20
Sep 23 2015 03:54
pi ordered. I should porbably get some sleep, it being 0454...
Dana Lewis
@danamlewis
Sep 23 2015 03:54
ouch @cjo20 !
diabeticgonewild
@diabeticgonewild
Sep 23 2015 03:54
Yeah sounds like a good idea. Search for "lasergoodies" on Amazon. Has a super low profile case.
Ben West
@bewest
Sep 23 2015 03:54
oy
diabeticgonewild
@diabeticgonewild
Sep 23 2015 04:00
This is the charger I would recommend except it doesn't have "pass through" charging (can charge while also powering the Pi from a battery pack) : http://www.amazon.com/Quick-Charge-Anker-PowerCore-10050/dp/B013HSQXZC/ref=cm_cr_pr_product_top?ie=UTF8
It's the size of a 722 roughly so it's not terrible.
diabeticgonewild
@diabeticgonewild
Sep 23 2015 04:09
As for the case for the reviews--it works. People just don't know how to put together things.
Ed Raskin
@msrcgm
Sep 23 2015 05:08
Hi Gang. Can any explain why openaps use pump read_history_data seeks a "page" number (and what that means), but openaps use pump inter_pump_hours 4 tells me what I need for last bolus
Ben West
@bewest
Sep 23 2015 05:09
yeah, good question
on the pump, data is organized into pages
0 is newest
0 - 32 or so
so "iter" is short for "iterate"
Ed Raskin
@msrcgm
Sep 23 2015 05:10
So, in theory, if I'm running a loop and I need the query bolus IOB, can I just run iter_pump_hours 4 to get data for the calculate IOB command?
Ben West
@bewest
Sep 23 2015 05:10
so idea is we'll iterate as many pages as needed to fill that many hours from now
yup, probably whatever your DIA is is a good value
Ed Raskin
@msrcgm
Sep 23 2015 05:11
Sorry, DIA?
Ben West
@bewest
Sep 23 2015 05:11
duration of insulin action/insulin action delay
length of insulin
default is 4 in medtronic pumps, 512 it was hardcoded, now it's on schedule
Ed Raskin
@msrcgm
Sep 23 2015 05:12
Got it. I'm doing some work making sure I have all of @amazaheri's workflow taken from his powerpoint into my loop.
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:12
I don't see why you'd want iob from the pump
Ben West
@bewest
Sep 23 2015 05:13
this is to calculate iob anew
this is getting all the records to figure out what the iob should e
Scott Leibrand
@scottleibrand
Sep 23 2015 05:14
we're collecting full pump history with a report that runs openaps use pump iter_pump_hours X, then running iob.js and providing it the resulting pumphistory.json to calculate IOB
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:14
and assuming the pump knows everything
Scott Leibrand
@scottleibrand
Sep 23 2015 05:14
yes
Ben West
@bewest
Sep 23 2015 05:14
medtronic grows on you jason
Scott Leibrand
@scottleibrand
Sep 23 2015 05:15
@amazaheri may have a few tricks for transitioning between pumps
Ben West
@bewest
Sep 23 2015 05:15
andrew will love it, he'll notice it's faster to use, maybe that's what you don't like
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:15
pump won't know everything when switching pumps
Ed Raskin
@msrcgm
Sep 23 2015 05:15
If I didn't want to use inter_pump_hours 4, I would use read_pump_history page 0-32 (how would that command look, I keep getting errors)
Scott Leibrand
@scottleibrand
Sep 23 2015 05:15
no, you'll never read pages yourself
Ben West
@bewest
Sep 23 2015 05:15
ah, you'd have to do each one separate
Scott Leibrand
@scottleibrand
Sep 23 2015 05:15
it's iter_pump_hours, not inter
Ben West
@bewest
Sep 23 2015 05:16
short for iterate
Scott Leibrand
@scottleibrand
Sep 23 2015 05:16
the alternative is iter_pump X, where X is the number of records to pull
Ben West
@bewest
Sep 23 2015 05:16
the original version is to get each page
then I realized that wasn't very useful for us
Ed Raskin
@msrcgm
Sep 23 2015 05:16
Got it, so I'm looking at an "old" workflow chart
Ben West
@bewest
Sep 23 2015 05:16
so I added iter_foobar iterate ... as a helper to get the interesting selection
things move fast, people run into problems, then we make more tools to solve them
Scott Leibrand
@scottleibrand
Sep 23 2015 05:17
@jasoncalabrese you'll need to test it, but you'll probably find that openaps has enough safeguards that it's ok to be missing some old pump history when you first switch in the evening
you might need to wait a bit if you just bolused and he's still rising, but once he starts coming down from the meal it's probably fine to switch. at that point IOB won't be that far off, and if BG is falling it won't want to high-temp him
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:20
think I'd want it to consider the other boluses, but I'll worry about that after I get the basics working
Scott Leibrand
@scottleibrand
Sep 23 2015 05:20
or better yet you could hook up the medtronic pump for dinner boluses and start the loop with full knowledge of the source of most of his IOB
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:20
yeah that could work too
Scott Leibrand
@scottleibrand
Sep 23 2015 05:21
or of course wait 2-3h after dinner to hook it up
(especially when you eat out)
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:21
think I want to have some user interaction from NS
into the loop
Scott Leibrand
@scottleibrand
Sep 23 2015 05:22
we specifically designed it to avoid that
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:22
ask the pump questions
on demand
Scott Leibrand
@scottleibrand
Sep 23 2015 05:22
we never want data from the internet to influence how much insulin is delivered
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:22
adjust sensitivity
Scott Leibrand
@scottleibrand
Sep 23 2015 05:22
it's both a safety and security thing
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:22
profile
maybe mqtt
Ed Raskin
@msrcgm
Sep 23 2015 05:22
Gang, as overall info to the group regarding instructions, etc. -- I think we are really missing a lot once the Pi is set up and tools are installed. I was talking to @bewest and @amazaheri (after a bit too little sleep) and it seems like the instructions move from lego assembly instructions to a more theoretical discussion (maybe that is intentional). I can follow lego instructions and build a complicated model, but it is different to say: "here are how lego pieces generally fit together, play around and see if you can get the beginnings of a loop going." Assuming that is not the intention of this group, I think some additional work on instructions is really in order.
Scott Leibrand
@scottleibrand
Sep 23 2015 05:23
only exception is data downloaded direct from dexcom's API, and only if a CGM is not plugged in and you have set up the share2nightscout bridge stuff on the Pi
@msrcgm yes, we know that, and had a big discussion about how we want that part to work. I don't think we're really at the point yet where we can provide lego instructions all the way through...
but we also don't want to just tell people to "go play around and see if you can build something safe"
Ben West
@bewest
Sep 23 2015 05:24
@scottleibrand I think jason is suggesting something a little different
this is more sending information out of openaps into NS on demand
Ed Raskin
@msrcgm
Sep 23 2015 05:25
But seems like we sit exactly at that point? -- There are no instructions telling people what to do, but there are just enough instructions to show people that there are a bunch of options to play with
Ben West
@bewest
Sep 23 2015 05:25
rather than long poll
Scott Leibrand
@scottleibrand
Sep 23 2015 05:25
@msrcgm so we're trying to get people to stick with the safer stuff for now, including monitoring and prediction.
Ben West
@bewest
Sep 23 2015 05:25
right, that's all we've got
dunno how to make that more clear
Scott Leibrand
@scottleibrand
Sep 23 2015 05:25
yeah, we are trying to figure out a way to make the directions more clearly stop and say "go talk to people in channel about what's safe to do next"
Ben West
@bewest
Sep 23 2015 05:26
the tools are changing every day
so right now best bet is to get comfortable as possible with them
either you will bend them to your will
or they will adapt themselves to your use
it's just not clear which will happen first
Ed Raskin
@msrcgm
Sep 23 2015 05:27
Yes, I get that tools are changing every day, but I think that in theory and in practice you can string together reports and processes to spit out a prediction that people have confidence in some percentage of the time. I don't think the instructions in their current state explain how to get to that place of prediction
Scott Leibrand
@scottleibrand
Sep 23 2015 05:28
partly because that can be dangerous if you don't know how it all works from the ground up
Ben West
@bewest
Sep 23 2015 05:28
yeah, the docs are headed towards that
it's pretty easy to add to the docs, too
Scott Leibrand
@scottleibrand
Sep 23 2015 05:29
we don't want someone with partial understanding setting up a "dumb" loop that blindly does something, sorcerer's apprentice style, over and over repeatedly long after it should have stopped
Ed Raskin
@msrcgm
Sep 23 2015 05:29
I guess what I am saying is that I'm happy to help add that into the docs, but someone has to make sure I have the workflow right. Or someone just needs to share their workflow
Ben West
@bewest
Sep 23 2015 05:30
you're on the right track
if you look back, audi and everyone else were all asking same questions
Ed Raskin
@msrcgm
Sep 23 2015 05:31
@scottleibrand but I think it can be equally dangerous to give people just enough information to spit out a prediction -- think it is correct, but not realize that the system is not calculating IOB correctly. If I didn't fundamentally have a good understanding of diabetes (not coding), I would never know that problem even existed in the first place and I would be spitting out predictions that were wrong and not know it.
yes, that is exactly the problem we're trying to avoid
Ed Raskin
@msrcgm
Sep 23 2015 05:32
Its easy for me to see that problem, I'm not sure about others. But to meet, my IOB problem was easy to spot (and at the end of the day, easy to fix). I'm worried about the stuff that I don't see ....
Scott Leibrand
@scottleibrand
Sep 23 2015 05:32
one thing we're doing to help with that is trying to make all the tools refuse to proceed if their input data is old
but we also should be heavily discouraging people from creating their own fully closed loop that doesn't have all the necessary failsafes and safety checks
I agree the docs don't do that enough right now: that's also on our list to fix
Dana Lewis
@danamlewis
Sep 23 2015 05:34
Also @msrcgm That's exactly the point to test and validate every output at every step of the way
You should be validating and not trusting predictions
Ed Raskin
@msrcgm
Sep 23 2015 05:35
I guess to the extent my input is valued here, I come down on the side of not hiding the ball if the intent is to release. Its better to share more information than less in my view. I recognize others may disagree and I can give you my lengthy list of reasons and I don't mean my comment to suggest that my view is the only correct one -- I just wanted to be transparent in my thought process
Dana Lewis
@danamlewis
Sep 23 2015 05:35
Thank you for that!
Scott Leibrand
@scottleibrand
Sep 23 2015 05:36
yeah, we are not planning to hide anything: all of the code we use is publicly available. we're just trying to discourage people from putting it together into a full working system without a really thorough understanding of how it all works together
Dana Lewis
@danamlewis
Sep 23 2015 05:37
(And also help people learn to validate code they pick up on the Internet to play with. There are no claims made with any of these tools or pieces.)
Ed Raskin
@msrcgm
Sep 23 2015 05:37
@danamlewis I couldn't agree more and validating and not trusting predictions is exactly how I determined that my calculate IOB command was not working properly. I just don't think that I was aided by figuring out that problem on my own --- and again, I think others might think ... no way, you are better because you found the hole yourself ... and I can give lots of reasons why I would disagree with that statement :)
Scott Leibrand
@scottleibrand
Sep 23 2015 05:38
I would like to understand that point of view
everything we've done to date is predicated on the assumption that the person running any of this software is best off if they've put it together themselves and understand how it works, and as importantly, how it sometimes doesn't work
@jasoncalabrese what kind of user interaction from NS were you thinking would be safe?
@jasoncalabrese I love the idea of one-way upload-only NS integration, but I wouldn't want data from an unsecured website influencing actual insulin dosing in any way.
Ed Raskin
@msrcgm
Sep 23 2015 05:45
That might take a more detailed discussion than can be had over gitter, but it starts with the concept that I'm more interested in testing the "result" of the loop suggestion (not by actually dosing the insulin, but seeing the result). The reality is that I am not likely going to be changing the underlying code to openaps commands like determine-basal-suggestion (which I view as kind of the fundamental structure of a lego piece, e.g., I'm not going to change the lego connections from circles to triangles). If the thing doesn't work for me using the existing pieces, I'm not going to use it, period -- and the only way I can determine that is to put the pieces together and check the output. Does that make sense? My analysis is more focused on my knowledge of diabetes management and my experience manually dosing insulin, and less on my analysis of how the code is breaking down my decision making process in to various steps (that must sound horrible to someone that fundamentally believes that computer code is exactly that! -- it must sound like saying I'm interested in studying earthquake prediction, but I don't care about the soil ...)
Scott Leibrand
@scottleibrand
Sep 23 2015 05:46
no, actually that's exactly what I would expect you to be doing. glad we're on the same page about that part...
the challenge is that, with a system like this, you also have to get some proficiency with monitoring when/whether the system is working, not just whether its outputs (when it does work) are what you'd expect
being on the lookout for "huh, X hasn't updated in Y time, and it really should have by now" kinds of things
so while you definitely should be focused on the final outputs, we're at the stage where there are lots of intermediate outputs that are used as inputs by later stages, and you have to understand those as well
you don't have to fully understand the internals of determine-basal.js, or any of the other code. the most advanced I would expect most users to get is to look at the unit test cases, and use their knowledge of "given these inputs, I would expect it to do this" to make sure that we're doing all the right things in all the possible corner cases.
Ed Raskin
@msrcgm
Sep 23 2015 05:50
@scottleibrand I totally understand that too -- and I agree with the goal, but I don't really learn those lessons efficiently by trial and error/experimentation. I think I would understand all of the outputs, vulnerabilities if I had a more clear roadmap for how they fit together (fit hat makes sense).
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:50
I plan to have an integrated and secure system
and at some point to bolus from my phone
but I'll do it steps and make sure it's safe
Scott Leibrand
@scottleibrand
Sep 23 2015 05:52
@msrcgm yeah. I think we will get to the point you expected us to be, where you can just focus on the final outputs, but we're just not there yet. no one has written anything clearer than we've shown you. the other thing about projects like this is we're relying on everyone to bring their skills, identify gaps (like you're doing), and help close them.
Dana Lewis
@danamlewis
Sep 23 2015 05:52
@jasoncalabrese just know that bolusing is not recommended by the openaps design principles.
Scott Leibrand
@scottleibrand
Sep 23 2015 05:53
@msrcgm often you get the best opportunities to learn when you take the opportunity to help document things and teach them to others. it might not be a bad idea for you to start on writing the roadmap you wish we had written for you...
@msrcgm you'll of course not be able to do it all yourself on the first pass, but you'll quickly identify the gaps you haven't figured out yet, and be better able to ask questions to fill them rather than having to figure it out by trial and error
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:55
yeah, I wouldn't automate a bolus, would never bolus from a loop
would be a manual action
Dana Lewis
@danamlewis
Sep 23 2015 05:55
@jasoncalabrese :)
Scott Leibrand
@scottleibrand
Sep 23 2015 05:55
@jasoncalabrese safely controlling the pump from a phone locally seems like an achievable goal. it might even be possible to design a system that lets you set up some sort of secure remote control abilities. but doing that from Nightscout?
Ed Raskin
@msrcgm
Sep 23 2015 05:55
@scottleibrand got it and happy to do that -- I think I just need more of an escort down the road, so that I can document while someone holds the steering wheel for a second, or says -- go right or left, because you are about to crash. So, right now I am basically running through @amazaheri's workflow (but it already there are changes to that). I'm going to try to finish running through that right now and see if I can fix my few problem -- and document along the way, then translate that PPT + the guidance I received verbally into a document that basically doesn't exist yet.
diabeticgonewild
@diabeticgonewild
Sep 23 2015 05:55
@jasoncalabrese look up reverseSSH on Raspberry Pi
Scott Leibrand
@scottleibrand
Sep 23 2015 05:56
yeah, that's one way. I do something similar with ours.
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:58
what about updating the profile
Scott Leibrand
@scottleibrand
Sep 23 2015 05:58
@msrcgm that sounds like a pretty good plan. I've found (at work, mostly) that getting someone who doesn't have the tribal knowledge (first-hand or verbally communicated) to document things often results in much better documentation than having someone do it who has too much tacit knowledge...
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:58
when do you pull from mongo?
Scott Leibrand
@scottleibrand
Sep 23 2015 05:58
@jasoncalabrese updating which profile? we have a few now. :)
Jason Calabrese
@jasoncalabrese
Sep 23 2015 05:59
can update the profile from the NS treatment editor
diabeticgonewild
@diabeticgonewild
Sep 23 2015 05:59
@jasoncalabrese securing SSH http://imgur.com/a/WkU9a
Jason Calabrese
@jasoncalabrese
Sep 23 2015 06:00
would want that to get picked up
Scott Leibrand
@scottleibrand
Sep 23 2015 06:00
@msrcgm the other thing you'll find is that you might actually get ahead of us on a few things and have to wait for us to catch up...
Jason Calabrese
@jasoncalabrese
Sep 23 2015 06:00
yeah, I know about ssh
Scott Leibrand
@scottleibrand
Sep 23 2015 06:00
@jasoncalabrese currently we pull profile info directly from the pump, and that seems more secure than taking web inputs to me
diabeticgonewild
@diabeticgonewild
Sep 23 2015 06:00
@jasoncalabrese reverse SSH http://imgur.com/a/Hz4RO
Scott Leibrand
@scottleibrand
Sep 23 2015 06:01
I know there are pumps you can't do that from (512/712)...
Jason Calabrese
@jasoncalabrese
Sep 23 2015 06:03
I can see that, will need tools to show where things don't match up
Scott Leibrand
@scottleibrand
Sep 23 2015 06:03
I'm imagining a situation where someone updates the profile incorrectly on Nightscout, and sets BG targets or sensitivity way off. openaps picking that up could be bad....
yeah, auditing and comparison tools would be awesome
Ed Raskin
@msrcgm
Sep 23 2015 06:26
so, my notes are too cryptic. Can someone help tell me why I can't add the following report -- what is wrong with my syntax? openaps-report add last_two_pump_hours.json JSON iter_pump_hours 2
code: openaps report add last_four_pump_hours.json JSON iter_pump_hours 4
'openaps report add last_two_pump_hours.json JSON iter_pump_hours 2'
Scott Leibrand
@scottleibrand
Sep 23 2015 06:27
what error do you get?
Ed Raskin
@msrcgm
Sep 23 2015 06:28
usage: openaps-report add [-h] report {base,text,stdout,JSON} device ...
openaps-report add: error: argument device: invalid choice: 'iter_pump_hours' (choose from u'calculate-iob', u'cgm', u'determine-basal', u'get-profile', u'pump')
Scott Leibrand
@scottleibrand
Sep 23 2015 06:29
so it's saying that at the point you have iter_pump_hours, you need to instead have a device name
and even helpfully suggests what the options are
Ed Raskin
@msrcgm
Sep 23 2015 06:29
ah, missing 'code' pump
Scott Leibrand
@scottleibrand
Sep 23 2015 06:29
yep
those usage errors are usually quite useful, and if they're not sufficient you can usually figure it out with -h
Ed Raskin
@msrcgm
Sep 23 2015 06:30
right, I kept playing with it, but I was adding "pump" after the word "report" I was putting it in the wrong place
Scott Leibrand
@scottleibrand
Sep 23 2015 06:30
yeah, have to know how to read the error carefully to see exactly what it's complaining about
computers are usually quite specific about that, if sometimes a bit cryptic to decode at first. :)
Ed Raskin
@msrcgm
Sep 23 2015 06:41
one more command refresh -- how to I see what reports/actions are within a particular alias?
cat doesn't do it ...
Scott Leibrand
@scottleibrand
Sep 23 2015 06:43
Something like openaps alias I think. Maybe show? Use -h on that.
Bed time for me. Good luck. :-)
Ed Raskin
@msrcgm
Sep 23 2015 06:44
no luck, I'll play g'night. Thanks for indulging my thoughts
Ben West
@bewest
Sep 23 2015 06:51
openaps alias show I think lists them
basically, the building blocks openaps knows about are vendors which know how do to things, devices which have uses, reports which save the config, helps to automate uses, and aliass which can group reports
from there for better or worse, cron and loop are out of scope for now, exercise left to readers
Ben West
@bewest
Sep 23 2015 06:57
idea was people learn how to use devices/vendors to do things they like and can easily automate the process
the automation is tricky to get right still, we're all learning and fixing every day
Ed Raskin
@msrcgm
Sep 23 2015 06:58
Sorry, I asked my question incorrectly. How to I look inside a process (like calculate-iob)
Ben West
@bewest
Sep 23 2015 06:58
you can run those in two ways to debug
one way is inside openaps to get test configuration/automation
another is directly as script you can type caulculate-iob to run it directly
sp
Ed Raskin
@msrcgm
Sep 23 2015 06:59
Sorry, I mean, aren't there predetermined components of calculate-iob?
that are mandatory?
Ben West
@bewest
Sep 23 2015 07:00
right, calculate-iob wants to know about certain things
history, profile, etc
Scott Leibrand
@scottleibrand
Sep 23 2015 07:00
Just running it will tell you all the inputs it needs.
Ben West
@bewest
Sep 23 2015 07:00
to get-profile is used to prep the profile part
iter_pump_hours is used to get history, sort of
Scott Leibrand
@scottleibrand
Sep 23 2015 07:00
Again, the usage hints are helpful. :-)
Ben West
@bewest
Sep 23 2015 07:01
the history that comes out of pump is a view of "operational" perspective of pump
"I started bolus and gave this $x amount from programmed $y"
"someone pressed by bolus wizard with these inputs ..."
so the mmhistorytools plugin simplifies some of that
we're all working it all out
a lot of work was done on those hints
Ed Raskin
@msrcgm
Sep 23 2015 07:02
-h doesn't always help, but I need a comprehensive list of correct prompts with which to use -h
Ben West
@bewest
Sep 23 2015 07:02
hmmm
Ed Raskin
@msrcgm
Sep 23 2015 07:02
Which is what I am trying to put together ...
Ben West
@bewest
Sep 23 2015 07:02
would love another session
yeah you started to get it, there are is one inconsistency
but in general, idea was you can copy/paste most of command for the "next" one
eg idea is to start with device/vendor
then play around with use
then save the use in a report
then invoke reports....
then group them in alias
in general
Ed Raskin
@msrcgm
Sep 23 2015 07:04
yes -- but then there is kind of a predetermined list of processes that are not accessible with a ls command or show, etc. You just kind of have to know about them, like calculate-iob
Ben West
@bewest
Sep 23 2015 07:04
you can use the last set of arguments
the last few from the previous
to add the "next" one
the only inconsistency is in adding a report and where the format is required in report add $name $format ...
the ... part there is identical to the use command
everything that follows use is exactly the same
there is a small but confusing issue there, which I empathize with
oh sure, the list of complete "plugins" is unknown
the $format part is optional in the use command
it's use --format $format
but it's default is JSON in use
with that exception
all the other commands are identical with add and the main "function"
where add uses all the "previous" arguments
and the "main function" just takes the name
I tried very hard to be consistent
also then, show always shows everything or a pattern
show $name
Ed Raskin
@msrcgm
Sep 23 2015 07:08
You did an amazing job! Just trying to wrap my head around it
Ben West
@bewest
Sep 23 2015 07:08
it's a lot to take in
Ed Raskin
@msrcgm
Sep 23 2015 07:08
Your code is smarter than I am
Ben West
@bewest
Sep 23 2015 07:08
here to help
git was a big inspiration for me
so if you wrap you head around this
you also get git for free
Ed Raskin
@msrcgm
Sep 23 2015 07:09
Hahaha
Ben West
@bewest
Sep 23 2015 07:09
you get a bunch for free
Ed Raskin
@msrcgm
Sep 23 2015 07:09
two for 1
Ben West
@bewest
Sep 23 2015 07:09
this is throwing you in the deep in
end
yes, I tried to be very economical
it's a steep curve, but I tried to throw in a lot of -h help and tab-tab autocomplete along the way
and tried to make it as lego-like as possible
was a real design challenge
it's got some rough edges, but we're here to help
I think you can play a big role in documenting expectations for others
you are asking good question and getting it
just get free of the frustration
for better or worse this is the best we have to offer
I was frustrated with medtronic/dexcom for so many years
and they refuse to work with me as a result
Ed Raskin
@msrcgm
Sep 23 2015 07:11
Ok trying to cure my magic alias (created magic_2) with the following in order to calculate my IOB bolus, but alias is not running. do you see an error where I don't? openaps alias add magic_2 "report invoke recent-gluclose.json current_temp.json clock.json last_two_pump_hours.json profile.json calculate-iob.json determine-basal-suggestion.json"
Ben West
@bewest
Sep 23 2015 07:12
nice
openaps alias add magic_2 "report invoke recent-gluclose.json current_temp.json clock.json last_two_pump_hours.json profile.json calculate-iob.json determine-basal-suggestion.json"
was there an error?
assuming those are all "reports" in openaps report show it should be ok I think
one thing you can do
btw
next level up :-)
on github
you can create a private (if you pay the $9/month?) repo, and sync you openaps.ini there
Ed Raskin
@msrcgm
Sep 23 2015 07:13
yup, won't run like original (og) magic --- and I correctly added the new saved report last_two_pump_hours.json (and invoked to test, it passed)
Ben West
@bewest
Sep 23 2015 07:14
then I can see exactly what happens
or you can create a public one for free
some people don't like that because it puts the medtronic serial number in public
you'll notice I put mine in public all the time
personal choice
your openaps instance will sync there quite easily
the alias add command looks ok
I'd need to see report show
also, pro-tip
I think you are ready for two aliases
instead of a single magic_2
think about phases, like "gathering data, preparing, analyzing, predicting, maybe enacting depending on validation"
Ed Raskin
@msrcgm
Sep 23 2015 07:18
Ok -- just created a private to be double safe (though I think unnecessary) -- do I load up usinggit remote add origin https://github.com/msrcgm/myopenaps.git
git push -u origin master
Ben West
@bewest
Sep 23 2015 07:18
right
very good
you can add me, bewest as a "collaborator"
then I can see it
yeah, in your openaps "instance" run those commands
that will sync it
you "loop" will run git push origin to "sync" it permanently online :-)
Ed Raskin
@msrcgm
Sep 23 2015 07:20
just added you as a collaborator
Ben West
@bewest
Sep 23 2015 07:20
well done
if I had a wings badge or something I'd give it you
level up
Ed Raskin
@msrcgm
Sep 23 2015 07:21
I'm more of a level up kind of guy :smile:
Ben West
@bewest
Sep 23 2015 07:22
I'll be looking this over and testing it in my devel environment
Ed Raskin
@msrcgm
Sep 23 2015 07:22
another question, how to I type into bitter with the cool "code" formatting? I can't seem to get it right ...
Ben West
@bewest
Sep 23 2015 07:23
start with :
oh
Ed Raskin
@msrcgm
Sep 23 2015 07:23
:I am coding now:
didn't work ...
:I am coding
nope ...
Ben West
@bewest
Sep 23 2015 07:23
blob
I use:
`
for single
put one of those ticks on either side
it's shift tilde
both sides
that's good for "inline" like this somethign
for multiple lines like this:
I start one line with triple quote it's called a fence.
err
hahaha
````
tripe
triple
"tick" it's the thing with if you don't press shift to get ~
Ed Raskin
@msrcgm
Sep 23 2015 07:27
I am so typing me some code right now
Ben West
@bewest
Sep 23 2015 07:27
it's one of my "magic" keys so it's hard to type actually, lol you have no idea the effort that took
I have to escape every single one with an additional one
Ed Raskin
@msrcgm
Sep 23 2015 07:28
level up
Ben West
@bewest
Sep 23 2015 07:28
plus another one to escape it inside the formatting
nice
you did
:-)
you should add @amazaheri as collaborator too
no more complaining about needing to see file
just git push
actually you should add everyone here you want to see
Ed Raskin
@msrcgm
Sep 23 2015 07:30
is it a faux pas to type all messages as code just to feel cool? P.S. I already did invite @amazaheri , but not with the git push command. So in terminal I would type e.g. git push bewest?
Ben West
@bewest
Sep 23 2015 07:30
git push origin
maybe even git push
if it crosses a lot of lines it's better to use the triple quote form
you can go ahead and try the "fence " ````` form
gha
btw
this is another 2, or 3 for one deal
the docs use the same magic syntax as here
so the ``` rule works
Ed Raskin
@msrcgm
Sep 23 2015 07:36
That one I actually assumed without you telling me ... things keep getting better
Are you able to see my magic_2 alias? Seems like I did everything right?
Ben West
@bewest
Sep 23 2015 07:38
yeah, nothing sticking out
is there an error?
I will run it myself tomororw
Ed Raskin
@msrcgm
Sep 23 2015 07:38
yep, I get this
Ben West
@bewest
Sep 23 2015 07:38
tripel fence time
Ed Raskin
@msrcgm
Sep 23 2015 07:39

"fence"```pi@raspberrypi ~/myopenaps $ openaps magic_2
usage: openaps-report invoke [-h]

                         {calculate-iob.json,clock.json,current_temp.json,determine-basal-suggestion.json,glucose.json,last_two_pump_hours.json,profile.json,pump-history.json,read_basal_profile_A.json,read_bg_targets.json,read_carb_ratios.json,read_insulin_sensitivies.json,read_selected_basal_profile.json,read_settings.json,recent-glucose.json,reservoir.json}
                         [{calculate-iob.json,clock.json,current_temp.json,determine-basal-suggestion.json,glucose.json,last_two_pump_hours.json,profile.json,pump-history.json,read_basal_profile_A.json,read_bg_targets.json,read_carb_ratios.json,read_insulin_sensitivies.json,read_selected_basal_profile.json,read_settings.json,recent-glucose.json,reservoir.json} ...]

openaps-report invoke: error: argument report: invalid choice: 'recent-gluclose.json' (choose from u'calculate-iob.json', u'clock.json', u'current_temp.json', u'determine-basal-suggestion.json', u'glucose.json', u'last_two_pump_hours.json', u'profile.json', u'pump-history.json', u'read_basal_profile_A.json', u'read_bg_targets.json', u'read_carb_ratios.json', u'read_insulin_sensitivies.json', u'read_selected_basal_profile.json', u'read_settings.json', u'recent-glucose.json', u'reservoir.json')```

Ben West
@bewest
Sep 23 2015 07:39
close
Ed Raskin
@msrcgm
Sep 23 2015 07:39
crap...
Ben West
@bewest
Sep 23 2015 07:40
need some "enters" newlines between the fences
the triple tick is called a 'fence'
because it kind of looks like a picket fence sort of
Ed Raskin
@msrcgm
Sep 23 2015 07:40

```pi@raspberrypi ~/myopenaps $ openaps magic_2
usage: openaps-report invoke [-h]

                         {calculate-iob.json,clock.json,current_temp.json,determine-basal-suggestion.json,glucose.json,last_two_pump_hours.json,profile.json,pump-history.json,read_basal_profile_A.json,read_bg_targets.json,read_carb_ratios.json,read_insulin_sensitivies.json,read_selected_basal_profile.json,read_settings.json,recent-glucose.json,reservoir.json}
                         [{calculate-iob.json,clock.json,current_temp.json,determine-basal-suggestion.json,glucose.json,last_two_pump_hours.json,profile.json,pump-history.json,read_basal_profile_A.json,read_bg_targets.json,read_carb_ratios.json,read_insulin_sensitivies.json,read_selected_basal_profile.json,read_settings.json,recent-glucose.json,reservoir.json} ...]

openaps-report invoke: error: argument report: invalid choice: 'recent-gluclose.json' (choose from u'calculate-iob.json', u'clock.json', u'current_temp.json', u'determine-basal-suggestion.json', u'glucose.json', u'last_two_pump_hours.json', u'profile.json', u'pump-history.json', u'read_basal_profile_A.json', u'read_bg_targets.json', u'read_carb_ratios.json', u'read_insulin_sensitivies.json', u'read_selected_basal_profile.json', u'read_settings.json', u'recent-glucose.json', u'reservoir.json')```

nope
Ben West
@bewest
Sep 23 2015 07:41
need "fence"-shift-enter-"newline" $stuff - shift-enter-"newlin" "fence"
fence has to stand alone on it's own ground
Ed Raskin
@msrcgm
Sep 23 2015 07:42

pi@raspberrypi ~/myopenaps $ openaps magic_2 usage: openaps-report invoke [-h]

                         ``` {calculate-iob.json,clock.json,current_temp.json,determine-basal-suggestion.json,glucose.json,last_two_pump_hours.json,profile.json,pump-history.json,read_basal_profile_A.json,read_bg_targets.json,read_carb_ratios.json,read_insulin_sensitivies.json,read_selected_basal_profile.json,read_settings.json,recent-glucose.json,reservoir.json}```

                       ```  [{calculate-iob.json,clock.json,current_temp.json,determine-basal-suggestion.json,glucose.json,last_two_pump_hours.json,profile.json,pump-history.json,read_basal_profile_A.json,read_bg_targets.json,read_carb_ratios.json,read_insulin_sensitivies.json,read_selected_basal_profile.json,read_settings.json,recent-glucose.json,reservoir.json} ...]```

openaps-report invoke: error: argument report: invalid choice: 'recent-gluclose.json' (choose from u'calculate-iob.json', u'clock.json', u'current_temp.json', u'determine-basal-suggestion.json', u'glucose.json', u'last_two_pump_hours.json', u'profile.json', u'pump-history.json', u'read_basal_profile_A.json', u'read_bg_targets.json', u'read_carb_ratios.json', u'read_insulin_sensitivies.json', u'read_selected_basal_profile.json', u'read_settings.json', u'recent-glucose.json', u'reservoir.json')

Fe it!
eff it
Ben West
@bewest
Sep 23 2015 07:42
lol
ok
I can read it
Ed Raskin
@msrcgm
Sep 23 2015 07:43
thx
Ben West
@bewest
Sep 23 2015 07:44
idea is fence is at beginning and end of line
both must be true
everything in between is "pretty" already
yeah, nice editing
ok, I recommend splitting into two alias
one to get data
second to run interesting things, assuming data is good
so get-profile and other stuff is "interesting" if we already have data
Ed Raskin
@msrcgm
Sep 23 2015 07:46
So, part one is
recent-gluclose.json current_temp.json clock.json last_two_pump_hours.json profile.json
Ben West
@bewest
Sep 23 2015 07:46
call that fetch
or fetch-data
then you can run openaps fetch-data to get the stuff to work with
Ed Raskin
@msrcgm
Sep 23 2015 07:47
part two is calculate-iob.json determine-basal-suggestion.json
Ben West
@bewest
Sep 23 2015 07:47
for next five minutes
get-profile also
call that suggest or assemble
suggest invoke profile.json calculate-iob.json determine-suggestion.json
I like that last name btw
nice job
maybe
determined-basal-suggestion.json is slightly better name
calculdated
haha
Ed Raskin
@msrcgm
Sep 23 2015 07:49
nope, I put profile in fetch data, gotta fix that
Ben West
@bewest
Sep 23 2015 07:50
well it could work either way I suppose
Ed Raskin
@msrcgm
Sep 23 2015 07:50
no, nevermind, that's right. I need to fetch then invoke profile?
Ben West
@bewest
Sep 23 2015 07:50
it "needs to be run" at some point
Ed Raskin
@msrcgm
Sep 23 2015 07:50
you are right, I guess it doesn't really matter, we can arbitrarily split these up ...
Ben West
@bewest
Sep 23 2015 07:50
one way is to think about "getting data from devices"
and then think about "massaging it and working with it" separately
we're going to also add phases to "massaging/validating it"
we're adding those currently
so it'll force the loop to stop/give up/abort if things are not valid
but we'll have to add that as we go
we're just all getting used to the tools now
I keep examples here
I'm still working on my loop
I hope to post my working thing here
Ed Raskin
@msrcgm
Sep 23 2015 07:52
ok added (p.s., why are we splitting this up? ... to isolate the problem?)
Ben West
@bewest
Sep 23 2015 07:52
yes, to isolate problems
what we'll do
is make a simple loop script that calls all our alises
Ed Raskin
@msrcgm
Sep 23 2015 07:53
fetch-data is the problem, I get an error....
Ben West
@bewest
Sep 23 2015 07:53
openaps fetch
openaps analyze
openaps validate
openaps predict
openaps validate-predictions
openaps enact
openaps report
someting like that
very simple
Ed Raskin
@msrcgm
Sep 23 2015 07:54
... but elegant
Ben West
@bewest
Sep 23 2015 07:54
but none of those exist yet
we have to figure out how to build them together
Ed Raskin
@msrcgm
Sep 23 2015 07:54
that's because you are too busy helping me ...
Ben West
@bewest
Sep 23 2015 07:54
we have the uses
we have the reports
we have the alias
we have the blocks :-) just need to put them together together
Ed Raskin
@msrcgm
Sep 23 2015 07:55
death star ...
Ben West
@bewest
Sep 23 2015 07:55
need some new uses to validate things
then we need some more helpers for certain things
maybe a new loop tool
so you can use your defined alias to automatically define the loop
then schedule the loop ;-)
so you're on the right track, it's a matter of coming up with these logical groupings from here on out
and it's not a done/assembled deal
no one quite has the "right" set up, there's not one right way
but hopefully we have a flexible, workable tool in the meantime
Ed Raskin
@msrcgm
Sep 23 2015 07:58
But why isn't fetch-data working? it must be a problem with last_two_pump_hours.json?
that's the only new variable, but it appears that I set the report up right (p.s., seeing that on git hub is --visually -- so much better)
Ben West
@bewest
Sep 23 2015 07:59
:-)
see it all in one place
github is poor-mans dashboard for now
NS soon
ok so the report add $name ...
the `...
the ...
can be done with report invoke ...
same names
so can start at beginning and go through end
left to right
one of them is probably unhappy
Ed Raskin
@msrcgm
Sep 23 2015 08:01
report invoke each one of my .json files that make up fetch-data?
Ben West
@bewest
Sep 23 2015 08:01
btw, if you find the github interface easier for editing openaps.ini for typos or something
you can edit directly through github
then do git pull
right
Ed Raskin
@msrcgm
Sep 23 2015 08:01
oooo, I hate terminal!!!!
Ben West
@bewest
Sep 23 2015 08:02
so git alias show fetch-data
the reports that show up
you can run openaps report invoke ...
you can run each one individually from left to right
or all of them together
you can copy/paste or tab-complete
Ed Raskin
@msrcgm
Sep 23 2015 08:03
lost me -- where do I type git alias show fetch-data?
Ben West
@bewest
Sep 23 2015 08:03
sorry
Ed Raskin
@msrcgm
Sep 23 2015 08:03
in github somewhere?
Ben West
@bewest
Sep 23 2015 08:03
openaps alias show fetch-data in the usual place
Ed Raskin
@msrcgm
Sep 23 2015 08:03
oh, ok -- two ideas at the same time
Ben West
@bewest
Sep 23 2015 08:03
they are almost the same in mind ;-)
the ini file is even compatible
-ish
used to be, anyway
in case openaps was broken, I wanted a second way to edit the file just in case
Ed Raskin
@msrcgm
Sep 23 2015 08:05
effing found it glucose, not glucose ...
Ben West
@bewest
Sep 23 2015 08:05
:-)
tab-complete, even though it takes a few moments can help save those mistakes
it's slow to be almost painful, but just useful enough, even on rpi for me
on my laptop it's the only way to go ;-)
Ed Raskin
@msrcgm
Sep 23 2015 08:07
holly crap it is so easy to edit in git hub, now is it automatically syncing or do I need to manually sync each time?
Ben West
@bewest
Sep 23 2015 08:07
you're using mac?
Ed Raskin
@msrcgm
Sep 23 2015 08:07
yes mac
Ben West
@bewest
Sep 23 2015 08:07
git pull
btw
I can help you set up editing on your mac
directly
so tab complete is FAST
configure it on mac
push to github
pull on rpi
or even git push rpi
from your mac
your choice
and tab complete is FAST on mac
Ed Raskin
@msrcgm
Sep 23 2015 08:09
git pull didn't work because it says I have a conflict
JamOrHam
@jamorham
Sep 23 2015 08:09
@bewest which python ide do you use?
Ed Raskin
@msrcgm
Sep 23 2015 08:09
I know why, I created data-fetch in terminal
but I changed magic 2 in git hub
how to I pull from git if I want that version more?
Ben West
@bewest
Sep 23 2015 08:10
where?
from rpi: git pull origin
Ed Raskin
@msrcgm
Sep 23 2015 08:10
pull not possible because I have unmarked files ...
Ben West
@bewest
Sep 23 2015 08:11
git stash
Ed Raskin
@msrcgm
Sep 23 2015 08:11
unmerged ..
Ben West
@bewest
Sep 23 2015 08:11
git pull
order matters
sorry
stash puts changes away for a moment, till you're ready for later
if you change files locally
then change them on github
might have weird things like that
Ed Raskin
@msrcgm
Sep 23 2015 08:12
git stash
openaps.ini: needs merge
openaps.ini: needs merge
openaps.ini: unmerged (f605b7f7dec1158136a65ef5bf053f3be1f0a655)
openaps.ini: unmerged (790b136b82051fcb4ab022bd9458b9c510fb7532)
openaps.ini: unmerged (8d973ce93b7b0f75a972641381df43cf08286c16)
fatal: git-write-tree: error building trees
Cannot save the current index state
I'm not going to make this mistake again ...
Ben West
@bewest
Sep 23 2015 08:12
hmm
no worries
it's actually fairly difficult to permanently ruin things
git reset --hard HEAD
git merge --abort
git checkout -f master -- .
git pull origin
(even all that doesn't permanently undo anything...)
Ed Raskin
@msrcgm
Sep 23 2015 08:14
pi@raspberrypi ~/myopenaps $ git reset --hard HEAD
HEAD is now at a669eed openaps-report invoke calculate-iob.json determine-basal-suggestion.json
pi@raspberrypi ~/myopenaps $ git merge --abort
fatal: There is no merge to abort (MERGE_HEAD missing).
pi@raspberrypi ~/myopenaps $ git checkout -f master --
Already on 'master'
Your branch and 'origin/master' have diverged,
and have 3 and 1 different commit each, respectively.
pi@raspberrypi ~/myopenaps $ git pull origin
Username for 'https://github.com': msrcgm
Password for 'https://msrcgm@github.com':
Auto-merging openaps.ini
CONFLICT (content): Merge conflict in openaps.ini
Ben West
@bewest
Sep 23 2015 08:15
perfect
now
git checkout origin/master -- openaps.ini
Ed Raskin
@msrcgm
Sep 23 2015 08:17
magic2 is alive
Ben West
@bewest
Sep 23 2015 08:17
git commit -avm 'crossing fingers here a little bit 76% ;-)
'
oh
great
it works then
Ed Raskin
@msrcgm
Sep 23 2015 08:17
yes, yes it does!
now to do a fake bolus, standby ...
Ben West
@bewest
Sep 23 2015 08:17
I can operate git blind ;-)
ah, to get some history :-)
do the git commit though
or run a report
oh you did
ok great
I can uncross my fingers now
Ed Raskin
@msrcgm
Sep 23 2015 08:20
nope, cross them again because its not seeing the .5 bolus I just gave as IOB ...
so calculate-ion.json must be effed
openaps report show calculate-ion.json?
Ben West
@bewest
Sep 23 2015 08:21
if we are using two alias
you need to run both alias
first to get the new data
then to analyze it
Ed Raskin
@msrcgm
Sep 23 2015 08:21
sorry, I am back to running everything in one. Magic 2 has everything lumped together
yes, calculate-iob.json is what is giving me my garbage.
pi@raspberrypi ~/myopenaps $ openaps report show calculate-iob.json
calculate-iob://text/shell/calculate-iob.json
pi@raspberrypi ~/myopenaps $ cat calculate-iob.json
{"iob":0,"activity":0,"bolusiob":0}
conflicts with
pi@raspberrypi ~/myopenaps $ openaps report show last_two_pump_hours.json
pump://JSON/iter_pump_hours/last_two_pump_hours.json
pi@raspberrypi ~/myopenaps $ cat last_two_pump_hours.json
[
{
"programmed": 0.5,
"_type": "Bolus",
"type": "normal",
"_description": "Bolus 2015-09-23T01:17:41 head[4], body0 op[0x01]",
"duration": 0,
"timestamp": "2015-09-23T01:17:41",
"_body": "",
"_head": "01050500",
"amount": 0.5,
"_date": "a95141170f"
},
{
"_type": "Model522ResultTotals",
"_description": "Model522ResultTotals 2015-09-23T00:00:00 head1, body[41] op[0x6d]",
"timestamp": "2015-09-23T00:00:00",
"_body": "050c00e800000000028e024e5a00400a000000400a00000000000000406401000000010c00e8000000",
"_head": "6d",
"_date": "968f"
},
{
"_type": "MResultTotals",
"_description": "MResultTotals 2015-09-23T00:00:00 head[5], body0 op[0x07]",
"timestamp": "2015-09-23T00:00:00",
"_body": "",
"_head": "070000028e",
"_date": "968f"
}
]pi@raspberrypi ~/myopenaps $
I need to tell calculate-iob.json to use last_two_pump_hours.json!!!!
It doesn't know to do that yet, right?
Ben West
@bewest
Sep 23 2015 08:25
right
Ed Raskin
@msrcgm
Sep 23 2015 08:25
boom, I'm like Neo in the matrix, all I see is code!
Ben West
@bewest
Sep 23 2015 08:26
it only does what you told it earlier ;-)
Ed Raskin
@msrcgm
Sep 23 2015 08:26
Ok, crap, its getting late, how to I fix calculate-iob.json?
Ben West
@bewest
Sep 23 2015 08:26
level up
git push origin
edit on github
Ed Raskin
@msrcgm
Sep 23 2015 08:27
ah, I don't know how to do this one on git hub, it looks different.
Let me see if I can deduce
this section defines the "report"
history = ...
quickest way is probably set that to last_two_pump_hours.json
?
Ed Raskin
@msrcgm
Sep 23 2015 08:28
That part I see, but do I need to substitute pump-history to
ah you are answering my question before I type it
Ben West
@bewest
Sep 23 2015 08:29
is that your report?
Ed Raskin
@msrcgm
Sep 23 2015 08:29
I wasn't sure if I need to add a new perimeter and leave pump history in
Ben West
@bewest
Sep 23 2015 08:29
or you could redefine your pump-history report to iter_hours instead
but your 80% with this I guess
save in github
git pull origin in usual place
Ed Raskin
@msrcgm
Sep 23 2015 08:32
omg
Ed Raskin
@msrcgm
Sep 23 2015 08:32
damn it -- still showing IOB of 0
Ben West
@bewest
Sep 23 2015 08:32
which will show which command was used to edit which file
same on my openaps-example
the best way I could figure to give as much help as possible was to make the whole system as interactive as possible ;)
hmmm iob of zero does sound wrong
always possibility of bug, which is why it's all separate
but at this point you can git tag why-is-iob-zero
Ed Raskin
@msrcgm
Sep 23 2015 08:36
ran calc-iob separately and did the cat command, shows IOB 0
taged it
Ben West
@bewest
Sep 23 2015 08:37
git push --tags origin
now it's tagged on github
and all your collaborators can discuss/review
we all have same view
I'm done running new environments for the day ;-)
Ed Raskin
@msrcgm
Sep 23 2015 08:38
Are you able to see the tag? I can't see it
I'm done too
Thanks so much as always
yes I see it
there's a zip file with everything as-is
it's all automatic
nice traceability
I challenge any vendor to this level of transparency ;-)
and you can sync this to another rpi if need be
Ed Raskin
@msrcgm
Sep 23 2015 08:40
Can I upload my entire SD card to github as a backup? not just myopenaps directory?
Ben West
@bewest
Sep 23 2015 08:40
not to github, I think
other places
dropbox
Ed Raskin
@msrcgm
Sep 23 2015 08:41
sorry I keep asking question ... go to bed!, but check bg first ...
please
Ben West
@bewest
Sep 23 2015 08:41
high right now :(
you're asking the right questions
these are all the things I expect to help people with, I hope the explanations help
I also think there's not yet one right way to understand, explain it
different people need different ways to understand it
Ed Raskin
@msrcgm
Sep 23 2015 08:43
so true goodnight!
Ali Mazaheri
@amazaheri
Sep 23 2015 15:26
@msrcgm got the invite, I look into you sample json and run them through code to see if I find anything.
Scott Leibrand
@scottleibrand
Sep 23 2015 16:18
@msrcgm without yet looking at your repo, the usual reason calculate-iob doesn't show IOB after you update pumphistory.json is that you forgot to update clock.json as well
Ali Mazaheri
@amazaheri
Sep 23 2015 16:19
@scottleibrand I added the clock to his magic alias and checked time on pump, pi but we need to validate that as well incase anything has changed
since Sunday :)
Scott Leibrand
@scottleibrand
Sep 23 2015 16:21
looks like his pump-history.json isn't updated since 5 days ago in github
Ali Mazaheri
@amazaheri
Sep 23 2015 16:21
nice
I have couple of meeting this morning and was planning to look into his repo
Scott Leibrand
@scottleibrand
Sep 23 2015 16:22
let's see if he switched everything over to last_two_pump_hours.json properly
Ali Mazaheri
@amazaheri
Sep 23 2015 16:22
ok, I told him that iob.js is what we have been using for a while with no major issue
Scott Leibrand
@scottleibrand
Sep 23 2015 16:26
https://github.com/msrcgm/myopenaps/blob/master/clock.json#L1 shows "2015-09-22T23:50:18" vs. "timestamp": "2015-09-22T21:45:13", at https://github.com/msrcgm/myopenaps/blob/master/last_two_pump_hours.json#L8 - and he hasn't yet done a git push on the one he pasted showing "timestamp": "2015-09-23T01:17:41",. that kind of discrepancy would definitely account for it.
Ali Mazaheri
@amazaheri
Sep 23 2015 16:27
agree
Ali Mazaheri
@amazaheri
Sep 23 2015 16:32
be back around noon
Chris Oattes
@cjo20
Sep 23 2015 17:12
morning / afternoon / evening
Ben West
@bewest
Sep 23 2015 17:54
morning
Frank Best
@efbest
Sep 23 2015 21:06
@bewest @amazaheri @scottleibrand you are doing a great job!
Dana Lewis
@danamlewis
Sep 23 2015 21:08
Hi @efbest ! Not sure everyone's met you yet, want to introduce yourself/where you are in the process to folks here?
Chris Oattes
@cjo20
Sep 23 2015 21:08
o/
Frank Best
@efbest
Sep 23 2015 21:15
still fighting with the basics (RP2, wifi, etc); exploring the advantages of 640G compared to 540, and dreaming of being able to produce some code to speed it up rather than putting on the brakes all the Time!
putting a lot of effort to convince patients that it
Is necessary to engage themselves ... a husband of an elderly Type1 gave me a RP2 a present today ...
Dana Lewis
@danamlewis
Sep 23 2015 21:20
@efbest assuming you've already found the docs for rPi setup? http://bit.ly/1KSEhEn
Do you have t1?
Oh, connecting the dots now, sorry, your full name wasn't showing in my app before :) sorry for the silly questions.
Frank Best
@efbest
Sep 23 2015 21:21
for 53y
never mind
Dana Lewis
@danamlewis
Sep 23 2015 21:21
Yup, connected the dots now, now that I'm back on my laptop
Frank Best
@efbest
Sep 23 2015 21:25
there is a long weekend coming with the perspective of talking to my Pumps... still curious if the 640G might be soziable!
Dana Lewis
@danamlewis
Sep 23 2015 21:31
@cjo20 thanks for the context on your openaps-dev request :) (I like connecting names with gitter handles, makes it easier to help everyone!)
Chris Oattes
@cjo20
Sep 23 2015 21:43
no problem :) I was pretty sure most people wouldn't make the connection between the two :P
Ali Mazaheri
@amazaheri
Sep 23 2015 21:54
unless they use handles like mine, @bewest @scottleibrand @danamlewis @jasoncalabrese :)
but great idea for sure
Chris Oattes
@cjo20
Sep 23 2015 21:55
@amazaheri It's more that my gmail account only shares the "20" with my username here, so the link between the two isn't that obvious
Ali Mazaheri
@amazaheri
Sep 23 2015 21:56
I totally love the idea :)
and a picture as well I know it took me a while to convince @bewest hehe
Chris Oattes
@cjo20
Sep 23 2015 21:57
there aren't any good pictures of me in existance :P
Dana Lewis
@danamlewis
Sep 23 2015 21:57
@cjo20 "good" is subjective. besides, it would be tiny here ;) so doesn't matter. mostly helps distinguish you from the other anonymous icons :)
Ali Mazaheri
@amazaheri
Sep 23 2015 21:58
well said @danamlewis @cjo20 go for it!
cjo20 @cjo20 grumbles
Ben West
@bewest
Sep 23 2015 21:58
hmm? bewest is my name everywhere except twitter ;-)
Ali Mazaheri
@amazaheri
Sep 23 2015 21:59
huh, ur twitter handle is LONG!
Ben West
@bewest
Sep 23 2015 21:59
oh pictures, they gave me a hard time, too @cjo20 I finally caved
Dana Lewis
@danamlewis
Sep 23 2015 21:59
"they"
Ali Mazaheri
@amazaheri
Sep 23 2015 21:59
and what is he doing
Dana Lewis
@danamlewis
Sep 23 2015 21:59
This time that 'they' wasn't me ;_
*;)
Ali Mazaheri
@amazaheri
Sep 23 2015 21:59
They = Ali G
Ben West
@bewest
Sep 23 2015 21:59
hacking diabetes, visiting copyright office
Ali Mazaheri
@amazaheri
Sep 23 2015 21:59
he he he
Dana Lewis
@danamlewis
Sep 23 2015 21:59
or that time this 'they' wasn't me?
Ben West
@bewest
Sep 23 2015 21:59
tidepool gave me a hard time too
ali and dana made me cave
oh, you is they, alright ;-)
Dana Lewis
@danamlewis
Sep 23 2015 22:00
;p
Chris Oattes
@cjo20
Sep 23 2015 22:01
eugh
how do I set a picture? Is it through github?
Ben West
@bewest
Sep 23 2015 22:02
yeah
your github personal account page
Chris Oattes
@cjo20
Sep 23 2015 22:03
guess it takes a while to sync here
Dana Lewis
@danamlewis
Sep 23 2015 22:03
don't worry, @pheltzel is being added to the list of those who need pics now that I've gotten him back on github ;)
@cjo20 ya, can see it when I click on your name now
Chris Oattes
@cjo20
Sep 23 2015 22:05
apologies :P
Ali Mazaheri
@amazaheri
Sep 23 2015 22:05
yay we can see u
Dana Lewis
@danamlewis
Sep 23 2015 22:06
@cjo20 thanks for giving us our token offtopic fun conversation thread of the day ;) sorry you were the root of it ;)
Chris Oattes
@cjo20
Sep 23 2015 22:06
had to happen some time I suppose :P At least everyone else gets to have a turn before it gets back round to me, right?
Ben West
@bewest
Sep 23 2015 22:07
thought you'd go with unicorn
our channels are definitely short on unicorns
Dana Lewis
@danamlewis
Sep 23 2015 22:07
yup, for sure @cjo20 . and @amazaheri gets 3 per round about TABing ;)
Chris Oattes
@cjo20
Sep 23 2015 22:09
TABing?
Dana Lewis
@danamlewis
Sep 23 2015 22:09
tab complete
Ali Mazaheri
@amazaheri
Sep 23 2015 22:09
[TAB] [TAB] [TAB]
CPYL0TaU8AAqWz1.jpg
untitled.png
@bewest fast TABing on Windows 10
Ben West
@bewest
Sep 23 2015 22:13
hehe, I still remember some hot keys
they are all in slightly different places and do slightly different things
and apparently I can't stop myself from automatically using my "normal" hot keys
Ali Mazaheri
@amazaheri
Sep 23 2015 22:14
:)