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

30th
Oct 2015
Ali Mazaheri
@amazaheri
Oct 30 2015 01:06
@bewest for git corruption fix easy_install -ZU openaps?
Ben West
@bewest
Oct 30 2015 02:33
no, it's in branch on openaps
on wip/pass-stdin
Scott Leibrand
@scottleibrand
Oct 30 2015 03:33
I checked out and installed the wip/bewest/dev branch, but I can't seem to run latest-openaps-treatment
Scott Leibrand
@scottleibrand
Oct 30 2015 04:19
right now I'm doing mm-format-ns-treatments upload/pumphistory.zoned.json settings/model.json upload/ns-treatments.json && ns-upload $NIGHTSCOUT_HOST $API_SECRET treatments.json upload/ns-treatments.json; ns-dedupe-treatments delete $NIGHTSCOUT_HOST, which is rather a kludge, but it works. :)
Ben West
@bewest
Oct 30 2015 05:54
you need a device to report treatments to upload
and a second device to upload prepared treatments
Scott Leibrand
@scottleibrand
Oct 30 2015 06:36
can you point me to what those would be?
Ben West
@bewest
Oct 30 2015 06:36
yeah
hmm
it's kind of hacky on my end as well
so API_SECRET is set in crontab
openaps-device add format-latest-nightscout-treatments process bash -c "nightscout cull-latest-openaps-treatments ${1-monitor/pump-history-zoned.json} $(openaps latest-ns-treatment-time)"
this is nonfunctional
I ended up editing my ini
it's not checked in because it's "secret"ish
Scott Leibrand
@scottleibrand
Oct 30 2015 06:39
what's cull-latest-openaps-treatments ?
Ben West
@bewest
Oct 30 2015 06:39
ok, so I broke my own rule...
ns.hs -->nightscout
I've found it's best if a lot of these tools take an $1
Scott Leibrand
@scottleibrand
Oct 30 2015 06:40
"an"? how do you pronounce $1?
Ben West
@bewest
Oct 30 2015 06:40
dollar one?
oh
a $1?
Scott Leibrand
@scottleibrand
Oct 30 2015 06:40
ok, yeah
Ben West
@bewest
Oct 30 2015 06:40
an arg-one is what I think
Scott Leibrand
@scottleibrand
Oct 30 2015 06:40
thought that was a hint to some other name for $
ah
so it was a hint. :)
anyway, do I need to add something to get ns.sh referencable?
Ben West
@bewest
Oct 30 2015 06:41
yeah, hint-ish I guess, heh
ok
npm install && sudo npm link && sudo npm link oref0 should do it
also
Scott Leibrand
@scottleibrand
Oct 30 2015 06:42
I've done that already...
Ben West
@bewest
Oct 30 2015 06:42
sudo easy_install -ZU openaps-contrib for the base install
should run as nightscout
see, I broke my own rule
Scott Leibrand
@scottleibrand
Oct 30 2015 06:42
k
Ben West
@bewest
Oct 30 2015 06:42
I commented on your thing
that we should make the names match
because it's confusing
ns -> nightscout == confusing
soryr
Scott Leibrand
@scottleibrand
Oct 30 2015 06:42
yeah, and fix reset-usb while we're at it
I agree, just haven't gotten back to that PR yet
ok, nightscout what?
Ben West
@bewest
Oct 30 2015 06:43
$ cat bin/ns.sh 
#!/bin/bash


self=$(basename $0)
NAME=${1-help}
shift
PROGRAM="ns-${NAME}"
COMMAND=$(which $PROGRAM | head -n 1)

function help_message ( ) {
  cat <<EOF
  Usage:
$self <cmd>

EOF
}

case $NAME in
latest-openaps-treatment)
  ns-get treatments.json'?count=5' $* | json -c "this.enteredBy.indexOf('openaps://') === 0" | json 0
  ;;
