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

29th
Jun 2016
Kim St. Dennis
@kimstdennis_twitter
Jun 29 2016 00:01
upload-non-empty-treatments I think this is what I needed. thanks.
Martin Haeberli
@mhaeberli
Jun 29 2016 00:04
@bewest - I assume this was guidance for @kimstdennis_twitter
Ben West
@bewest
Jun 29 2016 00:05
actually it applies to you
it should match the links I posted as well
it applies to multiple people :-)
Kim St. Dennis
@kimstdennis_twitter
Jun 29 2016 00:05
(thumbsup!)
Ben West
@bewest
Jun 29 2016 00:05
it's a two step process
assuming you have a zoned pump history
first step is reformatting it
second step is uploading it
Martin Haeberli
@mhaeberli
Jun 29 2016 00:06
@bewest - I’m trying to run OpenAPS remotely without a pump - just taking data through Nightscout and analyzing / predicting
Ben West
@bewest
Jun 29 2016 00:06
that's fine, you can shove whatever you like in NS
Martin Haeberli
@mhaeberli
Jun 29 2016 00:07
so I have no local pump, but we are running RileyLink to get pump data up into Nightscout
Ben West
@bewest
Jun 29 2016 00:07
the command mentioned there for formatting inlcludes the word "recent" which attempts to prevent it from uploading overlapping/duplicate data
Martin Haeberli
@mhaeberli
Jun 29 2016 00:07
@bewest - so I feel dense - WHAT do I do before I run openaps-use ns shell oref0_glucose
Ben West
@bewest
Jun 29 2016 00:08
ah, that's to get glucose data
it sounds like you are not trying to upload treatments to openaps then
if rileylink is uploading it, the treatments will already be there
you can fetch them using openaps use ns shell get treatments.json but it's the wrong format for running determine-basal and friends
Martin Haeberli
@mhaeberli
Jun 29 2016 00:09
@bewest - i’m trying to feed openaps purely from nightscout (or could also from mongo)
Ben West
@bewest
Jun 29 2016 00:09
yeah, so you can retrieve glucose using openaps use ns shell oref0_glucose
Martin Haeberli
@mhaeberli
Jun 29 2016 00:09
so i’d like treatments in openaps, too
Bello
@sir_maYhor_twitter
Jun 29 2016 00:09
@scottleibrand Thanks Scott! is there somewhere in one of the codes where that operation (multiplication by ISF to give Insulin activity) is done? Please point me to it if you can.
Ben West
@bewest
Jun 29 2016 00:10
you can replace use with the four words to add a report
for treatments
hmmm
naively, you can fetch treatments using openaps use ns shell get treatments.json count=10 or similar
but it's not the same as pump-history, which is what calculate-iob uses
so some reformatting probably needs to happen to get treatments.json from NS back into a form that oref0 can handle it
Martin Haeberli
@mhaeberli
Jun 29 2016 00:11
openaps use ns shell oref0_glucose returns … argument device: invalid choice: 'tz' (choose from u'ns')
Ben West
@bewest
Jun 29 2016 00:11
ah ok
openaps vendor add openapscontrib.timezones
openaps device add tz timezones
Martin Haeberli
@mhaeberli
Jun 29 2016 00:12
openaps use ns shell get treatments.json count=10 worked very nicely
Ben West
@bewest
Jun 29 2016 00:12
if the first one errors: sudo pip install -U openaps-contrib
I thought there's an openaps vendor for rileylink though...
Martin Haeberli
@mhaeberli
Jun 29 2016 00:13
pip install looks promising ...
but no pip to install ...
tried apt-get, that didn’t find it
Ben West
@bewest
Jun 29 2016 00:14
hmm
but you have easy_install?
sudo easy_install -ZU pip
Tim Mecklem
@tmecklem
Jun 29 2016 00:14
@Spazholio, my wife says "just buy the programmer."
(she never lets me buy probably-one-time-use-stuff like this when it's to support my own tiny computer addiction) :)
Ben West
@bewest
Jun 29 2016 00:14
you should get a goodfet instead :-)
you'll enjoy it so much more
Tim Mecklem
@tmecklem
Jun 29 2016 00:15
nice!
Martin Haeberli
@mhaeberli
Jun 29 2016 00:15
progress on pip i think
Ben West
@bewest
Jun 29 2016 00:15
it's open source version of the programmer and works on very many devices
Martin Haeberli
@mhaeberli
Jun 29 2016 00:15
yes, I have easy_install
Tim Mecklem
@tmecklem
Jun 29 2016 00:16
I guess I can't say she never lets me buy random stuff. Just yesterday I picked up a Bitscope Micro as an impulse buy.
There's no chance a USBTinyISP would do the job is there?
(pretty long shot)
Martin Haeberli
@mhaeberli
Jun 29 2016 00:17
@bewest openaps use ns shell oref0_glucose works now!
Ben West
@bewest
Jun 29 2016 00:17
fantastic
use can be replaced by report add $name JSON to add a report
so something like openaps report add monitor/glucose.json JSON ns shell oref0_glucose will create a report out of it
Martin Haeberli
@mhaeberli
Jun 29 2016 00:19
@bewest - I’m thinking at our end I should set up a second NightScout Azure site (or a site someplace elsewhere) to give us a Nightscout view of what that OpenAPS instance is doing
Ben West
@bewest
Jun 29 2016 00:20
hmmm, actually if you throw it into same NS, you can still see on per item level what did what
we encourage apps adding little tags, usually on the device field for "what thing did this"
Martin Haeberli
@mhaeberli
Jun 29 2016 00:21
@bewest - ok, cool - so how do I throw it into the same NS ? (besides RTFM)
Ben West
@bewest
Jun 29 2016 00:21
openaps usually says something like openaps://$device/$vendor or similar
the bigger problem for you I think will be determining if the treatments data you get from NS is compatible with oref0
if you manage to get oref0 determine-basal and calculate-iob and whatnot working with your data, the ns tool will tag the results automatically when you upload it to ns
Martin Haeberli
@mhaeberli
Jun 29 2016 00:23
@bewest - ok - so two questions : a) a distraction, perhaps, but how do I do something analogous to <code>openaps use <my_pump_name> iter_pump_hours 4</code>
openaps use <my_pump_name> iter_pump_hours 4 - since no local pump ...
Paul Martin
@Spazholio
Jun 29 2016 00:24
Why is goodfet better than the CC debugger? Don’t they essentially do the same thing?
Martin Haeberli
@mhaeberli
Jun 29 2016 00:24
b) configure OpenAPS to put its data into the NightScout instance I’m currently running?
Ben West
@bewest
Jun 29 2016 00:25
@Spazholio goodfet does more things and is open source
@mhaeberli for a.) it's tricky but doable...
it involves embedding date -d "4 hours ago" -Ins somewhere
Paul Martin
@Spazholio
Jun 29 2016 00:26
@bewest Gotcha. Big fan of the OS concept. What else can the Goodfet do that the CC can’t? Just curious, not about to switch anytime soon. =)
Ben West
@bewest
Jun 29 2016 00:26
that prints something like 2016-06-28T13:24:51,232884572-0700 which is pretty good
besides program products that compete with TI?
maybe -Iminute would be better
Paul Martin
@Spazholio
Jun 29 2016 00:29
Sure. I didn’t care for the Windows TI programs - cc-tool worked much better for me.
Ben West
@bewest
Jun 29 2016 00:31
ah, @mhaeberli something like this somehow openaps use ns shell get treatments.json "find[created_at][\$gte]=$( date -d "4 hours ago" -I )"
the problem is that it can't be used to run the oref0 calculations, I think
maybe it can though, I'm not sure
Martin Haeberli
@mhaeberli
Jun 29 2016 00:33

