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

14th
Nov 2015
Rachel Sandlain
@audiefile
Nov 14 2015 00:38
@eyim this tool might help with updating to dev. (I recommend creating a second site and not testing things on your only site)
Tim Howard
@tghoward
Nov 14 2015 00:42
We are up and passing data up to nightscout using oref0! Very happy but (!!) it seems to be very slow. I don't know if this is what to expect or I've got something set up wrong. It is more likely the latter. My setup: Mongo sandbox; Azure Basic plan (upgraded from Free).
Ben West
@bewest
Nov 14 2015 00:42
what part feels slow?
the azure part?
do you ssh in to your rasperry pi and tail -f /var/log/syslog?
Tim Howard
@tghoward
Nov 14 2015 00:43
I go to the website (azure) and it takes forever (or never) to show data
Yes, in /var/log/syslog, it seems to go through the calls pretty quickly
but there are some errors I was going bring up later --- I think unrelated
Ben West
@bewest
Nov 14 2015 00:44
do you see 401 unauthorized anywhere?
could be related
Tim Howard
@tghoward
Nov 14 2015 00:44
On the website? I don't think so
Ben West
@bewest
Nov 14 2015 00:44
or in the syslog
Tim Howard
@tghoward
Nov 14 2015 00:44
I'll check the syslog
lots of BAD AILING
Ben West
@bewest
Nov 14 2015 00:45
hmm, probably ok
unless it's all bad ailing
but it should also say FAIL and blow up if it's really a problem
I've been thinking about removing that message
Tim Howard
@tghoward
Nov 14 2015 00:46
hmm, right now might not be normal.
Ben West
@bewest
Nov 14 2015 00:46
can you unplug/replug?
Tim Howard
@tghoward
Nov 14 2015 00:47
yes, I'll reboot
Ben West
@bewest
Nov 14 2015 00:47
ooo, or try
oh
oref0-reset-usb I think
yeah
Tim Howard
@tghoward
Nov 14 2015 00:47
oop, too late, sorry
but this isn't really related to azure taking forever to showing my site, right?
... might as well just put it out there
Ben West
@bewest
Nov 14 2015 00:48
hmm, that is very slow
there should be a logs area
there's some logging area in one of the drop down thingies
Tim Howard
@tghoward
Nov 14 2015 00:50
log stream .. ok
connecting .... ....
Ben West
@bewest
Nov 14 2015 00:50
in your azure portal/dashboard, for the nightscout site, there's an area that has traffic quotas/graph
wonder if somehow maybe they are slowing it down if you've exceeded quota
Tim Howard
@tghoward
Nov 14 2015 00:52
yesterday I exceeded some quotas and I needed to upgrade. On basic plan now
that was day 1 of running
Ben West
@bewest
Nov 14 2015 00:52
oh, hmmmm switching to basic itself should have redeployed
and should result in awesomesauce
Tim Howard
@tghoward
Nov 14 2015 00:52
haha. no awesomesauce here
Ben West
@bewest
Nov 14 2015 00:53
might ask @amazaheri, hmmm
Tim Howard
@tghoward
Nov 14 2015 00:53
see these types of records? found a glucose value without any units, maybe from an old version?
I expect I need to clean up formatting ... but that wouldn't halt the speed, would it?
Ben West
@bewest
Nov 14 2015 00:55
no, I don't think so
it's not crashing or anything?
Tim Howard
@tghoward
Nov 14 2015 00:56
and redundant records? the system can handle those? (e.g. I send up the same record over and over?)
Ben West
@bewest
Nov 14 2015 00:56
oy
ok
:-)
Tim Howard
@tghoward
Nov 14 2015 00:56
:smile:
someday I'll clean it up. Really! :smile:
Ben West
@bewest
Nov 14 2015 00:57
ns-dedupe-treatments delete bewest.labs.diabetes.watch $API_SECRET
I use this
use it now :-D
Tim Howard
@tghoward
Nov 14 2015 00:57
roger that. :smile:
Ben West
@bewest
Nov 14 2015 00:57
maybe multiple times if it says more than 40 per
it's conceivable that could be the issue
Tim Howard
@tghoward
Nov 14 2015 00:59
hmm. it seems to be working on it
Ben West
@bewest
Nov 14 2015 01:00
if there are dupes, it should print a count and the command it's running to remove them
Tim Howard
@tghoward
Nov 14 2015 01:01

'''
pi@betacb ~/bcb-s $ ns-dedupe-treatments delete $NIGHTSCOUT_HOST $API_SECRET

'''

just sitting there
Ben West
@bewest
Nov 14 2015 01:01
yeah, I couldn't load your site at all, really
so, the first thing is a request to get treatments
so if it's already clogged
maybe restart the site?
Tim Howard
@tghoward
Nov 14 2015 01:02
that I can do
Scott Leibrand
@scottleibrand
Nov 14 2015 01:03
the nuclear option would be to delete everything in the treatments collection in mongolabs
or maybe before that, go look and see how many records it has
Tim Howard
@tghoward
Nov 14 2015 01:03
it has LOTS of records
Ben West
@bewest
Nov 14 2015 01:03
or just tell c-r-m to use a treatments with a different name
like new_treatments
Scott Leibrand
@scottleibrand
Nov 14 2015 01:04
can you rename a collection in mongolab?
Tim Howard
@tghoward
Nov 14 2015 01:04
well. 21K records
Ben West
@bewest
Nov 14 2015 01:04
you can use a new one
Scott Leibrand
@scottleibrand
Nov 14 2015 01:04
lol
Ben West
@bewest
Nov 14 2015 01:04
21k isn't a hwole lot
Scott Leibrand
@scottleibrand
Nov 14 2015 01:04
yeah, but rename will be easier down the line
for as long as he's been using it it is
Ben West
@bewest
Nov 14 2015 01:04
if he restarts, he can probably use the script
to dedupe
Scott Leibrand
@scottleibrand
Nov 14 2015 01:04
that'd be best
Ben West
@bewest
Nov 14 2015 01:04
then no changes
right now, the server has kept all those in memory
Tim Howard
@tghoward
Nov 14 2015 01:05
pi@betacb ~/bcb-s $ ns-dedupe-treatments delete $NIGHTSCOUT_HOST $API_SECRET
2 + curl -X DELETE -H 'API-SECRET: ' https://bcbsarah.azurewebsites.net/api/v1/treatments/564678f2b38217c41183a5a6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>502 - Web server received an invalid response while acting as a gateway or proxy server.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;} 
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;} 
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} 
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
 <div class="content-container"><fieldset>
  <h2>502 - Web server received an invalid response while acting as a gateway or proxy server.</h2>
  <h3>There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.</h3>
 </fieldset></div>
