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

24th
Oct 2015
Ben West
@bewest
Oct 24 2015 01:51
nifty, shows basal programmed 30 min out:
blob
Jason Calabrese
@jasoncalabrese
Oct 24 2015 02:03
that makes me want to extend the forecast time, since there's more to show
need that for the iob-cob/BGI based forecast also
need a little popup control panel
Ben West
@bewest
Oct 24 2015 02:06
now that profiles is coming along...
need to introduce way to curate additional keys/users/tokens, then lock down careportal for good
or is authed thing default?
Jason Calabrese
@jasoncalabrese
Oct 24 2015 02:07
yeah, schemas
not default yet
think we should do that for 0.9
Ben West
@bewest
Oct 24 2015 02:08
guess it's fine to share with nurse?
Jason Calabrese
@jasoncalabrese
Oct 24 2015 02:08
need to have an alternate secret/code for careportal
would be something simple, only allow somethings
most things
but not admin (profile editor, treatment editor in reports, etc)
Ben West
@bewest
Oct 24 2015 02:09
I think the icicle view of basals is growing on me
it's kind of like log though, no one does it
Jason Calabrese
@jasoncalabrese
Oct 24 2015 02:09
the upside down?
like the name
Ben West
@bewest
Oct 24 2015 02:10
icicles go down, yeah
Jason Calabrese
@jasoncalabrese
Oct 24 2015 02:10
should make that the name in the options
Ben West
@bewest
Oct 24 2015 02:10
drip drip
Ali Mazaheri
@amazaheri
Oct 24 2015 02:15
lol
Jason Calabrese
@jasoncalabrese
Oct 24 2015 02:20
Would really like to get some analytics on what settings everyone is using
Error reporting
Like we have for the uploader
Matthias Granberry
@mgranberry
Oct 24 2015 04:17
I like the icicle view.
diabeticgonewild
@diabeticgonewild
Oct 24 2015 07:09

So I have Roid Rage from the prednisone I am prescribed but I do feel 100% better and have tons more energy...better enough certainly for going back to school. But I have been pretty confrontational and aggressive lately, so yay...not.

I was working on #VirtualPancreas tonight, which is essentially a version of Roman Hovorka's artificial pancreas, and I just did some checking of my work, and I have pretty much finished up setting everything up (for the simulation part of my project) except for the Markov chain Monte Carlo ODE (ordinary differential equation) solver and "reading data". Setting everything up to "read the data" will not be difficult at all, as I have done this before in MATLAB, see: https://github.com/diabeticgonewild/Ambulatory_Glucose_Profile/blob/master/main.m