@bewest - ? status failed : > openaps use ns shell status
No JSON object could be decoded
usage: [ '/usr/bin/nodejs', '/usr/local/bin/ns-status' ] <clock.json> <iob.json> <suggested.json> <enacted.json> <battery.json> <reservoir.json> <status.json> [mmtune.json]

Traceback (most recent call last):
File "/usr/local/bin/openaps-use", line 6, in <module>
exec(compile(open(file).read(), file, 'exec'))
File "/home/ubuntu/openaps/bin/openaps-use", line 63, in <module>
app( )
File "/home/ubuntu/openaps/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/home/ubuntu/openaps/bin/openaps-use", line 58, in run
reporter(output)
File "/home/ubuntu/openaps/openaps/reports/reporters/init.py", line 33, in call
self.blob = self.serialize(data)
File "/home/ubuntu/openaps/openaps/reports/reporters/init.py", line 31, in serialize
return self.method.serialize(render(data), self)
File "/home/ubuntu/openaps/openaps/vendors/process.py", line 56, in prerender_json
return json.loads(data)
File "/usr/lib/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Ben West
@bewest
Jun 29 2016 00:33
ah, the docs might be outdated on that one
that's expected it's calling ns-status, the way that get calls ns-get under the hood
Martin Haeberli
@mhaeberli
Jun 29 2016 00:33
@bewest - openaps use ns shell get treatments.json "find[created_at][\$gte]=$( date -d "4 hours ago" -I )” worked !
live4sw
@live4sw
Jun 29 2016 00:36
Quick question about lithium battery life - how much longer does your battery generally last when you hit the 1.39v mark?
Martin Haeberli
@mhaeberli
Jun 29 2016 00:38
@bewest - so on question b) - how to configure OpenAPS to flow its data to Nightscout Azure instance (or maybe to mlab ?)
Ben West
@bewest
Jun 29 2016 00:39
which data?
the results of iob/determine-basal?
Martin Haeberli
@mhaeberli
Jun 29 2016 00:40
@bewest - sure, that would be a great start !
Ben West
@bewest
Jun 29 2016 00:40
you'd have to get the data to send first
Martin Haeberli
@mhaeberli
Jun 29 2016 00:40
and / or bg predictions and basal change recommendations if I can get oref0 to run
Ben West
@bewest
Jun 29 2016 00:40
assuming you've got some data to send, it'd be openaps use ns shell upload ...
upload takes two arguments, the endpoint and the file/input
fwiw, the stuff I'm sending to NS is the pump-history, and the entries and that's it, actually
looks like the pill that shows the recommendation is called devicestatus.json
in NS
and the ns shell status tool you found (ns-status under the hood) compiles the data needed for that pill
Martin Haeberli
@mhaeberli
Jun 29 2016 00:44
k - so why does ns shell status break in my case?
time for me to RTFM !
Ben West
@bewest
Jun 29 2016 00:44
it doesn't, it's giving you the help and error message
it takes arguments to where the data to compile lives and produces the compiled result
if you have glucose and pump data already in NS, the built-in BWP does a lot of what oref0 does
Martin Haeberli
@mhaeberli
Jun 29 2016 00:45
k so how to use built in BWP?
@bewest thanks for your huge patience and persistence !
Ben West
@bewest
Jun 29 2016 00:46
BWP makes a suggestion about carbs vs basal vs bolus
I have all the alarms turned OFF on mine
Martin Haeberli
@mhaeberli
Jun 29 2016 00:47
k
Ben West
@bewest
Jun 29 2016 00:48
but it shows a suggested basal vs carb "correction" vs bolus
that's very similar to what oref0 is actually doing
it'd be interesting to see if you got the treatments data coming from NS to go through oref0 and then back to NS again
but if goal is to get some sense of basal vs carb vs bolus in open loop, BWP is pretty good or perhaps HAPPS
Martin Haeberli
@mhaeberli
Jun 29 2016 01:01
@bewest my enable is set to “careportal bridge iob cob bwp” but somehow iob, cob, bwp don’t come on, even though I restarted the Azure instance ...
“careportal bridge iob cob bwp basal"
ok had to also turn plugins on in settings ...
Ben West
@bewest
Jun 29 2016 01:08
yeah, lots of plugins
hmm, I think you also need a profile set up also
Martin Haeberli
@mhaeberli
Jun 29 2016 01:10
yes, it does look like I need to set up a profile ...
Scott Leibrand
@scottleibrand
Jun 29 2016 01:12
@sir_maYhor_twitter just search the oref0 code for BGI.
Martin Haeberli
@mhaeberli
Jun 29 2016 01:13
@bewest - ok, a profile is set up - any magic to invoking a specific profile?
Ben West
@bewest
Jun 29 2016 01:14
in NS hmm not sure
blob
Tim Mecklem
@tmecklem
Jun 29 2016 01:22
is there a primer anywhere on the various settings of a report? (For instance what does use = <thing> do in combination with input =)
Ben West
@bewest
Jun 29 2016 01:24
it does whatever the use does
@tmecklem see openaps use, report saves the flags given to use
Tim Mecklem
@tmecklem
Jun 29 2016 01:28
so if I have a use = bg_targets in a report, then I should see a bg_targets entry in openaps device show?
Ben West
@bewest
Jun 29 2016 01:28
it means openaps use $device $use
Tim Mecklem
@tmecklem
Jun 29 2016 01:28
oh, ok
Ben West
@bewest
Jun 29 2016 01:28
with all the other flags that use takes
so if you do openaps use -h you'll see list of all device = possibilities
same with device show, that's true
all the possible use = are in the particular the device, eg openaps use pump -h would show all the possibilities
Tim Mecklem
@tmecklem
Jun 29 2016 01:32

so

[report "settings/bg-targets.json"]
device = units
to = mg/dL
use = bg_targets
input = raw-pump/bg-targets-raw.json
reporter = JSON

is equivalent to