</div>
</body>
</html>
Ben West
@bewest
Nov 14 2015 01:05
great
Scott Leibrand
@scottleibrand
Nov 14 2015 01:05
@tghoward you'll also want to get your uploader updated to only upload new
Ben West
@bewest
Nov 14 2015 01:05
you need to export API_SECRET=<hashed-api-secret-here>
you can probably copy paste from crontab -l
in fact
Tim Howard
@tghoward
Nov 14 2015 01:06
my api-secret already is hashed?
Ben West
@bewest
Nov 14 2015 01:06
do this:
Tim Howard
@tghoward
Nov 14 2015 01:06
and in environments
Ben West
@bewest
Nov 14 2015 01:06
. <(crontab -l | grep API_SECRET)
that will import your API_SECRET in your current env so it matches what's in your crontab
then run taht script like that again
Tim Howard
@tghoward
Nov 14 2015 01:07
pi@betacb ~/bcb-s $ echo $API_SECRET e7b644ad0732c4ed781eeede289aabe3b424da02
Scott Leibrand
@scottleibrand
Nov 14 2015 01:08
now you have to change it
Ben West
@bewest
Nov 14 2015 01:08
hehe,
Tim Howard
@tghoward
Nov 14 2015 01:08
really? shucks
Ben West
@bewest
Nov 14 2015 01:08
not before I help you
Scott Leibrand
@scottleibrand
Nov 14 2015 01:08
especially if you ever want to pull down glucose from NS into openaps
Tim Howard
@tghoward
Nov 14 2015 01:08
:smile:
Scott Leibrand
@scottleibrand
Nov 14 2015 01:08
but yeah, get it fixed up first
once you get dedupe figured out, you can do this latest-ns-treatment-time thing to only upload latest record(s):
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/pumphistory-zoned.json settings/model.json $(openaps latest-ns-treatment-time) > upload/latest-treatments.json"'
openaps alias add upload-recent-treatments '! bash -c "openaps format-latest-nightscout-treatments && test $(json -f upload/latest-treatments.json -a created_at eventType | wc -l ) -gt 0 && (ns-upload $NIGHTSCOUT_HOST $API_SECRET treatments.json upload/latest-treatments.json ) || echo \"No recent treatments to upload\""'
scottleibrand @scottleibrand &
scottleibrand @scottleibrand idly wonders how many people here will get that
Tim Howard
@tghoward
Nov 14 2015 01:10
Yes, I thought I had it doing that (checking only for latest), but obviously not
Ben West
@bewest
Nov 14 2015 01:10
ok, I got a very very slow response from status.json
nothing from dedupe yet
Tim Howard
@tghoward
Nov 14 2015 01:12
so I should not try deduping from here, right?
I'd also be ok with just clearing the collection on mongo
@scottleibrand were you deduping yourself? I didn't get it ...
Ben West
@bewest
Nov 14 2015 01:14
you should try too
I doubt scott is trying
Tim Howard
@tghoward
Nov 14 2015 01:14
ok.
Ben West
@bewest
Nov 14 2015 01:16
hmm, not sure
Tim Howard
@tghoward
Nov 14 2015 01:17
nothing from dedupe here, yet
Ben West
@bewest
Nov 14 2015 01:17
right now I'd try setting treatments collection to new_treatments or something just to see if it's fast after that
looks like my script is timing out
Tim Howard
@tghoward
Nov 14 2015 01:17
so, make a new collection in mongo
Ben West
@bewest
Nov 14 2015 01:17
no, just set a new one in the connection strings
c-r-m will create it for you
just needs to know the name
Tim Howard
@tghoward
Nov 14 2015 01:17
oh, ok
Ben West
@bewest
Nov 14 2015 01:18
the default name is treatments, but you can set it to anything else, and c-r-m will make it for you
scottleibrand @scottleibrand & is me backgrounding myself. ;-)
Tim Howard
@tghoward
Nov 14 2015 01:19
I don't have a string for treatments
is the name "mongo_treatments" ?
or singular. mongo_treatment
Ben West
@bewest
Nov 14 2015 01:20
in connection strings, you can set MONGO_TREATMENTS_COLLECTION = my_new_treatments, "custom" type
name is MONGO_TREATMENTS_COLLECTION
Tim Howard
@tghoward
Nov 14 2015 01:22
ok. new_treatments set
awesome! New table at mongo just appeared
Ben West
@bewest
Nov 14 2015 01:23
ok, so that confirms your treatments dupes were causing issue
Tim Howard
@tghoward
Nov 14 2015 01:24
and. Bam. Nightscout page loads!
Ben West
@bewest
Nov 14 2015 01:24
yeah, fast now
Tim Howard
@tghoward
Nov 14 2015 01:24
Ok. So I need to work harder to NOT send dupes
Thanks so much for the help @bewest and @scottleibrand
Ben West
@bewest
Nov 14 2015 01:26
you just going to burn the old treatments?
if you don't care for it and want to return to default, you can remove the collection in mongolab
or, we can figure out how to dedupe your existing collectoin later
Tim Howard
@tghoward
Nov 14 2015 01:28
I'm fine with being in test mode .. and so deleting that collection.
but maybe I'll sit on it for a while in case it can be deduped at some time :smile:
Ben West
@bewest
Nov 14 2015 01:28
:-)
might be fun
way I would do it is "trickle" some of them in using mongo command line
Tim Howard
@tghoward
Nov 14 2015 01:30
and then deduping the 'master' ?
Ben West
@bewest
Nov 14 2015 01:30
hmm, dunno, lots of ways
yeah
but you have to delete the ones you "move/copy" or you won't know when you're done
Tim Howard
@tghoward
Nov 14 2015 01:33
is it easy to change the table name that ns-dedupe-treatments hits on?
Ben West
@bewest
Nov 14 2015 01:33
no need
it uses rest api
Tim Howard
@tghoward
Nov 14 2015 01:33
oh!
Ben West
@bewest
Nov 14 2015 01:34
but it could be modified probably to use the mongo cli
get list of dupes out, delete them
Tim Howard
@tghoward
Nov 14 2015 01:35
So, just so I fully get this. Is this the path: data goes from Rpi -> azure server -> mongo -> azure -> my browser?
Ben West
@bewest
Nov 14 2015 01:35
right, the Nightscout c-r-m site on azure is hosting all the data access
Tim Howard
@tghoward
Nov 14 2015 01:35
what does c-r-m stand for?
Ben West
@bewest
Nov 14 2015 01:36
rpi sends the data cgm-remote-monitor (c-r-m)
cgm-remote-monitor is the code running on Azure
it has the rest API and the webapp
Tim Howard
@tghoward
Nov 14 2015 01:36
right. knew that. sorry
Ben West
@bewest
Nov 14 2015 01:36
no worries :D
Ali Mazaheri
@amazaheri
Nov 14 2015 01:37
@tghoward and be nice to Azure lol glad ots resolved.
Ben West
@bewest
Nov 14 2015 01:37
we love azure, sorry for filling your memory banks
Tim Howard
@tghoward
Nov 14 2015 01:37
Whew! trying not to break anything! :smile:
Ben West
@bewest
Nov 14 2015 01:37
nah, it's c-r-m's fault
Ali Mazaheri
@amazaheri
Nov 14 2015 01:40
lol
i
havent
tried ns upload yet
This message was deleted
This message was deleted
Tim Howard
@tghoward
Nov 14 2015 01:42
certainly not c-r-m's fault
but of course we love Azure!
why wasn't this culling my treatments??
format-latest-nightscout-treatments = ! bash -c "nightscout cull-latest-openaps-treatments monitor/pumphistory-zoned.json settings/model.json $(nightscout latest-openaps-treatment $NIGHTSCOUT_HOST) > upload/latest-treatments.json"
lousy format.
format-latest-nightscout-treatments = ! bash -c "nightscout cull-latest-openaps-treatments monitor/pumphistory-zoned.json settings/model.json $(nightscout latest-openaps-treatment $NIGHTSCOUT_HOST) > upload/latest-treatments.json"
Ben West
@bewest
Nov 14 2015 01:57
hmmm
I broke mine up into two
o$ cat format-latest-nightscout-treatments.ini 
[device "format-latest-nightscout-treatments"]
fields = 
cmd = bash -c
args = "nightscout cull-latest-openaps-treatments monitor/pump-history-zoned.json model.json $(openaps latest-ns-treatment-time)"  --