I think I have a Dexcom MATLAB project too, but not uploaded to GitHub, so when I find it, it will save me time.
Programming an ODE solver, let alone a MCMC ODE Solver (Markov chain Monte Carlo Ordinary Differential Equation Solver) will be interesting, but I am pretty sure, for this whole project now, I have all of the information I need to finish up the simulation portion.
MCMC_ODE_Screenshot.jpg
I have a very good example of a MCMC ODE solver for MATLAB
I will upload my stuff to Dropbox soon, and I will share the link, so you all can see what is going on....
diabeticgonewild
@diabeticgonewild
Oct 24 2015 07:17
The problem is that I have to do an "experiment" (collection of a TON of data, over 18 hours) and I am on steroids right now so my data will be bad--terrible. This portion, the simulator creation, is not for testing ROBUSTNESS, it is for collection of (presumably) accurate data for finding probability distributions that REPRESENT ME. The probability distributions are needed for the controller which uses Bayesian parameter estimation.
The model used in the actual controller that I am going to be using is stochastic, which is good because the error(s) can be accurately estimated.
Dana Lewis
@danamlewis
Oct 24 2015 07:27
@diabeticgonewild , I just created a slack channel for ODE discussion. You get an invite shortly, might want to capture and move some of this there. (Slack is way better than gitter for reading this type of detailed info)
anyone else who'd like to jump in to ode, let me know. It's also a place for Omnipod communication discussions. Anyone interested can pm their email and I can add you!
diabeticgonewild
@diabeticgonewild
Oct 24 2015 07:32
Cool! Thanks!
But score, no need for CGM data in this "experiment", just pump data (constant) and BG meter data (every 15 minutes)
Scott Leibrand
@scottleibrand
Oct 24 2015 09:12
@bewest: we need openaps to automatically upgrade setuptools. I got a version error and had to sudo easy_install -ZU setuptools and sudo easy_install -ZU mock to get it to run on a new Pi, although I think sudo easy_install -ZU openaps would've managed mock if I'd just done setuptools.
Ben West
@bewest
Oct 24 2015 10:00
ah, sounds like a setup doc
Scott Leibrand
@scottleibrand
Oct 24 2015 10:02
does it have to be?
or can you make it a dependency of openaps?
Ben West
@bewest
Oct 24 2015 10:03
dependencies have to be satisfied pre-install
Scott Leibrand
@scottleibrand
Oct 24 2015 10:03
bummer. ok, we can update docs then.
Ben West
@bewest
Oct 24 2015 10:03
if it depends on min version of setuptoolds, so be i
so be it
Scott Leibrand
@scottleibrand
Oct 24 2015 10:03
I can’t remember where you put your example of how you were using the new tools in wip/bewest/dev to upload to nightscout. Can you remind me where you put that?
you'll be pleased to know we completely switched over to oref0 and turned off the Pi's running the old loop.sh. :)
also only have a single Pi running oref0: since the fixes to make openaps fast, cross-talk between the two is more of an issue than staying in range
heh, looks like you're still adding stuff to wip/bewest/dev. maybe post your usage example after you're done, and I'll try to test it tomorrow and then merge?
Ben West
@bewest
Oct 24 2015 10:08
well
so
in general when I make changes I try to post them
Scott Leibrand
@scottleibrand
Oct 24 2015 10:10
there's a ton of stuff in there: which thing initiates the (working) nightscout upload?
Ben West
@bewest
Oct 24 2015 10:10
the oref0 stuff should work from master, I'm currently working on ways to format, check, upload stuff to NS
Scott Leibrand
@scottleibrand
Oct 24 2015 10:10
or, if that part's not done yet, that's fine, I can check back when you're finished
Ben West
@bewest
Oct 24 2015 10:10
it should all be seperate tools
see the --config stuff
Scott Leibrand
@scottleibrand
Oct 24 2015 10:10
yeah, I'm trying to figure out how you intend to chain them together
Ben West
@bewest
Oct 24 2015 10:10
for ways to make typing easier
we can make other tools for other tools
more tools is better
Scott Leibrand
@scottleibrand
Oct 24 2015 10:11
I agree, but you're talking way to abstract and making no concrete sense yet
Ben West
@bewest
Oct 24 2015 10:11
can always change them to combine them
Scott Leibrand
@scottleibrand
Oct 24 2015 10:11
I just want to see what you're using to upload to nightscout, so I can see how the pieces chain together in that example
then I can modify to suit
Ben West
@bewest
Oct 24 2015 10:12
want to be able to alias tool to 'get recent treatment', "stitch latest treatment to current treatment trail", "upload diff to NS"
Scott Leibrand
@scottleibrand
Oct 24 2015 10:12
nice
Ben West
@bewest
Oct 24 2015 10:12
so will need a few more tools
it's ok to use tools inside tools
but need hard-coded stuff eliminated
can always script a --config or similar tool to print the needed setup script
Scott Leibrand
@scottleibrand
Oct 24 2015 10:14
I think we're pretty much there for the core loop
Ben West
@bewest
Oct 24 2015 10:14
almost
Scott Leibrand
@scottleibrand
Oct 24 2015 10:14
just not for uploading
Ben West
@bewest
Oct 24 2015 10:14
yeah, it's feedback side we're interested in now
lots of steps, we're still prototyping what it should do
Scott Leibrand
@scottleibrand
Oct 24 2015 10:15
I at least have my pumphistory uploading to DIYPS again, so that's good
at this point just want to get up to speed with you and jason on the nightscout visualization pieces
Ben West
@bewest
Oct 24 2015 10:15
nate made bunch of changes to be more zone-aware
need to go through everything and assure zones everywhere
Scott Leibrand
@scottleibrand
Oct 24 2015 10:16
yeah, though I think the viz stuff is more urgent
since oref0 works with the current setup, as long as you set the Pi to be the same TZ as your devices
so to me being able to better see what it's doing is the next big thing
Ben West
@bewest
Oct 24 2015 10:17
or pin it to same TZ as device was reporting
using --timezone
you could conceivable leave it entire year and never change it
oy, time for bed
Scott Leibrand
@scottleibrand
Oct 24 2015 10:18
heh ya. have a good night
Tim Howard
@tghoward
Oct 24 2015 13:31