openaps use units bg_targets --to mg/dL raw-pump/bg-targets-raw.json
Ben West
@bewest
Jun 29 2016 01:32
you can double check with openaps report show settings/bg-targets.json --cli
Tim Mecklem
@tmecklem
Jun 29 2016 01:33
nice!
Ben West
@bewest
Jun 29 2016 01:33
actually if you want to get really particular about it
it also includes the implicit openaps use --format JSON
also note: openaps report show settings/bg-targets.json --json
and contrast it with oref0 template mint reports medtronic-pump
give oref0 template mint reports medtronic-pump | openaps import a shot ;)
Scott Leibrand
@scottleibrand
Jun 29 2016 01:43
All: we could use a volunteer for openaps/docs#151: just need to come up with a better explanation of when/why you would/wouldn't want to use PasswordAuthentication no
Ben West
@bewest
Jun 29 2016 01:49
for beginners it should not be trifled with
Paul Martin
@Spazholio
Jun 29 2016 01:49
Do you want that bit to be rewritten? Or just reasons for/against?
Ben West
@bewest
Jun 29 2016 01:49
as an advanced step, it makes sense to have an optional section called advanced security where this is explained
Paul Martin
@Spazholio
Jun 29 2016 01:51
Or at the very least, a bold, all-caps-with-a-blink-tag heading that says something like, “IMPORTANT: FAILURE TO UNDERSTAND WHAT YOU’RE DOING HERE CAN CAUSE YOU TO LOSE ACCESS TO YOUR RIG!"
Ben West
@bewest
Jun 29 2016 01:52
I'd rather have the whole section removed
it's not part of a beginner's walk through
Paul Martin
@Spazholio
Jun 29 2016 01:53
There’s no way to make a section that expands when you click on it in Github, is there?
Scott Leibrand
@scottleibrand
Jun 29 2016 01:54
I'd be fine with removing the PasswordAuthentication no part.
Paul Dickens
@thebookins
Jun 29 2016 01:58
As a beginner :smile: I'd like to know what options I have for securing the Pi, but agree that it's confusing for someone who's working though the docs and executing all the commands. I assume this is to prevent someone with ill intent hacking into the Pi. What's the likelihood of this? Perhaps a general discussion of the risks, pros / cons would be in order?
Ben West
@bewest
Jun 29 2016 01:59
could go in FAQ
it turns out, FWIW that a table of risks and things that mitigate them is one of the FDA deliverables
so yeah, getting a page/doc together with that kind of info would be useful not just internally, but could be become one of the things we give FDA
Scott Leibrand
@scottleibrand
Jun 29 2016 02:06
probably should break this into two: remove stuff like this that doesn't belong in the walkthrough (to address this issue) and open a new issue with any stuff you want to work on later
Ben West
@bewest
Jun 29 2016 02:07
yeah, I think if removing it is distateful, moving it to FAQ as a moribund holding area is fine, too
Paul Martin
@Spazholio
Jun 29 2016 02:12
That’s why I’d love a way to click on “Advanced Users” where appropriate in the steps to have it expand a collapsed section. It would allow all the stuff to be in one location, but wouldn’t interfere with basic getting-up-and-running workflow.
Tim Mecklem
@tmecklem
Jun 29 2016 02:26
Okay, so I think I have a better idea of where things went bad for me. I was setting up the nightscout integration, and I took the “easier method” linked path. It had me import https://gist.githubusercontent.com/bewest/d3db9ca1c144b845382c885138a8f66e/raw/181c5d6f29cd6489ecc9630786cf2c4937ddde79/bewest-aliases.json and referenced oref0-monitor/profile.json, but that report isn’t really defined anywhere in the guide.
I went hunting and found one, but invoking it gives me the oref0-monitor/profile.json raised 'Namespace' object has no attribute ‘bg_targets’ I mentioned above.
Ben West
@bewest
Jun 29 2016 02:27
that one is in oref0 template mint reports oref0-inputs I believe
Tim Mecklem
@tmecklem
Jun 29 2016 02:28
ok, give me a minute… brb
Martin Haeberli
@mhaeberli
Jun 29 2016 02:30
@bewest - i read Scott Hanselmann’s article at http://www.hanselman.com/blog/BridgingDexcomShareCGMReceiversAndNightscout.aspx - nice example of curl to get BG from Dexcom share, but would like an example curl to log in to share to get session id...
Ben West
@bewest
Jun 29 2016 02:30
shouldn't need to
Martin Haeberli
@mhaeberli
Jun 29 2016 02:30
also @bewest - I noticed today that we have some Dexcom Share numbers dropped in Nightscout but present in Share ...
Ben West
@bewest
Jun 29 2016 02:30
it's built into Nightscout
once it's in NS, you can just query it
Martin Haeberli
@mhaeberli
Jun 29 2016 02:31
@bewest - yes, it’s built in to Nightscout but I wanted to look at the underlying data out of share to understand history behind dropped datapoints
Ben West
@bewest
Jun 29 2016 02:31
ah, you can play around with some of the parameters maybe, to get it to backfill maybe
Martin Haeberli
@mhaeberli
Jun 29 2016 02:31
@bewest - exactly - where to play with parameters ?
Ben West
@bewest
Jun 29 2016 02:32
they're all environment variables maybe BRIDGE_MAX_COUNT which is 1 by default
so by default it will only fetch 1 record
so if it happens to miss one from ble and then backfills, it won't fill in with 1
Martin Haeberli
@mhaeberli
Jun 29 2016 02:33
k thx - I’ll look at what my average gaps are - 2 or 3 maybe ...
I also emailed Dexcom tech support today suggesting that I’d like to see the Share app automatically resume after the receiver comes back in range… and I’d like to see at least calibrations ...
Tim Mecklem
@tmecklem
Jun 29 2016 02:39
looked at oref0 template mint reports oref0-inputs and imported it, but it’s resulting in the same error.
Do I need to be running on the latest openaps from github?
Here’s more context to the error:
get-profile://text/shell/oref0-monitor/profile.json
oref0-monitor/profile.json  raised  'Namespace' object has no attribute 'bg_targets'
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-report')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 719, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1504, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 75, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/process.py", line 91, in main
    params = self.get_params(args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/process.py", line 48, in get_params
    params[opt] = getattr(args, opt)
AttributeError: 'Namespace' object has no attribute ‘bg_targets’
Scott Leibrand
@scottleibrand
Jun 29 2016 02:40
openaps/docs#272 opened to remove Disabling password login section
Paul Martin
@Spazholio
Jun 29 2016 02:59
Well, I just compiled my first Pebble watchface. If there’s a better reason to learn C, I don’t have one currently. =)
Tim Mecklem
@tmecklem
Jun 29 2016 03:09
when I run openaps report show oref0-monitor/profile.json —cli it shows openaps use get-profile shell settings/settings.json
seems like it should be openaps use get-profile shell settings/settings.json settings/bg-targets.json settings/insulin-sensitivities.json settings/selected-basal-profile.json preferences.json
ryanchen26
@ryanchen26
Jun 29 2016 03:18
@tmecklem You're getting an error because you're sending bg_target to device get-profile, but it is expecting bg-target. Confirm by looking at the file get-profile.ini and the corresponding report setup in openaps.ini
Tim Mecklem
@tmecklem
Jun 29 2016 03:19
gah. ok. Spent a lot of time in the openaps.ini file.
none in the get-profile.ini.
Paul Martin
@Spazholio
Jun 29 2016 03:19
Try that grep command I mentioned earlier. It’ll tell you which file has the incorrect term in it.
grep -ir “bg-targets” *.ini if you just want to check in the .ini files.
Tim Mecklem
@tmecklem
Jun 29 2016 03:20
I ran it but I missed the other file in the output
Paul Martin
@Spazholio
Jun 29 2016 03:20
Ahhhh, gotcha.
Tim Mecklem
@tmecklem
Jun 29 2016 03:23

so it’s mismatch of http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-2/Using-oref0-tools.html#the-get-profile-process:

openaps device add get-profile process --require "settings bg_targets insulin_sensitivities basal_profile preferences" oref0 get-profile

and oref0 template mint reports oref0-inputs using

{"type":"report","name":"oref0-monitor/profile.json","oref0-monitor/profile.json":{"insulin-sensitivities":"settings/insulin-sensitivities.json","use":"shell","settings":"settings/settings.json","reporter":"text","json_default":"True","device":"get-profile","bg-targets":"settings/bg-targets.json","basal-profile":"settings/selected-basal-profile.json","max-iob":"max-iob.json","remainder":"”}}

?

This message was deleted
ryanchen26
@ryanchen26
Jun 29 2016 03:26
One of many tests.
Tim Mecklem
@tmecklem
Jun 29 2016 03:27
:)
a ha. so now openaps report show oref0-monitor/profile.json --cli shows the full command.
Ben West
@bewest
Jun 29 2016 06:57
@tmecklem has to do with openaps device show --json get-profile
indeed, the device's field names (when it's a process vendor) get mapped to the report's individual fields
there's a symmetric oref0 template mint device oref0 to create matching device specs, sorry about that
cdaccarett
@cdaccarett
Jun 29 2016 07:04
This message was deleted
This message was deleted
Trying to get the data from my cgm using a G5 and my receiver is hooked up usb
$ openaps report add raw-cgm/glucose-raw.json JSON myDex oref0_glucose  --no-raw --hours 2.0
added myDex://JSON/oref0_glucose/raw-cgm/glucose-raw.json
$ openaps use tz rezone  --date dateString --date display_time raw-cgm/glucose-raw.json

Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/home/pi/src/openaps/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/home/pi/src/openaps/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/home/pi/src/openaps/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/pi/src/openaps/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/home/pi/src/openaps-contrib/openapscontrib/timezones/__init__.py", line 88, in main
    inputs = self.get_program(args)
  File "/home/pi/src/openaps-contrib/openapscontrib/timezones/__init__.py", line 60, in get_program
    program = json.load(argparse.FileType('r')(params.get('input')))
  File "/usr/lib/python2.7/argparse.py", line 1142, in __call__
    raise ArgumentTypeError(message % (string, e))
argparse.ArgumentTypeError: can't open 'raw-cgm/glucose-raw.json': [Errno 2] No such file or directory: 'raw-cgm/glucose-raw.json'
When i try to "Ensure that the data is zoned correcty:" i get this error
can someone point me in the correct direction please it says there is no such file or directory
Ben West
@bewest
Jun 29 2016 08:00
ah, you need to invoke the first one
openaps report invoke raw-cgm/glucose-raw.json @cdaccarett
that creates the file itself
the report add step above just saves the config
the use command you tried uses the results file
the report invoke actually creates the results file
cdaccarett
@cdaccarett
Jun 29 2016 08:06
@bewest when i try to report invoke i get an error aswell
$ openaps report add raw-cgm/glucose-raw.json JSON myDex oref0_glucose  --no-raw --hours 2.0
added myDex://JSON/oref0_glucose/raw-cgm/glucose-raw.json
$ openaps report invoke raw-cgm/glucose-raw.json
myDex://JSON/oref0_glucose/raw-cgm/glucose-raw.json
raw-cgm/glucose-raw.json  raised  can't open 'None': [Errno 2] No such file or directory: 'None'
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-report", line 82, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/home/pi/src/openaps/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/home/pi/src/openaps/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/home/pi/src/openaps/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/home/pi/src/openaps/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/home/pi/src/openaps/openaps/vendors/dexcom.py", line 535, in main
    iter_glucose = self.get_glucose_data(params, args)
  File "/home/pi/src/openaps/openaps/vendors/dexcom.py", line 510, in get_glucose_data
    for item in json.load(argparse.FileType('r')(args.glucose)):
  File "/usr/lib/python2.7/argparse.py", line 1142, in __call__
    raise ArgumentTypeError(message % (string, e))
argparse.ArgumentTypeError: can't open 'None': [Errno 2] No such file or directory: 'None'
cdaccarett
@cdaccarett
Jun 29 2016 08:14
@bewest $ openaps use myDex oref0_glucose --no-raw gave me results
Ben West
@bewest
Jun 29 2016 08:14
I see
ok
are you on dev branch of openaps?
there was an issue like this reported this morning and I fixed it by afternoon
I believe it was introduced in dev branch and probably lived there for several days until this afternoon, this happens to look like the same issue
several days meaning maybe a few weeks
cdaccarett
@cdaccarett
Jun 29 2016 08:15
im on master branch
Ben West
@bewest
Jun 29 2016 08:15
hmm
in that case
cdaccarett
@cdaccarett
Jun 29 2016 08:16
$ git status On branch master
Ben West
@bewest
Jun 29 2016 08:16
ah, how about openaps --version
cdaccarett
@cdaccarett
Jun 29 2016 08:16
openaps 0.1.6-dev
Ben West
@bewest
Jun 29 2016 08:16
when you did git status just now, that was in the openaps's directory?
hmm
no, that was in your openaps instance
curious what ls ~src/openaps says
cdaccarett
@cdaccarett
Jun 29 2016 08:17
cannot access ~src/openaps: No such file or directory
Chris Oattes
@cjo20
Jun 29 2016 08:18
ls ~/src/openaps
Ben West
@bewest
Jun 29 2016 08:18
sorry, the latter, thank you
^^
cdaccarett
@cdaccarett
Jun 29 2016 08:18
$ ls ~/src/openaps
bin         CONTRIBUTING.md  Makefile     openaps           README.md  tests
circle.yml  LICENSE.txt      MANIFEST.in  openaps.egg-info  setup.py   wercker.yml
Ben West
@bewest
Jun 29 2016 08:18
ah ok
(cd ~/src/openaps ; git pull origin)
afterwords, the report invoke thing should work
hmm should have added something to find this out automatically, but curious when you installed (to help me determine how far reaching this bug was)
cdaccarett
@cdaccarett
Jun 29 2016 08:21
when i installed the openaps.init ?
Ben West
@bewest
Jun 29 2016 08:22
ah, looks like it's longer than I thought
cdaccarett
@cdaccarett
Jun 29 2016 08:22
i got back "Python int too large to convert to C long"
not the errors
Ben West
@bewest
Jun 29 2016 08:22
ah
openaps use cgm config --G5
cdaccarett
@cdaccarett
Jun 29 2016 08:24
same
$ openaps use myDex config --G5
{
  "model": "G5"
}pi@raspberrypi:~/myopenaps $ openaps use myDex oref0_glucose  --no-raw --hours 2.0
[]pi@raspberrypi:~/myopenaps openaps report invoke raw-cgm/glucose-raw.json
myDex://JSON/oref0_glucose/raw-cgm/glucose-raw.json
raw-cgm/glucose-raw.json  raised  Python int too large to convert to C long
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-report", line 82, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/home/pi/src/openaps/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/home/pi/src/openaps/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/home/pi/src/openaps/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/home/pi/src/openaps/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/home/pi/src/openaps/openaps/vendors/dexcom.py", line 536, in main
    for egv, raw in itertools.izip_longest(iter_glucose, iter_sensor):
  File "/usr/local/lib/python2.7/dist-packages/dexcom_reader-0.1.10-py2.7.egg/dexcom_reader/readdata.py", line 300, in iter_records
    for x in reversed(xrange(start, end)):