cull-latest-openaps-treatments)
  INPUT=$1
  LAST_TIME=$2
  mm-format-ns-treatments $INPUT |  json -c "this.created_at > '$LAST_TIME'"
  ;;
help)
  help_message
  ;;
*)
  test -n "$COMMAND" && exec $COMMAND $*
  ;;
esac


bewest@hither:~/src/openaps/oref0$
sorry
jjust nice to see
so running nightscout cull-latest-openap-treatments <pump-history-zoned.json> $(json -monitor/clock.json) or similar
Scott Leibrand
@scottleibrand
Oct 30 2015 06:44
nightscout latest-openaps-treatment gives me no output
Ben West
@bewest
Oct 30 2015 06:45
errr
Scott Leibrand
@scottleibrand
Oct 30 2015 06:45
what does $(json -f monitor/model.json) do?
ah
Ben West
@bewest
Oct 30 2015 06:45
json -f <file>
prints the file nicely as json
in case it's a string you get nice decoded "string"
json is a wonderful, wonderful tool
Scott Leibrand
@scottleibrand
Oct 30 2015 06:46
nightscout cull-latest-openap-treatments pumphistory.zoned.json $(json -f monitor/clock.json)
no output
is that expected?
Ben West
@bewest
Oct 30 2015 06:46
maybe
Scott Leibrand
@scottleibrand
Oct 30 2015 06:48
does clock need to be zoned as well?
Ben West
@bewest
Oct 30 2015 06:48
yes
use tz clock
Scott Leibrand
@scottleibrand
Oct 30 2015 06:49
yeah, I have it defined already
that was a fun one to figure out, but fortunately it was in your openaps-example. :)
Ben West
@bewest
Oct 30 2015 06:50
yeah, I wanted to check a few in
:-D
so this part was a little hacky
not fully satisfied with what's there
$ cat latest-treatments.ini 
[device "latest-treatments"]
fields = 
cmd = nightscout
args = latest-openaps-treatment bewest.labs.diabetes.watch
ah, that's how I did it
so running use latest-treatments shell ...
the ... adds to the arguments there
there's a bunch of different ways to do this
Scott Leibrand
@scottleibrand
Oct 30 2015 06:53
oh, so cull-latest-openap-treatments gets treatments since the provided time
Ben West
@bewest
Oct 30 2015 06:53
right
cull special
Scott Leibrand
@scottleibrand
Oct 30 2015 06:53
so I'd need to figure out some way to know the old clock.json time
seems much safer to just check what's already in NS
Ben West
@bewest
Oct 30 2015 06:53
that's what it does
Scott Leibrand
@scottleibrand
Oct 30 2015 06:53
ideal would be for NS to just dedupe on POST
Ben West
@bewest
Oct 30 2015 06:54
it compares latest NS to latest medtronic
Scott Leibrand
@scottleibrand
Oct 30 2015 06:54
that's what latest-openaps-treatment does, not cull, right?
Ben West
@bewest
Oct 30 2015 06:54
tatkes the latest from medtronic and returns it
Scott Leibrand
@scottleibrand
Oct 30 2015 06:54
confused: I though clock.zoned.json came from the pump
Ben West
@bewest
Oct 30 2015 06:55
it does
latest-openaps-treatment)
  ns-get treatments.json'?count=5' $* | json -c "this.enteredBy.indexOf('openaps://') === 0" | json 0
  ;;