bewest@hither:~/Documents/foo$
I have that as a device so I get a report containing the treatments to be uploaded
foo$ openaps alias show latest-ns-treatment-time
latest-ns-treatment-time ! bash -c "openaps use latest-treatments shell |json created_at"
bewest@hither:~/Documents/foo$
oy, heh
rabbit hole
oo$ cat latest-treatments.ini 
[device "latest-treatments"]
fields = 
cmd = nightscout
args = latest-openaps-treatment bewest.labs.diabetes.watch

bewest@hither:~/Documents/foo$
Tim Howard
@tghoward
Nov 14 2015 02:04
changed my api-secret. I expect I'll be sharing it again with you some time soon :smile:
Ali Mazaheri
@amazaheri
Nov 14 2015 02:05
Tim Howard
@tghoward
Nov 14 2015 02:05
how did you guess????
@bewest but what I have should have worked, right?
Scott Leibrand
@scottleibrand
Nov 14 2015 02:07
heh, one wifi password I use regularly is P@ssw0rd (seriously)
Ben West
@bewest
Nov 14 2015 02:08
I think it's the redirect > at the end maybe?
if you take that out does it doe something?
Scott Leibrand
@scottleibrand
Nov 14 2015 02:08
which is actually fine, if you don't mind random people being able to use it. doesn't give them ability to eavesdrop on established sessions
@bewest do you mean the > upload/latest-treatments.json ?
Ben West
@bewest
Nov 14 2015 02:09
yeah
are you doing that?
I'm not doing that anywhere like that
Scott Leibrand
@scottleibrand
Nov 14 2015 02:10
that's to avoid having yet another device and report
the alias writes its output to that file
Ben West
@bewest
Nov 14 2015 02:10
that's the whole point of having device and report is to do that for you :-)
Scott Leibrand
@scottleibrand
Nov 14 2015 02:10
sure, I could add 3x the complexity
if you don't need the audit trail provided by report, making your shell into devices is a royal pain to get right and troubleshoot
as evidenced by how many people can't actually do it without manually twiddling the .ini
Tim Howard
@tghoward
Nov 14 2015 02:12
looks like the call works (no new tmts)
pi@betacb ~/bcb-s $ nightscout cull-latest-openaps-treatments monitor/pumphistory-zoned.json settings/model.json $(nightscout latest-openaps-treatment $NIGHTSCOUT_HOST)
[]
pi@betacb ~/bcb-s $
I gotta agree that with @scottleibrand . I'm a pretty linear thinker and the complexity isn't really linear anymore.
Ben West
@bewest
Nov 14 2015 02:13
in this case you are trying to prep the latest treatments
that should definitely be a report from some device
it'd be nice if it was a simple one liner
Scott Leibrand
@scottleibrand
Nov 14 2015 02:14
I think you've extended the "device" metaphor a bit too far
Ben West
@bewest
Nov 14 2015 02:14
but since we just started doing this, the tools are all prototype messes
Tim Howard
@tghoward
Nov 14 2015 02:14
right. Sarah just had to replace the sensor. No new data for two more hours
Ben West
@bewest
Nov 14 2015 02:14
patches welcome :-)
Scott Leibrand
@scottleibrand
Nov 14 2015 02:14
yeah, this one is hard to just patch
Ben West
@bewest
Nov 14 2015 02:14
it's really not that hard to patch
not all tools need to be devices
Scott Leibrand
@scottleibrand
Nov 14 2015 02:14
conceptually, what I want is a device+report "thing" for process commands
Ben West
@bewest
Nov 14 2015 02:15
in this case it'd be nice to use some existing device to create the right repot
Scott Leibrand
@scottleibrand
Nov 14 2015 02:15
maybe even just give reports the ability to directly run external scripts
Ben West
@bewest
Nov 14 2015 02:16
there are lots of ways to do that by patching the tools or by making python tools, which make providing more than one use even easier
as-is, I think if we re-organize the tools and what $1 means, it'll become a lot easier pretty quickly
Scott Leibrand
@scottleibrand
Nov 14 2015 02:16
that might help
Ben West
@bewest
Nov 14 2015 02:16
anything that needs host or api-secret should be a single dveice
then you can have many many uses with report or not
so it's been incremental, stubbing out tools to do things, creating little --config scripts to automate the typing, etc...
once we get everything laid out we can do a critical review and re-organize and make it easier
Scott Leibrand
@scottleibrand
Nov 14 2015 02:17
I'm thinking something like "openaps report add upload/latest-treatments.json shell some-command command-arguments"
where the "shell" keyword tells it to look for a command in your $PATH instead of a device
or something along those lines
Ben West
@bewest
Nov 14 2015 02:18
you can do that now
that's what I just demoed
Scott Leibrand
@scottleibrand
Nov 14 2015 02:18
without defining the command as a device?
and without coding it into an existing device?
Ben West
@bewest
Nov 14 2015 02:18
you can add arbitrary args to a shell device for different reports
in terms of configuring, please look at the --config switches on some of those wrapper tools
they can automate the desired workflow in oneliner
Scott Leibrand
@scottleibrand
Nov 14 2015 02:20
let's say I want to concatenate two files using cat. can I do that just by doing something like openaps report add combinedfile.txt text shell cat file1 file2 ?
Ben West
@bewest
Nov 14 2015 02:20
I added cat as a device
Scott Leibrand
@scottleibrand
Nov 14 2015 02:21
should adding cat as a device be necessary though?
Ben West
@bewest
Nov 14 2015 02:21
so yeah, openaps report add combined.txt text cat shell file1 file2
Scott Leibrand
@scottleibrand
Nov 14 2015 02:21
what other config was required to make cat work like that?
I'm trying to argue for a general capability in report to run arbitrary commands from $PATH that doesn't have any dependencies that have to be pre-configured
Ben West
@bewest
Nov 14 2015 02:22
that's what your shell scripts are for
Scott Leibrand
@scottleibrand
Nov 14 2015 02:22
we're close to that today, but I think going that one step further would simplify things tremendously
Ben West
@bewest
Nov 14 2015 02:22
no, we need to continue the discipline we've been applying
lay out everythign that's happening and re-organize it so it's streamlined
that alone will reduce the number of "devices"
Scott Leibrand
@scottleibrand
Nov 14 2015 02:23
not sure I follow you
Ben West
@bewest
Nov 14 2015 02:23
combined with --config helpers, it'll be a one liner for lot of config stuff
Scott Leibrand
@scottleibrand
Nov 14 2015 02:24
I guess I need you to help me understand the --config stuff
you seem to think that's a solution, but I don't understand how to use it yet
Ben West
@bewest
Nov 14 2015 02:24
so organization, wise, you might have noticed I introduced an $1 to ns-upload and made it more generic
so it can be re-used for different kinds of data... any type, actually
so that means treatments vs entries no longer need two devices
just one
lot of things will continue to go that route
secondly, the "devices" that remain, we can have --config swches... try...
Scott Leibrand
@scottleibrand
Nov 14 2015 02:25
so the $1 stuff just a way to write all your scripts in one, right?
Ben West
@bewest
Nov 14 2015 02:25
or dispatch to a better named one
it's a way to organize things
Scott Leibrand
@scottleibrand
Nov 14 2015 02:26
maybe my holdup with --config is I've never seen them useful for anything other than storing secrets in .ini files, which I don't want to do
since in that case they're not reducing complexity, just moving it from ENV vars into .ini
do you have a good example of another thing --config is good for, hopefully that simplifies setup?
Ben West
@bewest
Nov 14 2015 02:27
right, need both things to happen
--config simplifies setup into one liner
eg, right now
there are 4 tools called mm-format-ns-foobar
if you wanted reports from each you'd need four devices
a tool that takes $1 means you only need one device
Scott Leibrand
@scottleibrand
Nov 14 2015 02:29
is there any way to use --config to reduce the number of things I have to do in https://github.com/scottleibrand/openaps-sh/blob/dev/ns-uploader-setup.sh ?
Ben West
@bewest
Nov 14 2015 02:32
yeah, I think we need tools that eliinate the need for all the alias
which means reorganizing and patching the tools themselves
Scott Leibrand
@scottleibrand
Nov 14 2015 02:34
any way to use any existing --config stuff to start on that? or do we have to write new tools with --config's?
Ben West
@bewest
Nov 14 2015 02:34
was just looking
Scott Leibrand
@scottleibrand
Nov 14 2015 02:34
k
just removed a few unnecessary things and pushed, if you want to refresh
Ben West
@bewest
Nov 14 2015 02:34
ah
ns-upload --config is interesting
it should be possible to eg, . <(ns-upload --config $NIGHTSCOUT_HOST $API_SECRET treatments.json new-treatments/latest.json)
actually
it's the plain api secret
not the hashed one
this tool hashes your plain thing for you
Scott Leibrand
@scottleibrand
Nov 14 2015 02:36
$ ns-upload --config nshost secret treatments.json monitor/pumphistory-zoned.json test.json
openaps device add ns-upload process --require "type report" ns-upload "ns-upload-NIGHTSCOUT" "ns-upload-APIKEY"
sed -i -e "s/ns-upload-NIGHTSCOUT/nshost/g" ns-upload.ini
sed -i -e "s/ns-upload-APIKEY/e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4/g" ns-upload.ini
openaps report add test.json text ns-upload shell "treatments.json" "monitor/pumphistory-zoned.json"
so is that suggesting I run those four lines to set up my config?
Ben West
@bewest
Nov 14 2015 02:37
or drop it into . <(...)
Scott Leibrand
@scottleibrand
Nov 14 2015 02:37
yeah
Ben West
@bewest
Nov 14 2015 02:37
or | bash
the ugliness there goes the extra mile to ensure the secret is not in git log either
Scott Leibrand
@scottleibrand
Nov 14 2015 02:38
k
Ben West
@bewest
Nov 14 2015 02:38
I think we'll want some new similar ones...
oref0-setup-my-monitors ...
Scott Leibrand
@scottleibrand
Nov 14 2015 02:38
I'd like to try doing that on some non-secret stuff
Ben West
@bewest
Nov 14 2015 02:38
and it just prints nice templated thing
Scott Leibrand
@scottleibrand
Nov 14 2015 02:39
as I think it does have a lot of promise for abstracting away a lot of the unnecessary complexity, and leaving just the "what do you really want to do" parts
Ben West
@bewest
Nov 14 2015 02:39
doesn't have to be --config switch
can be it's own tool that walks someone through
right
Scott Leibrand
@scottleibrand
Nov 14 2015 02:39
yeah, that's what I'm trying to write, basically
Ben West
@bewest
Nov 14 2015 02:40
and also making some special oref0 tools that just make some assumptions
we can start organizing/codifying "good standard/practice is these reports go in settings/ vs monitor/ etc
oref0-setup-medtronic 665455
it's called pump, done
or mayne oref1?
Scott Leibrand
@scottleibrand
Nov 14 2015 02:41
would love to get this script into a centralized place and start refactoring it to pull the current complexity out into simpler pieces like that
Ben West
@bewest
Nov 14 2015 02:42
oref1 can assume pump is called pump
can assume ns devices are organized certain way
can define oref1 as ns uploader device
stage 1 monitor :-)
Scott Leibrand
@scottleibrand
Nov 14 2015 02:43
yeah, I like that. oref1 = openaps ns-uploader
we can make that one a lot more plug-and-play since it'd be read-only
Ben West
@bewest
Nov 14 2015 02:43
right, potentially even curl ... | bash that sucker
Scott Leibrand
@scottleibrand
Nov 14 2015 02:44
yep, modulo serial number and NS site info
Ben West
@bewest
Nov 14 2015 02:44
it can ask them for that
or assume env maybe
Scott Leibrand
@scottleibrand
Nov 14 2015 02:45
yeah
Ben West
@bewest
Nov 14 2015 02:45
I have a resin.io that assumes env variables
that's nice because they have nice dashboard that shows progress
nice, oref1-setup-ns-devices nightscout-host api-secret maybe as one of the tools
oref1-setup-{uploader,monitor}-reports
Scott Leibrand
@scottleibrand
Nov 14 2015 02:49
how do you think oref0 and oref1 should share code? should we just put oref1 in the oref0 repo?
if I took this script and made it something like oref1-setup.sh in a wip/oref1 branch of oref0, would that be enough to get us started, and let you and others start refactoring it?
Ben West
@bewest
Nov 14 2015 03:06
would they need to share codee?
not sure they need to
Scott Leibrand
@scottleibrand
Nov 14 2015 03:11
oref1 is a subset of oref0 I'd think
so they'd share things like mm-format-ns-treatments.sh, mm-format-ns-pump-history.sh, ns-upload-entries.sh, ns-upload.sh, ns-dedupe-treatments.sh, mm-format-ns-glucose.sh, etc.
is ns-upload-entries.sh entirely deprecated by ns-upload.sh now?
Ben West
@bewest
Nov 14 2015 03:37
if oref0 is installed, why do they need to be shaed?
the scripts can just call out to ns-upload-entries
oref0 is a prereq for oref1
the scripts in oref1 would use the scripts in oref0 or use require where needed
Scott Leibrand
@scottleibrand
Nov 14 2015 03:54
ok, that works
so create a new oref1 repo then when we're ready to package it? or should we do that now?
Ben West
@bewest
Nov 14 2015 03:55
yeah, can do it now
npm init will stub out a new package.json
Scott Leibrand
@scottleibrand
Nov 14 2015 05:03
do we need to do a release of openaps 0.0.8? curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - just installed 0.0.7: isn't that missing some performance fixes?
Ben West
@bewest
Nov 14 2015 05:03
yeah, there are several outstanding branches in openaps core
Scott Leibrand
@scottleibrand
Nov 14 2015 05:05
need reviews on any of them?
Ben West
@bewest
Nov 14 2015 05:06
openaps/openaps#67
requires release of dexcom_reader as well
openaps/openaps#66
Scott Leibrand
@scottleibrand
Nov 14 2015 05:12
so #66 should allow me to simplify this... can I get it down to a series of pipes?
openaps alias add format-latest-nightscout-treatments '! bash -c "nightscout cull-latest-openaps-treatments monitor/pumphistory-zoned.json settings/model.json $(openaps latest-ns-treatment-time) > upload/latest-treatments.json"'
openaps alias add upload-recent-treatments '! bash -c "openaps format-latest-nightscout-treatments && test $(json -f upload/latest-treatments.json -a created_at eventType | wc -l ) -gt 0 && (ns-upload $NIGHTSCOUT_HOST $API_SECRET treatments.json upload/latest-treatments.json ) || echo \"No recent treatments to upload\""'
not sure what to do with the test $(json -f upload/latest-treatments.json -a created_at eventType | wc -l ) -gt 0
just | json -a created_at eventType maybe?
scottleibrand @scottleibrand experiments. if that works, it'll be a good test of #66
Scott Leibrand
@scottleibrand
Nov 14 2015 05:26
hmm, guess that doesn't simplify things. I'd have to add an openaps device for ns-upload to do that
oh, this seems to work: openaps alias add upload-latest-treatments '! bash -c "nightscout cull-latest-openaps-treatments monitor/pumphistory-zoned.json settings/model.json $(nightscout latest-openaps-treatment $NIGHTSCOUT_HOST | json created_at) | openaps use --format text oref0 shell ns-upload treatments.json"'
now to see if it's actually uploading anything. :)
eyim
@eyim
Nov 14 2015 05:42
@audiefile Hi Rachel - I didn't see a link to the tools you were suggesting for getting a dev version of NS up. Did I miss it?
Scott Leibrand
@scottleibrand
Nov 14 2015 05:46
@bewest: can't seem to get that syntax to work, but the new version isn't causing my loop to break, so I'll go ahead adn merge #66 and we can figure out the rest later.
should we hold on openaps/openaps#67 until we release dexcom_reader?
Jason Calabrese
@jasoncalabrese
Nov 14 2015 05:50
Back home and a corrupt git repo on my pi, but it worked most of the time I was away
Is it worth trying to fix it, or just move my private ini's away and reclone the repo?
Scott Leibrand
@scottleibrand
Nov 14 2015 05:54
did you back up the repo already?
Jason Calabrese
@jasoncalabrese
Nov 14 2015 05:54
Yeah, I push to github on each loop
Scott Leibrand
@scottleibrand
Nov 14 2015 05:54
then yeah, just re-clone the last good one IMO
Jason Calabrese
@jasoncalabrese
Nov 14 2015 05:55
So trying to fix it would be just to maybe help figure out what happened, and learn how to fix it
Scott Leibrand
@scottleibrand
Nov 14 2015 05:55
IMO that's the first step: making it auto-recover back to last known good version
then it can re-download pumphistory and only thing it'll lose is maybe some enact records
Jason Calabrese
@jasoncalabrese
Nov 14 2015 05:57
Would need to setup remotes again
Scott Leibrand
@scottleibrand
Nov 14 2015 05:57
sweet, oref1-setup.sh works
Jason Calabrese
@jasoncalabrese
Nov 14 2015 05:57
So oref1 is just the NS upload stuff?
Scott Leibrand
@scottleibrand
Nov 14 2015 05:57
only thing I had to do manually was paste my API_SECRET and NIGHTSCOUT_HOST into cron. make it prompt for those and we can have a simple openaps nightscout uploader setup
yeah, that's what we started calling it tonight
Jason Calabrese
@jasoncalabrese
Nov 14 2015 05:58
Think that might to confuse people
Scott Leibrand
@scottleibrand
Nov 14 2015 05:58
yeah, perhaps too clever
suggestions?
Jason Calabrese
@jasoncalabrese
Nov 14 2015 05:59
Would we have 2, 3, 4, etc for other tools
Scott Leibrand
@scottleibrand
Nov 14 2015 06:00
well 1 maps to phase 1, monitor
but beyond that, dunno
could just call it openaps-ns-uploader :)
Jason Calabrese
@jasoncalabrese
Nov 14 2015 06:00
Oh
So we move the predict to 2
Scott Leibrand
@scottleibrand
Nov 14 2015 06:00
haven't thought that far ahead
Ben West
@bewest
Nov 14 2015 06:39
Yeah, predict could be 2
More interactive phase
Control 3 maybe
Jason Calabrese
@jasoncalabrese
Nov 14 2015 07:14
maybe be even more explicit
oref-monitor, oref-predict, oref-control
where oref-control is your own instance
I'd like to have a way to fork it in an anonymous/semi-anonymous way
Scott Leibrand
@scottleibrand
Nov 14 2015 07:16
oref by itself doesn't make much sense, so that'd probably be oref0-monitor etc.
Jason Calabrese
@jasoncalabrese
Nov 14 2015 07:16
so everyone pushes to github, but you don't know who it is
oref-monitor = openaps reference monitor?
maybe oref-predict0
Scott Leibrand
@scottleibrand
Nov 14 2015 07:35
Yeah, maybe oref-monitor would work... Or oref-ns-uploader...
Jason Calabrese
@jasoncalabrese
Nov 14 2015 07:49
it's more than ns-uploader
Scott Leibrand
@scottleibrand
Nov 14 2015 07:49
not yet. :)
Jason Calabrese
@jasoncalabrese
Nov 14 2015 07:49
theres going to be sync
the the last treatment check we have a very basic sync
still WIP, and will need renamed / moved
Jason Calabrese
@jasoncalabrese
Nov 14 2015 07:51
nice
like standardizing the common stuff
Scott Leibrand
@scottleibrand
Nov 14 2015 07:51
exactly
and this will provide a target for a lot of the refactoring Ben wants us to do
Jason Calabrese
@jasoncalabrese
Nov 14 2015 07:52
yeah, tons to do in that area
get full monitoring in place, with alerts, etc
I'm going to use the 522 during the day tomorrow
mostly not looping, but a little here and there
and if it goes ok, run it most of the night
Scott Leibrand
@scottleibrand
Nov 14 2015 07:54
nice
Jason Calabrese
@jasoncalabrese
Nov 14 2015 07:54
only way to get the iob right without making things extra complicated
and need to test/trust the pump anyway
Scott Leibrand
@scottleibrand
Nov 14 2015 07:55
yeah, trust is a big thing. once you do start to trust it, I suspect you'll find that incorrect IOB doesn't matter much. we had times when IOB calculation wasn't working at all, and it still did reasonable temps
all the other safety checks built into determine-basal really work well even with IOB wrong
deviation, BGI, etc.
Jason Calabrese
@jasoncalabrese
Nov 14 2015 07:56
Screen Shot 2015-11-13 at 11.55.49 PM.png
Scott Leibrand
@scottleibrand
Nov 14 2015 07:57
I'm seeing a lot of those
Jason Calabrese
@jasoncalabrese
Nov 14 2015 07:57
would be easy to trigger an alarm for that
Scott Leibrand
@scottleibrand
Nov 14 2015 07:57
oh, sorry, not the same thing I'm seeing
yes, it would
although, was that a low batt alarm, or a battery change?
Jason Calabrese
@jasoncalabrese
Nov 14 2015 07:57
lots of little things like that
it was a change, was thinking it was before, but maybe after
Scott Leibrand
@scottleibrand
Nov 14 2015 07:58
yeah, I'm not sure openaps has any way of seeing low battery until it loses comms
Jason Calabrese
@jasoncalabrese
Nov 14 2015 07:58
dead battery and corrupt repo
but working again
Scott Leibrand
@scottleibrand
Nov 14 2015 07:58
low reservoir is a lot easier
FWIW, I've been noticing a lot of grey treatment dots and missing boluses on my NS display
Jason Calabrese
@jasoncalabrese
Nov 14 2015 07:59
would need to convert the voltage
Scott Leibrand
@scottleibrand
Nov 14 2015 07:59
but strangely, the ipad that just sits there mostly gets them
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:00
strange, they go away if you refresh?
the treatments are still in mongo?
Scott Leibrand
@scottleibrand
Nov 14 2015 08:00
the colored bolus circles? I think so, but don't really want to do that and maybe lose them. :)
yeah, it seems to be confused when parsing them
I spent hours in chrome debugger and couldn't figure it out
could be the way I'm entering them, or entering the DIYPS manual treatment events
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:01
using numbers? for insulin and carbs?
Scott Leibrand
@scottleibrand
Nov 14 2015 08:02
DIYPS does it one way, oref0 the other
which is "correct"?
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:04
numbers
but thought we'd convert
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:24
time to order another new pi
Scott Leibrand
@scottleibrand
Nov 14 2015 08:24
we have 4. could get by with 3, but the warm spare is nice.
and just got a 5th SD card, so we have a cold spare of those
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:39
don't think we'll be able to use during the day much till RL can replace CL
Ben West
@bewest
Nov 14 2015 08:40
just got back from dinner
late dinner
Scott Leibrand
@scottleibrand
Nov 14 2015 08:40
ok, oref1-setup.sh is working reliably and tested to my satisfaction
Ben West
@bewest
Nov 14 2015 08:40
it's in a branch on oref0?
Scott Leibrand
@scottleibrand
Nov 14 2015 08:40
the resulting uploader loop successfully detects and uploads temps
yeah, for now
Ben West
@bewest
Nov 14 2015 08:41
idea I had was oref1 would be support scripts to run oref0 + openaps as uploader
thanks for link
Scott Leibrand
@scottleibrand
Nov 14 2015 08:41
yeah, it needs moved / renamed probably
Ben West
@bewest
Nov 14 2015 08:42
I feel like these are open questions which each deserve their own repo
oref0 == "how do we get tools to deal with data"
oref1 == "upload MM + dexcom to NS, whatever it takes"
oref2 == "how do we predict what should happen given standardized reports"
Scott Leibrand
@scottleibrand
Nov 14 2015 08:44
for now, my oref1 thing only does pumphistory data to NS. it has ability to query attached CGM, but nothing in cron to do so, and no CGM upload.
Ben West
@bewest
Nov 14 2015 08:44
oref3 == "how do we control"
Scott Leibrand
@scottleibrand
Nov 14 2015 08:44
I think we may be redefining oref0 a bit
originally it was intended to be "the implementation of the full openaps reference design"
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:45
I like the sound of oref-predict0
Ben West
@bewest
Nov 14 2015 08:45
and we treat those as distribution methods... clearly not ready for a "green button that automates everything"
Scott Leibrand
@scottleibrand
Nov 14 2015 08:45
maybe oref0 is the whole shebang, and this is oref0.1
or maybe we should go back to using english words like jason suggests
so oref-monitor is the thing that specifies how to use oref0 to monitor, upload, etc.
Ben West
@bewest
Nov 14 2015 08:46
maybe
yeah, I'd support semantic words
and also vigorous analysis of what we've got and re-organizing it to be better
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:46
numbers sound like versions, anyone new will first think that start with 3
Scott Leibrand
@scottleibrand
Nov 14 2015 08:47
true
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:47
at least till they read a little more
Scott Leibrand
@scottleibrand
Nov 14 2015 08:47
oref0.1 version 1.0 ;-)
yeah, probably don't want to go there. :)
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:47
I can see it for predict maybe
Ben West
@bewest
Nov 14 2015 08:47
git itself went through many transformations... eventually they re-organized the scripts into useful, general form
can do major version bumps, that's fine too
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:48
since that's more of a implementation of an algorithm
Scott Leibrand
@scottleibrand
Nov 14 2015 08:48
anyway, I've pushed my last commit for the night, so I'm off to bed shortly
Ben West
@bewest
Nov 14 2015 08:48
:-)
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:49
I renamed my dirs, dropped the 01, 02, etc prefixes
and ordered a 2nd pi
Scott Leibrand
@scottleibrand
Nov 14 2015 08:49
mine are monitor, settings, enact, and upload
Ben West
@bewest
Nov 14 2015 08:50
git itself calls many magic subscriprts , all of them assume subtle things and do a very specific task
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:50
I have monitor, predict, and control
Ben West
@bewest
Nov 14 2015 08:51
I feel like we're still discovering ways an AP should behave.... it needs to do everything possible including local/remote failover, whatever it takes
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:52
damn even the $10/month DO instance falls down running 3 NS instances and mongo
Ben West
@bewest
Nov 14 2015 08:52
"find the pump" via mqtt, rileylink, etc....
yeah I found 4 - 5 the limit
but was using expensive docker in my case
dokku, etc
full docker vm per
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:53
this is simple upstart
Ben West
@bewest
Nov 14 2015 08:53
so simple node instance per
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:53
kernel killing stuff
yeah
Ben West
@bewest
Nov 14 2015 08:53
I found node was the big thing anyway
docker, when tuned decently only adds very minimal, almost none per
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:54
$ top
-bash: fork: Cannot allocate memory
Ben West
@bewest
Nov 14 2015 08:54
thanks @scottleibrand have great night :-D
Scott Leibrand
@scottleibrand
Nov 14 2015 08:54
Laters
Ben West
@bewest
Nov 14 2015 08:54
right
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:54
$ sudo service ns-dev2 stop
-bash: fork: Cannot allocate memory
think I have to reboot it
Ben West
@bewest
Nov 14 2015 08:55
yeah, that's what I do
:-(
only 3 ?
I run one of the $5 and one of the $40
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:55
$ sudo reboot
-bash: fork: Cannot allocate memory
Ben West
@bewest
Nov 14 2015 08:55
I try to keep the big one especially light
the small one I treat more disposable
Jason Calabrese
@jasoncalabrese
Nov 14 2015 08:56
need to kick it from DO
Ben West
@bewest
Nov 14 2015 08:56
yeah, that's what I do
once kernel refuses to run new tasks.....
Jason Calabrese
@jasoncalabrese
Nov 14 2015 09:09
should have booked flight for ddata sooner, around $450 now
and hotel
not sure it makes sense anymore
Oskar Pearson
@oskarpearson
Nov 14 2015 09:55
@jasoncalabrese The Digital Ocean boxes don’t come with swap enabled by default
I’d suggest you create a swap file to handle the overflow
and then watch for any excessive swapping
As root
fallocate -l 1024M /swapfile
chmod 600 /swapfile
mkswap /swapfile
nano /etc/fstab
# add a line line this at the bottom:
/swapfile none swap defaults 0 0
# Save and exit

swapon -a
free
Scott Leibrand
@scottleibrand
Nov 14 2015 16:15
@tghoward you could probably do that with a clever openaps add alias edit.
Tim Howard
@tghoward
Nov 14 2015 17:10
@scottleibrand interesting, yes, that's a good point. But the path of least resistance for a user is to simply edit the ini. So, I could also just keep doing that when I have to do edits. Even though I'm only so-so with vim!
Scott Leibrand
@scottleibrand
Nov 14 2015 17:11
How would you want the edit alias to work?
for me, path of least resistance is now to edit the line in my alias script and repaste it.
Did you see the oref1 thing above?
Tim Howard
@tghoward
Nov 14 2015 17:13
Seems like a clean way to do it is to call openaps alias edit mylongalias and then placed in the command line would be the full alias construction openaps alias add mylongalias '! bash -c "openaps lots of calls here"'
Scott Leibrand
@scottleibrand
Nov 14 2015 17:13
Cool, thats super easy
lemme try on me phone. ;-)
openaps alias add edit-alias '! bash -c "echo -n openaps alias add "; openaps alias show"'
that should be close
probably needs some escaped quotes
Tim Howard
@tghoward
Nov 14 2015 17:17
The echo simply prints, right, so I'd still need to copy-paste?
If so, then openaps alias show serves the purpose
... waiting for Sarah to get into range before I can try it out ...
Scott Leibrand
@scottleibrand
Nov 14 2015 17:19
Yeah. Unless you want to make it an interactive script, it doesn't know what edits you want to make, so you still have to do that part
Tim Howard
@tghoward
Nov 14 2015 17:20
so it is hard to place text really on the command line? like using the up arrow does?
the edit-alias line prints all aliases right now, need a way to call only the one you want to edit. But again, openaps alias show mylongalias is essentially the same thing.
Scott Leibrand
@scottleibrand
Nov 14 2015 17:26
Oh, add a | grep at the end then
that's assuming it passes extra arguments unmodified. Haven't tested that part
Tim Howard
@tghoward
Nov 14 2015 17:27
probably need a device to pass the extra argument? :smile:
Scott Leibrand
@scottleibrand
Nov 14 2015 17:28
maybe need to make it a normal bash one-liner instead
alias edit-alias='echo -n openaps alias add "; openaps alias show | grep'
thats a normal bash alias. Only survives for a single bash session unless you put it into .bashrc
Tim Howard
@tghoward
Nov 14 2015 17:31

yep, that prints

pi@betacb ~/bcb-s $ alias edit-alias='echo -n "openaps alias add "; openaps alias show | grep'
pi@betacb ~/bcb-s $ edit-alias loop
openaps alias add loop ! bash -c "openaps preflight && openaps gather && openaps enact && ( openaps upload ) >/dev/null"
pi@betacb ~/bcb-s $

nice

but still makes me copy and paste. So editing the ini still competes. :smile:
Anyway, thanks for humoring me on that idea. It was just a thought this morning and I felt might be worth passing on. Certainly can delete the request!
@tghoward &
Jason Calabrese
@jasoncalabrese
Nov 14 2015 17:36
@oskarpearson great idea, thanks
Rachel Sandlain
@audiefile
Nov 14 2015 17:49
eyim
@eyim
Nov 14 2015 17:51
@audiefile Thank you
Anybody have ideas on the best way to maximize the effective distance of the carelink? I ran it on a loop all last night for the first time - just pulling data - I didn't enact anything. It ran fine for a few hours then it couldn't ever seem to find the pump. I then had to literally touch the two together to get it reading again. After experimenting for a while with different positions, I finally got it working again by pointing it upward so it wasn't laying / touching anything - kind of like a flower in a pot next to his bed. Anyone found something more effective?
Scott Leibrand
@scottleibrand
Nov 14 2015 17:56
Did you happen to unplug the stick while repositioning it?
Jason Calabrese
@jasoncalabrese
Nov 14 2015 17:57
The beta is old, 0.8.2 is the master/production branch
eyim
@eyim
Nov 14 2015 17:58
Yes I tried unplugging it and reinserting it. Then I also tried restarting the pi. Then I tried using different length of a usb extension cable.
No idea why it suddenly lost effective distance after a few hours. He could have bumped it but it didn't look like it. I had it hanging off the head board of his bed initially
eyim
@eyim
Nov 14 2015 18:05
Looking at the data it appears once I put it in the "flower pot" position, it ran fine the rest of the night
Ben West
@bewest
Nov 14 2015 18:14
the signal comes out the flat back
eyim
@eyim
Nov 14 2015 18:36
Good to know. I'll point the flat back toward him tonight
Jason Calabrese
@jasoncalabrese
Nov 14 2015 19:17
hooked up the 522 and running the loop, but watching it closely
Matthias Granberry
@mgranberry
Nov 14 2015 19:21
If they were cheaper I'd suggest cutting a trace on the antenna and mounting a 1/2 wave dipole, but who knows what the impedance needs to be
I'm not good enough with RF design to be able to look at a trace and figure that out
Jason Calabrese
@jasoncalabrese
Nov 14 2015 19:37
booked flight for ddata, should have done it sooner
is oref0 using the same insulin duration scaling that we have in NS?
looks like it is, but not close to what I'm seeing in NS
Peter Miller
@ochenmiller
Nov 14 2015 20:27
making - some - progress with edison. I can get it into USB host mode, but the carelink stick isn't showing up with lsusb . Wes Ton mentioned others had had success when "hardwiring USB 3". I confess some ignorance there. Has anyone on this list succeeded with Carelink and Edison?
Jason Calabrese
@jasoncalabrese
Nov 14 2015 20:53
Screen Shot 2015-11-14 at 12.52.31 PM.png
so far so good...
diabeticgonewild
@diabeticgonewild
Nov 14 2015 21:06

I played sled hockey for an hour today and I don't feel crappy from it! I found my sport! Autonomic neuropathy/dysautonomia, when you have blood pressure or heart rate problems, can really make exercise difficult, too.

Working on solving for the "random walks" for #VirtualPancreas, right now! :D !

Feeling awesome!
And because I suck at math, I had to pull out this old manual to understand notation, in order to start to figure out how to program "random walks", known as Larry's Speakeasy: http://web.efzg.hr/dok/MAT/vkojic/Larrys_speakeasy.pdf
diabeticgonewild
@diabeticgonewild
Nov 14 2015 21:17
embarrassed.jpg
Embarrassed to say that's what I didn't know (and had to look up)
Jason Calabrese
@jasoncalabrese
Nov 14 2015 21:25
the upload to NS from oref0 is using the time zone in created_at while the android uploader is using utc time created_at: '2015-11-14T13:10:54-08:00' vs created_at: '2015-11-14T18:26:27.194Z'
thats causing the sort not to work, and in this case hiding an other issue with NS where the temps set by openaps would auto snooze alarms
diabeticgonewild
@diabeticgonewild
Nov 14 2015 21:28
I think 0ref0 uses ISO whatever standard number it is...
Jason Calabrese
@jasoncalabrese
Nov 14 2015 21:29
they're both iso
diabeticgonewild
@diabeticgonewild
Nov 14 2015 21:29
o
Jason Calabrese
@jasoncalabrese
Nov 14 2015 21:29
but since the sort uses the string, and 1 uses utc time, and one local time they don't sort/filter the same
it's nice to hold onto the timezone info, since it's extra info
and resolves to the same time, but filtering and sorting need to happen outside of mongo now
like a 2nd level filter/sort
Ben West
@bewest
Nov 14 2015 21:31
there's js sorting in dcalc/oref0
could tweak it to parse the date
cmp on real date
oh, this is in c-r-m?
Jason Calabrese
@jasoncalabrese
Nov 14 2015 21:34
yeah
I'm already doing a 2nd sort
since we use a different date range for sensor treatments now
but also need to filter out the automated treatments
Ben West
@bewest
Nov 14 2015 21:36
?
Jason Calabrese
@jasoncalabrese
Nov 14 2015 21:36
don't want the normal snoozing with them or the normal notifications
to support SAGE we use older treatments
Ben West
@bewest
Nov 14 2015 21:37
was thinking about adding a $startswith operator to our search syntax
Jason Calabrese
@jasoncalabrese
Nov 14 2015 21:37
find: {
      eventType: {
        $in: [ 'Sensor Start', 'Sensor Change']
      }
      , created_at: {
        $gte: new Date(data.lastUpdated - (ONE_DAY * 32)).toISOString()
      }
Ben West
@bewest
Nov 14 2015 21:37
would translate to mongo regex query
Jason Calabrese
@jasoncalabrese
Nov 14 2015 21:37
could do that too
Ben West
@bewest
Nov 14 2015 21:37
maybe a complementary not starts with?
when are you traveling?
Tim Howard
@tghoward
Nov 14 2015 21:57
watching the syslog. Should I be concerned 7 or 8 Nov 14 16:55:41 betacb bad zero CRC? for each loop?
bad zero CRC? that is
Ben West
@bewest
Nov 14 2015 21:57
nah
I've been thinking about removing that message
Tim Howard
@tghoward
Nov 14 2015 21:58
ok. Thanks.
Ben West
@bewest
Nov 14 2015 21:58
I'd love for reviewers to help go through the code and flag things that are nice to log vs not
I filter out most of it, but would love to rework a lot of it now that we know what works and why
Tim Howard
@tghoward
Nov 14 2015 22:02
Not sure I'd be any good on that front. But if the bad zero CRC is preventable by something I can control, then it should be logged, no? But if not preventable, then I see what you are saying.
Ben West
@bewest
Nov 14 2015 22:03
nah, that's a message I added
Ben West
@bewest
Nov 14 2015 22:10
it might not even be an accurate message is the thing
should probably move it down a few lines under the bad if block
Jason Calabrese
@jasoncalabrese
Nov 14 2015 22:21
I see that every time too, would be nice to remove it
Jason Calabrese
@jasoncalabrese
Nov 14 2015 22:35
@bewest where are the treatment event types coming from in oref0
I want to filter some, but not all
Scott Leibrand
@scottleibrand
Nov 14 2015 22:47
@jasoncalabrese no guarantees oref0 IOB calcs are correct still. :-( they're usually close, but we still haven't added tests.
Jason Calabrese
@jasoncalabrese
Nov 14 2015 23:03
I had 2 .5 boluses and it seemed to only be using 1 of them
maybe some deduping?
Ben West
@bewest
Nov 14 2015 23:04
it tries to combine nearby bolus things
Jason Calabrese
@jasoncalabrese
Nov 14 2015 23:04
9 minutes apart
Ben West
@bewest
Nov 14 2015 23:04
ah, 4 min
should show up as two
Jason Calabrese
@jasoncalabrese
Nov 14 2015 23:06
seems to be decaying faster, like it's not using the 4hr dia, but I see the code that's trying to
Scott Leibrand
@scottleibrand
Nov 14 2015 23:06
I don't think openaps dedupes at all, does it?
Ben West
@bewest
Nov 14 2015 23:39
no
Lori
@LoriLori
Nov 14 2015 23:52
This message was deleted