hmm problems with openaps installing mock:

pi@betacb ~ $ sudo easy_install -ZU openaps
Searching for openaps
Reading http://pypi.python.org/simple/openaps/
Best match: openaps 0.0.7
Downloading https://pypi.python.org/packages/2.7/o/openaps/openaps-0.0.7-py2.7.egg#md5=101bc7304ab092378bfe469d12005782
Processing openaps-0.0.7-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/openaps-0.0.7-py2.7.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/openaps-0.0.7-py2.7.egg
Extracting openaps-0.0.7-py2.7.egg to /usr/local/lib/python2.7/dist-packages
openaps 0.0.7 is already the active version in easy-install.pth
Installing openaps script to /usr/local/bin
Installing openaps-report script to /usr/local/bin
Installing openaps-install-udev-rules script to /usr/local/bin
Installing openaps-enact script to /usr/local/bin
Installing openaps-alias script to /usr/local/bin
Installing openaps-get script to /usr/local/bin
Installing openaps-use script to /usr/local/bin
Installing openaps-suggest script to /usr/local/bin
Installing git-openaps-init script to /usr/local/bin
Installing openaps-device script to /usr/local/bin
Installing openaps-vendor script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/openaps-0.0.7-py2.7.egg
Processing dependencies for openaps
Searching for mock
Reading http://pypi.python.org/simple/mock/
Best match: mock 1.3.0
Downloading https://pypi.python.org/packages/source/m/mock/mock-1.3.0.tar.gz#md5=73ee8a4afb3ff4da1b4afa287f39fdeb
Processing mock-1.3.0.tar.gz
Running mock-1.3.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ObUCG2/mock-1.3.0/egg-dist-tmp-1H3SYh
mock requires setuptools>=17.1. Aborting installation
error: Setup script exited with 1

python 2.7 is still the right place to be, right?

This message was deleted
Tim Howard
@tghoward
Oct 24 2015 13:46
this might have taken care of it ...
sudo easy_install --upgrade setuptools
Tim Howard
@tghoward
Oct 24 2015 13:57
nope, made it worse
pi@betacb /usr/local/bin $ sudo easy_install -ZU openaps
Traceback (most recent call last):
  File "/usr/local/bin/easy_install", line 9, in <module>
    load_entry_point('distribute', 'console_scripts', 'easy_install')()
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/setuptools-18.4-py2.7.egg/pkg_resources/__init__.py", line 2681, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'easy_install') not found
Tim Howard
@tghoward
Oct 24 2015 14:08
yaaa, updated setuptools manually
sudo wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
and
sudo python ez_setup.py
and then
sudo easy_install -ZU openaps
made it by mock

... but it did have problems in the end, which I'm going to ignore for now

Installed /usr/local/lib/python2.7/dist-packages/pbr-1.8.1-py2.7.egg
Finished processing dependencies for openaps
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable

because I like those words "finished processing dependencies for openaps"