OverflowError: Python int too large to convert to C long
not sure if it has to do with the "--hours 2.0"
Ben West
@bewest
Jun 29 2016 08:25
that's unexpected
hmm
hmm, usually that works on G5
it's connected via usb
cdaccarett
@cdaccarett
Jun 29 2016 08:26
yeah usb
cdaccarett
@cdaccarett
Jun 29 2016 08:32
@bewest how do i create the model.json file?
Ben West
@bewest
Jun 29 2016 08:49
ah, openaps use pump model -> openaps report add model.json JSON pump model
apologies, I'm about exhausted for one day nearly 2am
cdaccarett
@cdaccarett
Jun 29 2016 08:52
No worries, thank you for even making it possible for me to ask you questions about this! Thank you so much!
Chris Oattes
@cjo20
Jun 29 2016 09:47
aww, it looks like my wireless headphones at work interfere with pump comms :(
Chris Oattes
@cjo20
Jun 29 2016 10:07
@scottleibrand Is there actually an advantage to having the 0.1u slack here: https://github.com/cjo20/oref0/blob/dev/lib/determine-basal/determine-basal.js#L431
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 29 2016 11:51
Anyone with advice when you have git corruption (oref0-fix-git-corruption) can i just copy the files from my openaps directory into a new one?
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 29 2016 12:35
I did a rm -rf git and git init, add, commit and I’m back up and running (with no git history :worried: )
Scott Leibrand
@scottleibrand
Jun 29 2016 13:32
@cjo20 if the temp rate is that close, it's better to stick with the shorter duration in case you lose comms. Also reduces the number of temp basal events oref0 and NS have to process.
@jlucasvt you should be running oref0-reset-git in cron, not just oref0-git-corruption directly.
Can you find where that is unclear in the docs and clarify?
Chris Oattes
@cjo20
Jun 29 2016 13:42
If you're aiming for 'safer' would it not be better to go for the lower delivery amount rather than the higher one?
Although yes, 0.1u shouldn't make that much difference
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 29 2016 14:03
Anyone tried taking the carelink out of it’s plastic shell to see if that improves range
Scott Leibrand
@scottleibrand
Jun 29 2016 14:07
@cjo20 if we're comparing delivery amounts (sorry, misread which comparison this was) then faster is better for getting back into range more quickly. If you're constantly stretching delivery out over 30m, actually delivering it all will take a lot longer than that.
A shorter average temp duration means we don't have to be as aggressive with the rates.
Chris Oattes
@cjo20
Jun 29 2016 14:17
Makes sense. I was wondering whether dropping to the lower amount would smooth out the tail of the drop, reducing the chances of BG 'bouncing' around
David Cintron
@loudestnoise
Jun 29 2016 14:27
@jlucasvt No, but @TC2013 opened one up and put a TI stick in it :)
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jun 29 2016 14:29
Ahh yes i see the cron doc now @scottleibrand (I went for the nuclear option),, @loudestnoise very cool. I was thinking of talking to Mophee about getting an empty case to put the rileylinks in… Could be very awesome indeed.
Eric
@ecc1
Jun 29 2016 14:57
Can someone point me to any high-level explanation of the IOB calculation algorithm (iobCalc in oref0/lib/iob/calculate.js)? There are a lot of constants there that I'm finding, um, cryptic.
Chris Oattes
@cjo20
Jun 29 2016 15:13
iobContrib is the amount of the bolus remaining. The formulas there are quadratic that were designed to match published insulin activity curves (I think)
activity contrib is how much of the insulin was active in that 5 minute period (it works out as roughly the derivative of the iobContrib curve)
The activityContrib formula is horrible (I keep meaning to rewrite it to be readable), but it generates a /\ shape, with the peak at roughly the middle of the DIA
@ecc1 anything specific you'd like a better explanation for?
Scott Leibrand
@scottleibrand
Jun 29 2016 16:11
Heh, ya, I'm surprised that hack of W formula has worked this well and survived this long. :-)
@cjo20 yeah, it might. we've found that
Silly Gitter app.
We've found that canceling/reducing the high temp as soon as BG starts to drop accomplishes that pretty well.
There are probably about 18 ways that would work fine. :-)
Eric
@ecc1
Jun 29 2016 16:18
Anyone have a citation for that published quadratic formula?
Scott Leibrand
@scottleibrand
Jun 29 2016 16:21
Which formula do you mean?
Dana Lewis
@danamlewis
Jun 29 2016 16:22
we googled the medtronic one
Eric
@ecc1
Jun 29 2016 16:26
@scottleibrand The one that's currently implemented in iobCalc(). Chris said he thought it was based on published insulin activity data. So maybe not formulas per se ...
Chris Oattes
@cjo20
Jun 29 2016 16:27
I don't think that companies publish the exact formula they use. As far as I know, the implementations I've seen fit points to try and match the curves and then work out a formula for those points. I could be wrong though.
Dana Lewis
@danamlewis
Jun 29 2016 16:30
yep
Chris Oattes
@cjo20
Jun 29 2016 16:31
@scottleibrand I might try running my open loop without the + 0.1 for a bit. It might help reduce having to low-temp a couple of hours after high-temping. When you're aiming for a range of maybe 10mg, and 0.1u changes your BG by 5mg it might be significant.
Paul Martin
@Spazholio
Jun 29 2016 16:35
Does NS have a log file anywhere? Or does Node itself? My NS install dies every once in a while, and I’d like to see why it’s happening.
Eric
@ecc1
Jun 29 2016 16:37
Found the Novolog activity curve here (page 2): http://www.fda.gov/ohrms/dockets/ac/06/briefing/2006-4254b_13_04_KP%20InsulinAspartFDAlabel102005.pdf
Not very parabolic :-)
Looks like a Weibull distribution at first glance
Chris Oattes
@cjo20
Jun 29 2016 16:40
ecc1: if you do a cumulative graph of that, you get an S shape, which can be represented by two quadratics
The curve works out how much insulin is left to act, not how much is currently active
The activityContrib one does look closer to the free serum insulin graph. It is two linear parts, with a peak at 75 minutes post bolus (for a 3 hour DIA)
Scott Leibrand
@scottleibrand
Jun 29 2016 16:41
Or you can focus on the activity curve itself. I modeled it as two lines (/\ shape) for simplicity.
I was looking at a similar graph for humalog when I decided to try that.
David Cintron
@loudestnoise
Jun 29 2016 16:43
How do I tell if OpenAPS is using my temp target?
my settings/temptargets.json has the event and it shows on Nightscout
I’m trying to do “eating soon"
Scott Leibrand
@scottleibrand
Jun 29 2016 16:43
"Eventual BG X>80" in the reason field.
Shows in suggested and enacted.json and in OpenAPS pill in NS.
or look at profile.json
David Cintron
@loudestnoise
Jun 29 2016 16:45
Hmm, doesn’t look like it’s using it then
Chris Oattes
@cjo20
Jun 29 2016 16:45
@cjo20 A reminder for me for later: Add the suggested basal to the NS pill for Xm @ Y U/hr case
David Cintron
@loudestnoise
Jun 29 2016 16:45
2016-06-29_11-45-09.png
Scott Leibrand
@scottleibrand
Jun 29 2016 16:46
Are you refreshing profile.json in your loop?
David Cintron
@loudestnoise
Jun 29 2016 16:47
(pi @ raspberrypi): ~/skadoosh
⇢  more settings/profile.json 
{"max_iob":8,"type":"current","dia":2,"skip_neutral_temps":false,"current_basal":1.6,"max_daily_basal":1.6,"max_basal":5,"min_bg":100,"max_bg":110,"sens":25,"carb_ratio":10}
LOL, I’m using your loop from your advanced-meal-assist setup.sh
get-settings report invoke settings/model.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json settings/settings.json settings/carb_ratios.json settings/profile.json settings/pumphistory-24h.json settings/pumphistory-24h-zoned.json
looks like get-settings alias has profile.json
and get-settings is part of loop alias
Also, I’ve noticed the loop won’t finish if it can’t pull ns-glucose, is that expected?
always gotta be connected :wink2:
That line has since been updated in newer branches.
The refresh-loops branch is the latest and greatest.
There was something subtle about the order things were being run that I had to fix to get temptargets working.
But I think that one line is all you'll need to change.
Paul Martin
@Spazholio
Jun 29 2016 17:23
I need a way to combine the —older-than flag of killall with the grep ability of pgrep. I want to kill any running process with the word openaps in it, but only if it’s older than 4m. Any ideas?
Because killall -g -9 --older-than 4m openaps’ simply doesn’t do anything.
Scott Leibrand
@scottleibrand
Jun 29 2016 17:24
what process are you trying to kill then, if not an openaps one?
Paul Martin
@Spazholio
Jun 29 2016 17:25
(edison) [mini-panc: ~/openaps] $ ps -ef | grep openaps
edison    1187  1182  0 12:44 ?        00:00:00 /bin/sh -c cd /home/edison/openaps && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' || openaps retry-loop ) 2>&1 | tee -a /var/log/openaps/loop.log
edison    1189  1187  0 12:44 ?        00:00:00 /usr/bin/python /usr/local/bin/openaps retry-loop
edison    1190  1187  0 12:44 ?        00:00:00 tee -a /var/log/openaps/loop.log
edison    1200  1189  0 12:44 ?        00:00:00 bash -c openaps wait-loop || openaps loop
edison    1201  1200  0 12:44 ?        00:00:00 /usr/bin/python /usr/local/bin/openaps wait-loop
edison    1202  1201  0 12:44 ?        00:00:00 bash -c openaps preflight && openaps gather && openaps enact && openaps report invoke monitor/temp_basal.json 2>/dev/null >/dev/null && openaps upload && (openaps get-settings || openaps get-settings) 2>/dev/null >/dev/null && openaps wait-for-bg && openaps enact && openaps upload-ns-status >/dev/null
edison    1593  1202  0 12:46 ?        00:00:00 /usr/bin/python /usr/local/bin/openaps wait-for-bg
edison    1594  1593  0 12:46 ?        00:00:00 bash -c cp monitor/glucose.json monitor/last-glucose.json; while(diff -q monitor/last-glucose.json monitor/glucose.json); do echo -n .; sleep 10; openaps get-bg >/dev/null; done
edison    8153  1594  3 13:23 ?        00:00:00 /usr/bin/python /usr/local/bin/openaps get-bg
edison    8156  8153  0 13:24 ?        00:00:00 bash -c openaps ns-temptargets; ( openaps get-ns-glucose && cat raw-ns/ns-glucose-zoned.json | json -c "minAgo=(new Date()-new Date(this.dateString))/60/1000; return minAgo < 10 && minAgo > -5 && this.sgv > 30" | grep -q sgv && cp raw-ns/ns-glucose-zoned.json monitor/glucose.json ) || ( openaps monitor-cgm 2>/dev/null | tail -1 && grep -q glucose raw-cgm/glucose-zoned.json && rsync -rtu raw-cgm/glucose-zoned.json monitor/glucose.json )
edison    8162  8159  0 13:24 ?        00:00:00 /bin/sh -c cd /home/edison/openaps/ && oref0-reset-git
edison    8205  8156  0 13:24 ?        00:00:00 bash -c openaps ns-temptargets; ( openaps get-ns-glucose && cat raw-ns/ns-glucose-zoned.json | json -c "minAgo=(new Date()-new Date(this.dateString))/60/1000; return minAgo < 10 && minAgo > -5 && this.sgv > 30" | grep -q sgv && cp raw-ns/ns-glucose-zoned.json monitor/glucose.json ) || ( openaps monitor-cgm 2>/dev/null | tail -1 && grep -q glucose raw-cgm/glucose-zoned.json && rsync -rtu raw-cgm/glucose-zoned.json monitor/glucose.json )
edison    8206  8205 18 13:24 ?        00:00:00 /usr/bin/python /usr/local/bin/openaps monitor-cgm
edison    8208  8206 99 13:24 ?        00:00:02 /usr/bin/python /usr/local/bin/openaps-report invoke raw-cgm/glucose.json raw-cgm/glucose-zoned.json
edison    8212 14329  0 13:24 pts/0    00:00:00 grep openaps
Pretty much all of those. Maybe switch it to kill python instead?
Scott Leibrand
@scottleibrand
Jun 29 2016 17:25
did you kill once without the -g?
David Cintron
@loudestnoise
Jun 29 2016 17:26
@scottleibrand Thank you sir. I’ll update that alias and give it a go
Paul Martin
@Spazholio
Jun 29 2016 17:26
The -g is in the crontab, and I haven’t killed anything manually.
Scott Leibrand
@scottleibrand
Jun 29 2016 17:26
you could do something like ps -ef | grep openaps | awk '{print $2}' | while read line; do kill $line; done
assuming column 2 is your PID
Paul Martin
@Spazholio
Jun 29 2016 17:26
But that doesn’t factor in the time it’s been running. It could kill a perfectly running process.
I can do this easily manually. But I want to have it working in the crontab so this doesn’t happen again.
Scott Leibrand
@scottleibrand
Jun 29 2016 17:28
I wonder why killing the openaps process group didn't get those others
Paul Martin
@Spazholio
Jun 29 2016 17:28
To be perfectly honest, it never has on either of my rigs. This has happened once in a while.
Scott Leibrand
@scottleibrand
Jun 29 2016 17:28
a killall --older-than 15m python would probably clean it up ok.
Chris Oattes
@cjo20
Jun 29 2016 17:29
killall -g --older-than 4m -r 'openaps'
Paul Martin
@Spazholio
Jun 29 2016 17:30
I wonder if I could pipe the output of pgrep -f openaps into killall --older-than 4m?
Chris Oattes
@cjo20
Jun 29 2016 17:30
maybe?
Paul Martin
@Spazholio
Jun 29 2016 17:30
The -r flag only looks at the process name, not the whole command. I think.
Paul Martin
@Spazholio
Jun 29 2016 17:38
Drat. Everything eventually seemed to die on its own. Loop’s running again. Which is probably the last time I’ll be disappointed that my loop’s functioning properly. =)
Dana Lewis
@danamlewis
Jun 29 2016 17:39
lol
Bill Stackpole
@billstackpole
Jun 29 2016 19:36
hellop. Trying to do an ns-upload of my data to another site (newly created). Current upload to my site is working fine but the upload to my new site is failing. Am pulling 28 hrs of glucose data from my pump. formatting for nightscout, and uploading. For new site, am simply changing the site URL and api secret (sha1 hashed new api secret from new site) and getting a ```
{"status":401,"message":"Unauthorized","description":"api-secret Request Header is incorrect or missing."}
thoughts or ideas?
Dana Lewis
@danamlewis
Jun 29 2016 19:39
:) :clap: :confetti_ball: for everyone who’s contributed to OpenAPS! aka, way too many to name :)
Lynne Butts
@flutelynne_twitter
Jun 29 2016 19:40
Hi. I am having trouble getting the TI stick to work away from home wifi. Hotspot from my phone does not work. Is there a way to check to see what is wrong, or do I need to enable something else?
Dana Lewis
@danamlewis
Jun 29 2016 19:40
do you have your phone’s hotspot added as a known wifi network in that rig?
Lynne Butts
@flutelynne_twitter
Jun 29 2016 19:42
Yes, I do. I do have a different sd card in there, but when I turn on the hotspot, the wifi light comes on, and the TI stick stays green the whole time. I have my G5 receiver plugged in, also.
Do I need to re-add the hotspot to the sd card/
Dana Lewis
@danamlewis
Jun 29 2016 19:43
if it doesn’t know about all your wifi networks, yes
Lynne Butts
@flutelynne_twitter
Jun 29 2016 19:44
I will review that first, then. Thank you, Dana.
Greg Scull
@komby
Jun 29 2016 19:45
So yesterday I tried to configure a fresh openaps directory using the latest dev. It seems things have changed a LOT since my last go of setup. I got really lost in the wiki flow and now am going to have to try again tonight to figure out where I am :(
Hopefully its just something simple I am missing but it seems there were some bad merges and some reorganization of the wiki that confused me
Dana Lewis
@danamlewis
Jun 29 2016 19:47
there were a lot of PRs merged last night, @komby. Which page or section is confusing?
(but yes, things have changed a lot even in past weeks, let alone months)
i think
but I think the confusing part was that when I went through setup the first and second time ( 2 months ago) all teh example commands were different
and there werent any mint scripts
Dana Lewis
@danamlewis
Jun 29 2016 19:49
yes, @bewest has added a lot of tools, and we’ve all added a lot to the docs in the meantime.
Greg Scull
@komby
Jun 29 2016 19:50
I got to the end of phase-1 and was talking to my dex (tethered) and pump (mmeowlink) and got to phase 2
p2 started out with all the examples for carelink, should we have if carelink if mmeowlink logic here?
Dana Lewis
@danamlewis
Jun 29 2016 19:51
currently the docs are still structured around a Pi/Carelink example
Greg Scull
@komby
Jun 29 2016 19:52
it specifically calls out the mm-stick commands
Dana Lewis
@danamlewis
Jun 29 2016 19:52
if you’re doing anything with mmeowlink/TI etc, you’ll have to bridge to the mmeowlink wiki
that’s from decocare (I think)
Greg Scull
@komby
Jun 29 2016 19:52
K so i had some thinking to do there which was cornfusing but i managed from my old loop ini file
Ben West
@bewest
Jun 29 2016 19:53
the docs will continue to change
hopefully away from single "walkthrough" and more towards high level of how to use openaps, and things to do with it
"how to get glucose" would have four or five or more different ways of getting that done
Greg Scull
@komby
Jun 29 2016 19:54
"New simpler method for Nightscout upload" was where I Got stuck
Ben West
@bewest
Jun 29 2016 19:54
once you've got good glucose reports coming in, it's about collecting pump and treatment data
that's roughly the same, but with better style, now it's just two steps instead of 5 or more
there's something about docs/wiki that is getting people hung up on openaps pill before they have other stuff working
Greg Scull
@komby
Jun 29 2016 19:56
pill comes before getting the loop running if you are following them in order
Ben West
@bewest
Jun 29 2016 19:57
but openaps pill is one of the more complicated things... it needs to come last because it uses the output of everything else
Greg Scull
@komby
Jun 29 2016 19:57
I think that is what was confusing is there was commands in there I knew I didnt have setup
Ben West
@bewest
Jun 29 2016 19:57
so it's impossible task at beginning because it uses output of everything
easy to move though, where is it?
seems like it should be after Phase 2
Sarah Hodson Grady
@shgrady
Jun 29 2016 19:58
:+1:
Greg Scull
@komby
Jun 29 2016 20:00
FWIW @bewest i appreciated the openaps import pieces :)
Ben West
@bewest
Jun 29 2016 20:01
you can export all your config using oref0 export-loop [file-to-save.json]
David Cintron
@loudestnoise
Jun 29 2016 20:05
@komby I said the same thing when I was doing my RPi rig Re: Phase 1. I see the comments I added to the docs are still there.
At this point in the docs I find it confusing as the next part dives straight into working inside of your openaps repo (or whatever the right term for it is). I would think before jumping straight to setting up the integration with Nightscout you would go over some basic openaps use ns type stuff, or even just doing openaps init for the first time. I see this stuff is in Phase 2 - Configuring and Learning to Use openaps Tools, so the next bit seems out of place if you’re supposed to follow the phases in order
I didn’t realize those would end up on Master, LOL
but if you skip it and continue to Phase 2 it starts to all make sense
Ben West
@bewest
Jun 29 2016 20:05
more PRs :-)
Dana Lewis
@danamlewis
Jun 29 2016 20:05
PR all the things!
jinx @bewest ;)
Greg Scull
@komby
Jun 29 2016 20:06
Thats good to know ! I was just zipping the folder from another install
David Cintron
@loudestnoise
Jun 29 2016 20:06
I feel like doing OpenAPS has significantly helped me understand git, LOL. I was able to merge my master branch of Nate’s Loop with his latest master and I felt like a whiz
Greg Scull
@komby
Jun 29 2016 20:07
If I can make sense of it and get things working ill help clean up the wiki but need to clean up my mind first :worried:
David Cintron
@loudestnoise
Jun 29 2016 20:07
or er git fetch merge/upstream
some of the lingo is still confusing
Scott Leibrand
@scottleibrand
Jun 29 2016 20:07
we've had several people just try to move phase 1 in its entirety to be after phase 2 (or move almost all of phase 2 before phase 1). we need to be a big more surgical than that, because the entire goal is to get people set up with visualization before they close the loop. so anything you can edit to get things in the right order for that, it'd be appreciated.
Ben West
@bewest
Jun 29 2016 20:07
from high level, I think it needs to focus first on "here's these tools and how they work and what they mean", then "here are the types of things you can do" and then finally "here's how to do those things"
yeah, bingo ^^^
David Cintron
@loudestnoise
Jun 29 2016 20:08
I think maybe removing the bits about the pill and that might be helpful
Scott Leibrand
@scottleibrand
Jun 29 2016 20:08
yeah, that sounds like something to move to a later section
David Cintron
@loudestnoise
Jun 29 2016 20:08
Phase 1 should be a quick “Hey set up Nightscout"
Ben West
@bewest
Jun 29 2016 20:08
yeah, I'd start by isolating the pill related stuff and then moving that
David Cintron
@loudestnoise
Jun 29 2016 20:08
yeah
Kim St. Dennis
@kimstdennis_twitter
Jun 29 2016 20:08
@loudestnoise thanks for that comment, it let me break into phase two and come back when ready
danamlewis @danamlewis looks for volunteer to actually do that surgery and submit the PR
David Cintron
@loudestnoise
Jun 29 2016 20:09
"The code she and others have published online is considered free speech. Lewis and Leibrand never aimed to patent a device and get rich off of it."
I like that!
My question has always been, could someone take OpenAPS and implement it commercially and file a patent and then cease and desist to the Github repo
Dana Lewis
@danamlewis
Jun 29 2016 20:10
no, we have prior art on the IP
that’s the other benefit of having our ideas out there
David Cintron
@loudestnoise
Jun 29 2016 20:11
ah yes, I need to bust out my intellectual property textbooks from school
Dana Lewis
@danamlewis
Jun 29 2016 20:11
but because it’s licensed MIT someone could still take it and use it, and we’d love that :)
David Cintron
@loudestnoise
Jun 29 2016 20:11
that would be cool
Dana Lewis
@danamlewis
Jun 29 2016 20:11
but they wouldn’t be able to come down and try to shut us down
David Cintron
@loudestnoise
Jun 29 2016 20:11
nice
Dana Lewis
@danamlewis
Jun 29 2016 20:11
from that perspective
:+1:
Kim St. Dennis
@kimstdennis_twitter
Jun 29 2016 20:46
@danamlewis of the folks you've seen build openaps, would you say they all use NS with the system?
Dana Lewis
@danamlewis
Jun 29 2016 20:47
most do, and we highly recommend it for visualizing what the loop is doing.
Kim St. Dennis
@kimstdennis_twitter
Jun 29 2016 20:49
thanks. thinking of documentation flow and how NS fits in.
and where
Dana Lewis
@danamlewis
Jun 29 2016 20:50
:+1:
Ben West
@bewest
Jun 29 2016 21:07
in theory, openaps can be used as a "unified uploader" for both pump and glucose data to Nightscout
that's basically what we're doing with the loop, and then basically adding oref0 and set_temp_basal on top of that
Kim St. Dennis
@kimstdennis_twitter
Jun 29 2016 21:12
agreed. I like how the doc flow is going in dev branch which I think makes the workflow you mentioned more clear.
Ben West
@bewest
Jun 29 2016 21:15
I'm hopeful some people with "incompatible pumps" can still benefit from open-looping and real-time monitoring
Kim St. Dennis
@kimstdennis_twitter
Jun 29 2016 21:18
do you see people without pump data doing manual entry to supplement the glucose info?
Ben West
@bewest
Jun 29 2016 21:33
without pump data? some families (especially families with a school nurse or grandparents who are coordinating care, multiple agents, etc) do in fact use Nightscout careportal to enter in MDI injections, food, the DAD-alerts, all kinds of stuff
with or without pump, we find that to be true
Martin Haeberli
@mhaeberli
Jun 29 2016 21:44
@bewest openaps use ns shell get treatments.json count=10
yields : … { "carbs": 34, "ratio": 6, "eventType": "Meal Bolus", "created_at": "2016-06-29T18:34:54Z", "programmed": 5.6, "enteredBy": "rileylink://RileyLink", "unabsorbed": 0, "insulin": 5.25, "timestamp": "2016-06-29T18:34:54Z", "duration": 0, "_id": "5774335293a430e19deb45f6", "type": "normal" }, …
but openaps use ns shell latest-treatment-time yields
0
why?
Martin Haeberli
@mhaeberli
Jun 29 2016 21:57
@bewest - another RTFM, I’m sure, but if I want times in Pacific vs in UTC (for example, for get treatments), is there an easy way to do that?
Greg Scull
@komby
Jun 29 2016 22:20
would be nice if the decocare/carelink pump driver and the mmeowlink driver adhered to the same protocol/commands so changing the device over wouldnt require changing alias information like the pre-flight
Ben West
@bewest
Jun 29 2016 22:32
what do you mean?
they don't have the same commands?
how many commands are different, @komby ?
Kim St. Dennis
@kimstdennis_twitter
Jun 29 2016 22:35
@bewest that's pretty awesome.
Greg Scull
@komby
Jun 29 2016 22:35
I am honestly not sure but I noticed that setup for the pump have "mm-stick warmup" vs "openaps use pump mmtune "
in the pre-flight instructions
Ben West
@bewest
Jun 29 2016 22:35
@mhaeberli openaps use tz rezone --astimezone
@komby fwiw, that's the only difference... if you look at openaps use pump -h they are identical except for mmtune
mm-stick warmup checks that the stick itself is plugged in and responsive while mmtune does something the carelink stick is not capable of doing
mmtune actually hops frequencies trying to find the best one
however, it might make sense to make a new use called preflightfor both that do slightly different things provided it's documented
would actually be a good first-timer for anyone who wants to learn how to maintain openaps
and I could use the help
Greg Scull
@komby
Jun 29 2016 22:39
ok I was just trying to follow instructions for how to setup a good pre-flight from the wiki and noticed that those commands were mm-stick only
Ben West
@bewest
Jun 29 2016 22:41
preflight is a concept we learned about while developing the thing, one of the many lessons learned
since then, we've been kind of considering what makes sense for each thing
a lot of this is process not so much of instructions but of discovery
Greg Scull
@komby
Jun 29 2016 22:41
so carelink never autonegotiates frequecies
Ben West
@bewest
Jun 29 2016 22:41
no, never
that's one of the features that makes subg_rfspy/mmeowlink so powerful
Greg Scull
@komby
Jun 29 2016 22:45
and mm-stick is baked into oref0 vs as a pump command?
This message was deleted
@bewest ill see what I can figure out and might be able to jump in to help
Ben West
@bewest
Jun 29 2016 22:49
no, mm-stick is just a shell script
Greg Scull
@komby
Jun 29 2016 22:49
ahh that makes sense
Ben West
@bewest
Jun 29 2016 22:49
it has a bunch of "uses" that are very specific to the carelink usb stick itself
it's packaged and distributed with oref0
I like the way npm handles distributing shell scripts
Greg Scull
@komby
Jun 29 2016 22:51
I bypassed the carelink and went straight to mmeowlink
Ben West
@bewest
Jun 29 2016 22:51
so oref0/bin is tons of oref0.sh, oref0-*, mm-stick.sh, nightscout.sh, and ns-* type shell scripts
most of them are clever about about oref0-foo == oref0 foo type of tricks
nightscout is particularly clever in that nightscout ns $HOST $API_SECRET $op ... has a helper script (nightscout autoconfigure-device-crud) that creates the ns device to curry in the private details every time, allowing it to call ns-foo and friends underneath
Greg Scull
@komby
Jun 29 2016 22:56
like magic
Chris Oattes
@cjo20
Jun 29 2016 23:06
I need a better solution for editing code on my edison than nano
Kim St. Dennis
@kimstdennis_twitter
Jun 29 2016 23:26
vi? :)
Chris Oattes
@cjo20
Jun 29 2016 23:27
no, not vi
I'd prefer emacs to vi :P
Kim St. Dennis
@kimstdennis_twitter
Jun 29 2016 23:28
spacemacs then!
are you thinking something like sublime / atom ?
Chris Oattes
@cjo20
Jun 29 2016 23:30
Yeah, I might need to set up rmate