so with this setup
the stuff reported to NS is one cycle late
mine is oriented towards glucose first
yours is oriented towards pump first
japanese vs english or similar
Scott Leibrand
@scottleibrand
Oct 30 2015 06:56
heh
Ben West
@bewest
Oct 30 2015 06:56
I want to keep options open
the ns- tools...
Scott Leibrand
@scottleibrand
Oct 30 2015 06:56
so explain to me how latest-openaps-treatments works
Ben West
@bewest
Oct 30 2015 06:56
well overall
it calls ns-get
Scott Leibrand
@scottleibrand
Oct 30 2015 06:56
it gets the last 5 treatments from NS...
Ben West
@bewest
Oct 30 2015 06:57
ah right
Scott Leibrand
@scottleibrand
Oct 30 2015 06:57
but I can't parse the rest
Ben West
@bewest
Oct 30 2015 06:57
so it interstices the arguments, so they get passed to ns-get
so run ns-get treatments.json $NIGHTSCOUT_HOST
ok, so this gets last 5 from NS
and filters out all the ones that were not from openaps
and prints the json of the first object
not an array, the actual object
so literally the last openaps object in NS
as of this date
Scott Leibrand
@scottleibrand
Oct 30 2015 06:59
ok, and how do we use that?
Ben West
@bewest
Oct 30 2015 07:00
I added a latest-treatment device
that prints result of all that
so my NIGHTSCOUT_HOST is in "secret" INI
so you want a latest-treatments.ini with this:
o$ cat latest-treatments.ini 
[device "latest-treatments"]
fields = 
cmd = nightscout
args = latest-openaps-treatment bewest.labs.diabetes.watch
Scott Leibrand
@scottleibrand
Oct 30 2015 07:00
interesting, I don't store my NIGHTSCOUT_HOST anywhere except crontab
Ben West
@bewest
Oct 30 2015 07:01
you can't use openaps to give it your nightscout host, because your args to device add will be added to your git log
right, this is exercising/testing the new private INI
it's not checked in because it's private
Scott Leibrand
@scottleibrand
Oct 30 2015 07:01
I saw that part, but I still don't understand what we do with the latest treatment
Ben West
@bewest
Oct 30 2015 07:01
oh
Scott Leibrand
@scottleibrand
Oct 30 2015 07:01
are we just extracting the timestamp from it somehow?
Ben West
@bewest
Oct 30 2015 07:01
so we have all the info from medtronic
Scott Leibrand
@scottleibrand
Oct 30 2015 07:02
and using that in cull?
Ben West
@bewest
Oct 30 2015 07:02
we only want to upload the stuff since the last record in NS
so it's the diff from NS to current medtronic
that we want to upload
that's what cull does, that diff
Scott Leibrand
@scottleibrand
Oct 30 2015 07:02
ok, so the argument you provide to cull is not the pump clock.json, but the one from latest-treatments?
Ben West
@bewest
Oct 30 2015 07:02
right
from NS
Scott Leibrand
@scottleibrand
Oct 30 2015 07:03
ok, that's what I asked earlier and got the opposite response
hence my confusion. :)
Ben West
@bewest
Oct 30 2015 07:03
format-latest-nightscout-treatments = ! bash -c "nightscout cull-latest-open aps-treatments monitor/pump-history-zoned.json $(openaps latest-ns-treatment-time)"
Scott Leibrand
@scottleibrand
Oct 30 2015 07:03
ah k
you were describing generic usage of cull, not how we wanted to use it
I get it now
Ben West
@bewest
Oct 30 2015 07:04
latest-ns-treatment-time ! bash -c "openaps use latest-treatments shell |json created_at"
format-latest-nightscout-treatments ! bash -c "nightscout cull-latest-openaps-treatments monitor/pump-history-zoned.json $(openaps latest-ns-treatment-time)"
upload-recent-treatments ! bash -c "test $(json -f reporting/latest-treatments.json -a created_at eventType | wc -l ) -gt 0 && (openaps use  ns-upload shell treatments.json reporting/latest-treatments.json     )  || echo \"No recent treatments to upload\""
yeah, I apologize, I haven't communicated this latest bit as well
I'm not really happy with it
it's too complicated
I mean, one hand, it's lot of extraneous/network I/O
so it should be hard
want to encourage running purely locally
Scott Leibrand
@scottleibrand
Oct 30 2015 07:06
well, NS viz is pretty powerful
Ben West
@bewest
Oct 30 2015 07:06
on other hand, practicality has it's own demands
Scott Leibrand
@scottleibrand
Oct 30 2015 07:06
for actually knowing what's going on, and whether/how it's working
Ben West
@bewest
Oct 30 2015 07:06
yeah, with the new basal stuff, it's unbeatable
and for communicating results, even
Scott Leibrand
@scottleibrand
Oct 30 2015 07:06
we complain all the time about not being able to see what our devices are doing: this solves that
Ben West
@bewest
Oct 30 2015 07:06
want to add chris' time in range as report to NS
exactly
Scott Leibrand
@scottleibrand
Oct 30 2015 07:07
I was looking at the NS weekly reports
that has time in range
Ben West
@bewest
Oct 30 2015 07:07
NS is the only API that is built for diabetes
Scott Leibrand
@scottleibrand
Oct 30 2015 07:07
"Weekly success"
Ben West
@bewest
Oct 30 2015 07:07
that's to mirror dexcom's clarity
Scott Leibrand
@scottleibrand
Oct 30 2015 07:09
will be interesting to see if you (and anyone else who shares their URL around) maintain 70%+ time in range with openaps like Dana does. :-)
Ben West
@bewest
Oct 30 2015 07:09
so....
first month I've been treating it like a dev
testing the limits
trying to understand what it's going to do
the last few days I've been trying to use that knowledge to work with it
and... wow
Scott Leibrand
@scottleibrand
Oct 30 2015 07:10
:)
Ben West
@bewest
Oct 30 2015 07:10
I could get used to this
unattended, I think it could be dangerous
but that's the thing with diabetes...
it's dangerous unattended anyway
this actually rewards your attention
Scott Leibrand
@scottleibrand
Oct 30 2015 07:10
yeah, totally
Ben West
@bewest
Oct 30 2015 07:10
that's what I call "high fidelity"
Scott Leibrand
@scottleibrand
Oct 30 2015 07:10
question is whether it's less dangerous with the system
Ben West
@bewest
Oct 30 2015 07:10
vs low fidelity
pumps haven't proven their "value" in the system
this proves the pump's value
you simply cannot do this as a human
last two days:
blob
like... maybe I have t2...
lol
this is incredible
so now, I know, ok when in 90's...
and this can be encoded too
we need to consider velocity and 15, 30, 90 minute "load"
a -1 drop over half hour is bad
etc
unattended...
especially when it's clearly crossing threshold
bwp is warning me of bad basal
need a basal tuning tool
afternoon.
so if we see a 50% stippling
Scott Leibrand
@scottleibrand
Oct 30 2015 07:14
I wrote up that algorithm for one
Ben West
@bewest
Oct 30 2015 07:14
and bwp is recommending -63% (38%)
is it worth trying half basal at that time?
thinking about trying profile A for this
Scott Leibrand
@scottleibrand
Oct 30 2015 07:15
and then ended up just executing it in my head based on our hourly temp basal average report in diyps
it reports average net basal +/- for each hour of the day, on a 7d or 30d average
Ben West
@bewest
Oct 30 2015 07:16
are you still having problems with temp basals showing up in NS?
are you up to date with everything? I did several patches today even
Scott Leibrand
@scottleibrand
Oct 30 2015 07:16
nope, fixed that by zoning properly
Ben West
@bewest
Oct 30 2015 07:16
I feel like that zoning tool is already proving it's value
Scott Leibrand
@scottleibrand
Oct 30 2015 07:16
biggest issue now, other than getting all this upload stuff documented and reproducible, is the IOB stuff
I have two methods of calculating IOB that are both broken
Ben West
@bewest
Oct 30 2015 07:17
should start implemting fail-safes to barf is dates are not properly zoned
Scott Leibrand
@scottleibrand
Oct 30 2015 07:17
your refactored one gives me 0 all the time, even when properly zoned
no idea why
Ben West
@bewest
Oct 30 2015 07:17
oh
:-(
bad
it's working great for me
it doesn't work if the zones are mixed
but if both match, unzoned vs zoned it works fine
hmmm
Scott Leibrand
@scottleibrand
Oct 30 2015 07:18
old-iob gives me IOB that is sometimes up to 1U off, no idea why
Ben West
@bewest
Oct 30 2015 07:18
makes me suspect something not registered/checked in properly or something
that's bad
Scott Leibrand
@scottleibrand
Oct 30 2015 07:18
so I'm going down the road of replacing the whole calculate-iob thing with nate's
Ben West
@bewest
Oct 30 2015 07:18
ok, I could work in that direction
Scott Leibrand
@scottleibrand
Oct 30 2015 07:18
we have an untestable mess right now
Ben West
@bewest
Oct 30 2015 07:18
I really really like what he did with calculate insulins
he's been talking about separating carb-effect, insulin-effect, activity-effect, etc...
Scott Leibrand
@scottleibrand
Oct 30 2015 07:19
I worked with him a bunch tonight
Ben West
@bewest
Oct 30 2015 07:19
and he has a tool that's really really nice for understanding insulin-effect given medtronic istory
Scott Leibrand
@scottleibrand
Oct 30 2015 07:19
opened a few issues for features we need to use his stuff in oref0
Ben West
@bewest
Oct 30 2015 07:19
really like that
I created way to save the interstitial results that calculate-iob is creating
Scott Leibrand
@scottleibrand
Oct 30 2015 07:19
so in a week or so we should be able to start transitioning
Ben West
@bewest
Oct 30 2015 07:19
cool
awesome
was trying to understand difference between the two
so glad you were chatting about that
Scott Leibrand
@scottleibrand
Oct 30 2015 07:20
see the other #dev channel if you want to read scrollback
Ben West
@bewest
Oct 30 2015 07:21
awesome
so I'm in catch 22
will everyone
python is a lot nicer "UI" wise vis-a-vis the cli
tab-completion built in, the works
but.....
dcalc etc, has potential to work with NS as an include
CLI, wise, I found with ns tools, I wasn't sure what should be passed as the an arg-one
a few of the tools have a --config switch
which will print "how to register with openaps"
similar to pkg-config
Scott Leibrand
@scottleibrand
Oct 30 2015 07:23
yeah, I haven't figured that out yet
Ben West
@bewest
Oct 30 2015 07:23
yeah me neither
Scott Leibrand
@scottleibrand
Oct 30 2015 07:23
heh
reassuring. :)
Ben West
@bewest
Oct 30 2015 07:23
want to collect more experience, have a hacking session or something
Scott Leibrand
@scottleibrand
Oct 30 2015 07:23
we need to arrange something around d-data
Ben West
@bewest
Oct 30 2015 07:23
the last attempt, I created like 3 different ways to do same thing with different arg-one's
the bash scripts are short
Scott Leibrand
@scottleibrand
Oct 30 2015 07:23
and/or plan time to fly down there for a hackathon
Ben West
@bewest
Oct 30 2015 07:24
yeah
something around d-data
I'd be willing to split accomodations on site
maybe airbnb or similar
Scott Leibrand
@scottleibrand
Oct 30 2015 07:24
dana and I have a hotel already
Ben West
@bewest
Oct 30 2015 07:24
ah
Scott Leibrand
@scottleibrand
Oct 30 2015 07:24
not sure who all else is coming
Ben West
@bewest
Oct 30 2015 07:24
pretty sure tidepool is already renting house
Scott Leibrand
@scottleibrand
Oct 30 2015 07:25
we should get chris and nate down just for hacking if nothing else
Ben West
@bewest
Oct 30 2015 07:25
yeah
I figure it's fine to hardcode filenames in alias's
but not in "scripts" to be distrubted
Scott Leibrand
@scottleibrand
Oct 30 2015 07:25
ok, I need to get this treatment stuff documented before I forget it all
Ben West
@bewest
Oct 30 2015 07:25
so it's fine to create alias, eg
or "device"
which can host secret config
or use combination
which is hacky
but fine...
yeah, it's hacky
might not be worht documenting
maybe think through how it works
and make it work better/easier
then doc it
dunno
the upload tool has like 3-4 different ways to call it
there's a way to call it so both API_SECRET and NIGHTSCOUT_HOST are in crontab
so all secrets are in environment....
that's better for security maybe, but harder to hack on/debug
if it's in INI, it's easier to hack/debug, but harder to explain, distribute
so we have counteracting design trade offs to deal with
Scott Leibrand
@scottleibrand
Oct 30 2015 07:28
so is device even needed for latest-treatments if I don't need the secret in ini?
or can I just call it directly in an alias?
Ben West
@bewest
Oct 30 2015 07:28
you can if everyything...
so to take advantage of envrionemtn...
Scott Leibrand
@scottleibrand
Oct 30 2015 07:29
I was going to openaps device add latest-treatments process nightscout 'latest-openaps-treatment $NIGHTSCOUT_HOST'
which works, but seems overkill
I hate having so many calls to openaps: takes like 2 seconds to run each one
Ben West
@bewest
Oct 30 2015 07:29
right
I would add a bogus NS host
and then edit the INI manually
;-)
Scott Leibrand
@scottleibrand
Oct 30 2015 07:29
no
Ben West
@bewest
Oct 30 2015 07:30
that's what makes it a hack
Scott Leibrand
@scottleibrand
Oct 30 2015 07:30
I'm making this reproducible
even if it's not great, I need to be able to regenerate my config on all my pi's without thinking through how I did it
Ben West
@bewest
Oct 30 2015 07:30
so we need more --config patches
Scott Leibrand
@scottleibrand
Oct 30 2015 07:30
so I'm fine with coding in a hacky solution, as long as I can fully specify it
Ben West
@bewest
Oct 30 2015 07:30
or an openaps-config took, similar to pkg-config
you already have ton of custom scripts
would assume you can put it in ther
Scott Leibrand
@scottleibrand
Oct 30 2015 07:31
ya, that's what I'm doing
just figuring out the proper way to document there
Ben West
@bewest
Oct 30 2015 07:31
ah, right
so for the --config stuff
what I've been doing is a fake value and then sed'ing it
Scott Leibrand
@scottleibrand
Oct 30 2015 07:32
for this one, I could just use nightscout latest-openaps-treatment $NIGHTSCOUT_HOST directly in my alias, right?
no need to have a device for it?
Ben West
@bewest
Oct 30 2015 07:32
right
and then you could define the alias a simpel no-op device to get reports out of it
ye
also
ah
Scott Leibrand
@scottleibrand
Oct 30 2015 07:33
generally the kinds of things I'm doing with aliases don't really report anything useful
they either work or they don't
Ben West
@bewest
Oct 30 2015 07:33
ns-get type vs ns-get host is different
ns-get host $1 <NIGHTSCOUT_HOST> [entries.json] vs ns-get <entries.json> <NIGHTSCOUT_HOST>, I think
was playing around with different args
including --config
Scott Leibrand
@scottleibrand
Oct 30 2015 07:36
something like this?
    openaps alias add latest-ns-treatment-time '! bash -c "nightscout latest-openaps-treatment $NIGHTSCOUT_HOST |json created_at"'
    openaps alias add format-latest-nightscout-treatments '! bash -c "nightscout cull-latest-openaps-treatments monitor/pump-history-zoned.json $(openaps latest-ns-treatment-time)"'
    openaps alias add upload-recent-treatments '! bash -c "test $(json -f reporting/latest-treatments.json -a created_at eventType | wc -l ) -gt 0 && (openaps use  ns-upload shell treatments.json reporting/latest-treatments.json     )  || echo \"No recent treatments to upload\""'