Ben West
@bewest
Oct 24 2015 18:03
I also had problems with mock actually
hmmm
we also saw similar problem with node
where a very old npm needed to be updated
Scott Leibrand
@scottleibrand
Oct 24 2015 18:06
My process on jessie has been sudo apt-get install npm and then ln -s /usr/bin/nodejs /usr/bin/node (I think that's the path).
Seems to be recent enough, just needs the binary name corrected.
or we could update our stuff to use the nodejs name
Ben West
@bewest
Oct 24 2015 18:07
sudo npm update -g npm I think updates npm
nah, there's a package that installs node correctly
Scott Leibrand
@scottleibrand
Oct 24 2015 18:07
ya, but haven't had to do that.
Ben West
@bewest
Oct 24 2015 18:07
it's ironically named nodejs-legacy or something
Scott Leibrand
@scottleibrand
Oct 24 2015 18:07
is it recent enough?
Ben West
@bewest
Oct 24 2015 18:07
yeah
Scott Leibrand
@scottleibrand
Oct 24 2015 18:07
need exact working instructions for fresh Pi install
Ben West
@bewest
Oct 24 2015 18:08
the thing I'm talking about is the default install of node js on the disk
what is a fresh PI install?
I've seen some come with node installed and others not
the one with node installed, it looks very old
Scott Leibrand
@scottleibrand
Oct 24 2015 18:08
In my case, with the jessie image.
Ben West
@bewest
Oct 24 2015 18:08
in either case, I needed to update setuptools in order to get mock to work
I actually had to uninstall python-setuptools package after upgrading setuptools through sudo easy_install -ZU setuptools
Scott Leibrand
@scottleibrand
Oct 24 2015 18:09
I didn't have to uninstall
just -ZU it.
Ben West
@bewest
Oct 24 2015 18:09
depends how it was installed
if it was installed by the OS package manager, the old one might need removed
almost certainly, actually
Scott Leibrand
@scottleibrand
Oct 24 2015 18:10
i followed the git book doc
live4sw
@live4sw
Oct 24 2015 19:43
Hi guys, just checking back in. At this point I feel pretty comfortable with most of the basic openaps commands, creating and invoking reports, etc, and creating aliases, though I seem to get a pesky "port0 already in use error" after the first report in the alias
I was wondering if you guys had any suggestions on what to work on next
Ben West
@bewest
Oct 24 2015 19:57
hmm sounds like weird version of decocare
live4sw
@live4sw
Oct 24 2015 20:08
hm, the last part of the error msg is decocare.link.AlreadyInUseException
Ben West
@bewest
Oct 24 2015 20:08
what happens if you sudo easy_install -ZU decocare
live4sw
@live4sw
Oct 24 2015 20:09
did it and reran but still giving me the same port already in use error
Ben West
@bewest
Oct 24 2015 20:11
I'm curious what version of decocare got install
got installed
live4sw
@live4sw
Oct 24 2015 20:11
0.0.18-dev
Ben West
@bewest
Oct 24 2015 20:11
I see
that doesn't sound right
hmm
sudo easy_install -ZU decocare==0.0.18 maybe
live4sw
@live4sw
Oct 24 2015 20:17
i reinstalled openaps because i was getting an error message that mentioned 0.0.6, i see 0.0.7 is current
workin now
Tim Howard
@tghoward
Oct 24 2015 20:20
@scottleibrand , about following the git book - I can't find anything in the the openaps git book about node (just searched to be sure) - is there a different one you are referring to?
Scott Leibrand
@scottleibrand
Oct 24 2015 20:21
no, that hasn't been added yet
I was saying the setuptools stuff came from following what is there
Tim Howard
@tghoward
Oct 24 2015 20:21
you and @bewest just answered one of my long-standing questions, though - I'm not using node-legacy and I've been wondering for a while why my node commands were different
live4sw
@live4sw
Oct 24 2015 20:21
sweet, now i can create and invoke reports, plus even do alias for multiple ones. any suggestions on what to work on next?
Tim Howard
@tghoward
Oct 24 2015 20:21
oh ok, got it, thanks.
Ben West
@bewest
Oct 24 2015 20:39
nice
Ben West
@bewest
Oct 24 2015 21:05
@live4sw nice
I used the aliases pretty heavily to kind of weave together things
so once I get groups of reports
you can assign that to alias
the trick is you can also define alias that calls other alias
so you can kind of stitch them together that way, without writing any scripts
Tim Howard
@tghoward
Oct 24 2015 22:35
@bewest what would the structure of the assign-alias-to-many-other-aliases be?
this doesn't work for me
openaps alias add myGroupedAlias "firstalias secondalias"
Ali Mazaheri
@amazaheri
Oct 24 2015 22:46
Capture.PNG
Nicely done guys! got rid of my old hack! updated the webapi on Azure and all working as expected.
Tim Howard
@tghoward
Oct 24 2015 22:48
aha: no camel case is saved in alias -- all lower
@amazaheri :+1: