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

10th
May 2015
Ben West
@bewest
May 10 2015 03:15
@mgranberry just turned your agp script into another openaps vendor as demo of the new plugin capability :-)
as in, it shows up in the help output and autocomplete options
and it runs and works
Ben West
@bewest
May 10 2015 03:22
[vendor "agp"]
module = agp
path = .
bewest@hither:~/Documents/foo$ openaps use -h
usage: openaps-use [-h] [--format {text,json,base,stdout}] [--output OUTPUT]
                   [--version]
                   {agp,cgm,pump} ...

 openaps-use - use a registered device

positional arguments:
  {agp,cgm,pump}        Operation
    agp                 AGP
    cgm                 Dexcom - openaps driver for dexcom
    pump                Medtronic - openaps driver for Medtronic

optional arguments:
  -h, --help            show this help message and exit
  --format {text,json,base,stdout}
  --output OUTPUT
  --version             show program's version number and exit

Once a device is registered in openaps.ini, it can be used.
bewest@hither:~/Documents/foo$
so agp becomes a "vendor" device with "uses" just like everything else
bewest@hither:~/Documents/foo$ openaps use agp -h
usage: openaps-use agp [-h] {agp} ...

positional arguments:
  {agp}       Operation
    agp       Calculate agp

optional arguments:
  -h, --help  show this help message and exit
bewest@hither:~/Documents/foo$
bewest@hither:~/Documents/foo$ openaps use agp ag
usage: openaps-use agp [-h] {agp} ...
openaps-use agp: error: argument use: invalid choice: 'ag' (choose from 'agp')
bewest@hither:~/Documents/foo$
bewest@hither:~/Documents/foo$ openaps use agp agp -h
usage: openaps-use agp agp [-h] input

positional arguments:
  input

optional arguments:
  -h, --help  show this help message and exit
bewest@hither:~/Documents/foo$
Ben West
@bewest
May 10 2015 03:27
bewest@hither:~/Documents/foo$ openaps device show 
medtronic://pump 
dexcom://cgm 
agp://agp 
bewest@hither:~/Documents/foo$
Ben West
@bewest
May 10 2015 03:36
@danamlewis https://pythonhosted.org/RPIO/rpio_cmd.html apparently there are some nice tools to do things with LEDs on that thing, it would be relatively easy to add rpio as a "vendor" to openaps
Dana Lewis
@danamlewis
May 10 2015 04:37
:) sweet
Ben West
@bewest
May 10 2015 05:42
example output and usage of plugins: https://github.com/bewest/openaps-example
diabeticgonewild
@diabeticgonewild
May 10 2015 20:34
Actually I don't need videos to learn Python
Kind of a waste of time based on the languages I already know
Ben West
@bewest
May 10 2015 20:38
matlab is pretty close, and there are tons of small examples on the 'webs, and you should feel free to ask quesions/gist here
diabeticgonewild
@diabeticgonewild
May 10 2015 20:38
I have access to the O'Reilly Media books (I think all of them) vid Bookshare.org so I can listen to them via a screen reader on my phone
It is
That's what I have access to
Ben West
@bewest
May 10 2015 20:42
also, the whole web which has stuff like this: http://www.diveintopython.net/toc/index.html
diabeticgonewild
@diabeticgonewild
May 10 2015 20:43
True
not to mention stackexchange for usage tips on almost every library that exists
diabeticgonewild
@diabeticgonewild
May 10 2015 20:44
JS I would have problems with though. Python is fine with the training I have received and past experience
Ben West
@bewest
May 10 2015 20:44
diabeticgonewild
@diabeticgonewild
May 10 2015 20:44
Maybe with a book on JS would be fine...
Yeah that is really really nice
diabeticgonewild
@diabeticgonewild
May 10 2015 20:46
Those are interesting.
But it's for openAPS
Ben West
@bewest
May 10 2015 20:47
btw, I removed numpy as requirement, so it shouldn't hang up other people
diabeticgonewild
@diabeticgonewild
May 10 2015 20:48
Not the #VirtualPancreas ...that overall cause of the controller needs to be done in MATLAB
Got it! You're awesome!
Ben West
@bewest
May 10 2015 20:48
but I suspect you'll want it
diabeticgonewild
@diabeticgonewild
May 10 2015 20:48
I have a question though. How do you use the dev tools in your own program? (Not asking for a how to...)
Or script or whatever
I'm on my mobile btw
Ben West
@bewest
May 10 2015 20:49
I created a plugin system
so you can just drop it in your openaps directory and it will be available
as another type of vendor in openaps, so when you add a 'device', you can instruct it to use your model as the vendor implementation
I show how to do it in openaps-example with the agp script from @mgranberry
Ben West
@bewest
May 10 2015 20:55
here's a compat layer to make you feel more at home http://python-control.sourceforge.net/manual/matlab_strings.html
diabeticgonewild
@diabeticgonewild
May 10 2015 20:56
So it's more like pulling stuff from MATLAB
Nice
So like you write something and you pull it within the functions you defined. So you don't really build on top of it. It's inherently within #OpenAPS...sorry too I can't really read within the Gitter browser on my phone but it looks super awesome!
Like remember that my eyes kind of mess with me with close up stuff kind of and like I don't have a ton of stamina for reading...
I will look at it more when I get home. Store is all out of Mother's Day cards
Ben West
@bewest
May 10 2015 21:01
this will all be here when you get home
diabeticgonewild
@diabeticgonewild
May 10 2015 21:44
yeah I am reading while trying to get WiFi working on the Pi...
Ben West
@bewest
May 10 2015 21:47
I commented the agp code to show mechanics of "how an openaps vendor works"
diabeticgonewild
@diabeticgonewild
May 10 2015 21:48
very nice, thank you
Ben West
@bewest
May 10 2015 22:59
I just updated openaps to include a tool to manage plugins easiily
Ben West
@bewest
May 10 2015 23:13
nice updates to the agp tool https://gist.github.com/mgranberry/afde7373ed756e538dad showing how to use scipi/numpy
Matthias Granberry
@mgranberry
May 10 2015 23:24
@bewest hah. I was going to commit an update using scipy to smooth and interpolate values. Still haven't gotten it plotting the iqrs as shaded regions, though. I wonder what the enthought guy s would do if I wandered downstairs and asked in their office tomorrow
Ben West
@bewest
May 10 2015 23:24
hehehe
:-)
btw, I'm prepping a contrib thing
so we can distribute plugins/contrib modules
I'm looking at how sphinxcontrib is organied
and little... uh... disappointed why is it not a single package declared as namespace
diabeticgonewild
@diabeticgonewild
May 10 2015 23:46

So here's how to get WiFi on the Pi (Linux or Raspbian, I think...definitely for Ubuntu--Linux)

Drivers
http://askubuntu.com/questions/235279/my-wifi-adapter-is-not-working-at-all-how-to-troubleshoot
Easy Wireless Configuration on Pi using Wicd

https://blog.bartbania.com/raspberry_pi/easy-wireless-configuration-for-raspberry-pi/
Hope this helps

you want to use Wicd, it makes it easier, it's like a GUI in terminal
that's awesome @bewest !