Ben West
@bewest
Oct 30 2015 07:41
yeah, maybe
looks good at glance
Scott Leibrand
@scottleibrand
Oct 30 2015 07:41
I'll test it
but maybe not tonight
Ben West
@bewest
Oct 30 2015 07:41
might need some escapes, hard to tell
check out ns-get's --config if you ahve time
Scott Leibrand
@scottleibrand
Oct 30 2015 07:42
yeah, committed with a note to test later
Ben West
@bewest
Oct 30 2015 07:42
ns-upload also has a --config
Scott Leibrand
@scottleibrand
Oct 30 2015 07:42
remind me next time: brain is full right now
Ben West
@bewest
Oct 30 2015 07:42
idea was similar to pkg-config
Scott Leibrand
@scottleibrand
Oct 30 2015 07:42
I don't really know pkg-config, so that analogy won't work for me. :)
Ben West
@bewest
Oct 30 2015 07:42
pkg-config is a tool that simply rpints the right flags/commandline for compiling things
Scott Leibrand
@scottleibrand
Oct 30 2015 07:42
ah k
Ben West
@bewest
Oct 30 2015 07:42
so it's a tool used by tools to prin the right args
Scott Leibrand
@scottleibrand
Oct 30 2015 07:43
yeah, we could use that kind of thing. getting the args right on openaps add commands is a pain.
Ben West
@bewest
Oct 30 2015 07:43
right
Scott Leibrand
@scottleibrand
Oct 30 2015 07:44
I've built up quite an edifice of openaps commands
takes a few minutes to run through them all on a new pi
Ben West
@bewest
Oct 30 2015 07:44
yeah, python & node are expensive to start
python esp
Scott Leibrand
@scottleibrand
Oct 30 2015 07:44
I think the level of complexity is right back up to where it was with loop.sh :)
how hard would it be to keep python running and give it lots of stuff to do?
Ben West
@bewest
Oct 30 2015 07:45
ah, we're on cusp of that and rileylink
Scott Leibrand
@scottleibrand
Oct 30 2015 07:45
wonder if we couldn't halve our loop runtimes that way
Ben West
@bewest
Oct 30 2015 07:45
which should come first?
Scott Leibrand
@scottleibrand
Oct 30 2015 07:45
rileylink probably
mmblelink. :)
Ben West
@bewest
Oct 30 2015 07:46
ok, that was honest question
Scott Leibrand
@scottleibrand
Oct 30 2015 07:46
pi performance is only mildly annoying when developing
Ben West
@bewest
Oct 30 2015 07:46
I do like idea of node js mqtt daemons
Scott Leibrand
@scottleibrand
Oct 30 2015 07:46
carelink is always a problem, especially in real life
Ben West
@bewest
Oct 30 2015 07:46
electing each other, bailing out if problems...
Scott Leibrand
@scottleibrand
Oct 30 2015 07:46
let's keep it simple for now, but ya maybe eventually
I just want one RL working for starters. :)
Ben West
@bewest
Oct 30 2015 07:47
yeah, that's the thing, the stuff we have..
Scott Leibrand
@scottleibrand
Oct 30 2015 07:47
then we'll see what the range actually is, and what we need
Ben West
@bewest
Oct 30 2015 07:47
as complicated as openaps alias may get, it's easy to debug
Scott Leibrand
@scottleibrand
Oct 30 2015 07:47
yeah, like bash in a lot of ways
Ben West
@bewest
Oct 30 2015 07:47
an mqtt-agent/daemon of any kind raises new questions
Scott Leibrand
@scottleibrand
Oct 30 2015 07:47
even simpler sometimes
Ben West
@bewest
Oct 30 2015 07:48
right, exactly
ok, so I'll bump mmblelink
Scott Leibrand
@scottleibrand
Oct 30 2015 07:48
there are lots of simpler ways to do multi-RL setups, too, before we go full mqtt
Ben West
@bewest
Oct 30 2015 07:48
I've got family visiting
yeah, that's why I've been delaying looking at daemon/agents
but it's an obvious next step for prototyping, making more robust
thinking about when we have that
Scott Leibrand
@scottleibrand
Oct 30 2015 07:49
so you'll like my current ns-treatment-uploader: in screen:
while(true); do openaps invoke upload/pumphistory.zoned.json >/dev/null; openaps ns-treatments 2>/dev/null >/dev/null; date; cp upload/pumphistory.zoned.json upload/last-pumphistory.zoned.json; while(diff -q upload/pumphistory.zoned.json upload/last-pumphistory.zoned.json); do openaps invoke upload/pumphistory.zoned.json >/dev/null; echo -n .; sleep 30; done; done
Ben West
@bewest
Oct 30 2015 07:49
NS can tell openaps about operator's intent/expectations as well
Scott Leibrand
@scottleibrand
Oct 30 2015 07:50
that will run tonight, and then tomorrow I'll debug the new stuff
thx for the help
Ben West
@bewest
Oct 30 2015 07:50
no prob
sorry for the complexity here
there's sensitive info here, so...
Scott Leibrand
@scottleibrand
Oct 30 2015 07:50
yeah
personally I think we should mostly just stick with ENV variables for that
but I'm glad we have the flexibility
I also like the idea of documenting everything by the openaps blah add commands required to bootstrap it
Ben West
@bewest
Oct 30 2015 07:51
yeah, it turns out git calls lot of subshells with various env variables set
Scott Leibrand
@scottleibrand
Oct 30 2015 07:51
rather than by .ini
Ben West
@bewest
Oct 30 2015 07:52
and that's whole idea...
all the secret/local stuff is taken care of in ./.git/
ok yeah wasn't sure if secret IN would be prefered over INI
err, over ENV
if ENV is preffered, we can source . /etc/default/openaps
and a setup script can help also, install right defaults
the --config tool for upload is interesting though, play around with it
it shows how to sed a secret variable so it's not in public git
Scott Leibrand
@scottleibrand
Oct 30 2015 07:54
heh k
time for bed for me. thx again, and laters.
Ben West
@bewest
Oct 30 2015 07:54
it also converts plain api secret to hashed version
yeah, laters
:-D
Chris Oattes
@cjo20
Oct 30 2015 17:11
@bewest if you haven't seen it yet, http://xkcd.com/1597/
Scott Leibrand
@scottleibrand
Oct 30 2015 17:12
;-)
Bob Nye
@robertanye
Oct 30 2015 17:44
This message was deleted
Ali Mazaheri
@amazaheri
Oct 30 2015 19:11
@bewest if you haven't seen it yet, http://xkcd.com/1597/ That was awesome!
Peter Miller
@ochenmiller
Oct 30 2015 19:45
I've heard rumors that the Edison can be made to talk with CareLink... any hints or guidance before I sally forth?
Peter Miller
@ochenmiller
Oct 30 2015 20:11
Tomorrow marks one month for us using closed loop aps. We visit the endo next week, and I'm confident we'll see an entire percentage point drop in a1c.
Dana Lewis
@danamlewis
Oct 30 2015 20:38
:D
Ben West
@bewest
Oct 30 2015 21:20
@amazaheri that comic makes me headdesk
Scott Leibrand
@scottleibrand
Oct 30 2015 21:36
heh, you're the friend he's talking about. :)
Ben West
@bewest
Oct 30 2015 21:38
lol, I just saw the alt text
I like this one https://xkcd.com/1168/
Scott Leibrand
@scottleibrand
Oct 30 2015 21:38
:)
Ali Mazaheri
@amazaheri
Oct 30 2015 22:13
:)
[tab][tab]
Scott Leibrand
@scottleibrand
Oct 30 2015 22:16
we should get you a custom emoji for that. ;-)
LadyViktoria
@LadyViktoria
Oct 30 2015 22:18
:D
Milos Kozak
@MilosKozak
Oct 30 2015 22:19
heh did you remove command prompt? :)
Ali Mazaheri
@amazaheri
Oct 30 2015 22:20
:)