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

27th
Aug 2016
David
@david-t1
Aug 27 2016 00:00
[report "monitor/glucose.json"]
count = 5
use = iter_glucose
date = display_time
reporter = JSON
seconds =
hours =
report = monitor/glucose.json
gaps =
microseconds =
device = cgm
minutes =
ok, how do I put one in?
Scott Leibrand
@scottleibrand
Aug 27 2016 00:00
paste one of the stanzas from monitor/glucose.json
I think that part of oref0 expects you to be using oref0_glucose instead of iter_glucose: does that work with your setup?
or were you one of the people that errored out for?
David
@david-t1
Aug 27 2016 00:01
I think oref0_glucose is utilized in my setup. I will check
Scott Leibrand
@scottleibrand
Aug 27 2016 00:02
that ini says use = iter_glucose
David
@david-t1
Aug 27 2016 00:05
right, and looking through entire ini, I don't see oref0-glucose referenced anywhere.
per documentation, I created a report for determine-basal using the formula: openaps report add enact/suggested.json text determine-basal shell monitor/iob.json monitor/temp_basal.json monitor/glucose.json settings/profile.json
my report as listed in the ini: [report "enact/suggested.json"]
use = shell
temp_basal.json = monitor/temp_basal.json
reporter = text
json_default = True
glucose.json = monitor/glucose.json
iob.json = monitor/iob.json
device = determine-basal
profile.json = settings/profile.json
remainder =
Scott Leibrand
@scottleibrand
Aug 27 2016 00:10
that part should be fine
it's the openaps report add monitor/glucose.json where you used iter_glucose and could use oref0_glucose instead
not sure which is in the docs
David
@david-t1
Aug 27 2016 00:11
iter_glucose I think. I will try oref0_glucose isntead
Scott Leibrand
@scottleibrand
Aug 27 2016 00:11
sounds like the docs may need updated once you figure it out
then you can update your fork and submit a PR with the fixes
David
@david-t1
Aug 27 2016 00:12
ok, thanks!
Ben West
@bewest
Aug 27 2016 01:02
@bfaloona look at output of nightscout ns help
use the ns device in openaps after creating device using nightscout autoconfigure-device-crud
Brandon Faloona
@bfaloona
Aug 27 2016 06:19
Thanks @bewest, I got that sorted out.
Ben West
@bewest
Aug 27 2016 07:20
great :-)
Tim Street
@tim2000s
Aug 27 2016 10:37
Ah - this is where I'd run into some confusion as well. The docs list a series of template generators that create templates form a new walkthrough that I can't find, and then drop into the old walkthrough with slightly different details. Does the new walkthrough reference the dev docs? (Old link - https://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-2/Using-oref0-tools.html)
Brandon Faloona
@bfaloona
Aug 27 2016 16:24
I'm testing autosens . The ISF calculations are amazing to watch. As steroids slowly leave T1D, it's impressive to watch autosens report the measured ISF. I can't say it's correct, but I can say it seems miles ahead of the crude, change-once-per-day adjustments we were using.
Dana Lewis
@danamlewis
Aug 27 2016 16:29
@tim2000s no, all the docs are up to speed. But no one has done the work to update the docs with the same names as template generators, so you'll have to adjust/watch for that we you go.
@bfaloona glad to hear it's working!
Brandon Faloona
@bfaloona
Aug 27 2016 16:35
I'm also intrigued by Meal Assist, but I don't understand what it does.
warren-scott
@warren-scott
Aug 27 2016 16:36
@danamlewis Since you made the mistake of welcoming me I'm pinging you for help. ;) I've installed software and added a Medtronic pump to openaps but get errors when trying to use openaps use pump model. The doc says this is the first part where CareLink USB is required so it's plugged in but there's no sign of communication with it.

Here's the code

Traceback (most recent call last): File "/usr/local/bin/openaps-use", line 5, in <module> pkg_resources.run_script('openaps==0.1.5', 'openaps-use') File "/Library/Python/2.7/site-packages/setuptools-26.0.0-py2.7.egg/pkg_resources/__init__.py", line 743, in run_script self.require(requires)[0].run_script(script_name, ns) File "/Library/Python/2.7/site-packages/setuptools-26.0.0-py2.7.egg/pkg_resources/__init__.py", line 1531, in run_script exec(code, namespace, namespace) File "/Library/Python/2.7/site-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module> app( ) File "/Library/Python/2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__ self.run(self.args) File "/Library/Python/2.7/site-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run output = app(args, self) File "/Library/Python/2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__ return self.method.selected(args)(args, app) File "/Library/Python/2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__ return self.method(args, app) File "/Library/Python/2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/uses/use.py", line 44, in __call__ self.before_main(args, app) File "/Library/Python/2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/medtronic.py", line 61, in before_main self.setup_medtronic( ) File "/Library/Python/2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/medtronic.py", line 158, in setup_medtronic log.addHandler(logging.handlers.SysLogHandler(address=address)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/handlers.py", line 762, in __init__ self._connect_unixsocket(address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/handlers.py", line 790, in _connect_unixsocket self.socket.connect(address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 228, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 2] No such file or directory

Sorry if this is super basic. Happy to chat elsewhere if that's more appropriate. Thanks!

Brandon Faloona
@bfaloona
Aug 27 2016 16:38
Shortly after 12g intake, it adjusted target up 14 points (from 125 to 139).
10 hours later, it continues to make this exact adjustment.
What is the intent of the target change and do these values seem correct?
Dana Lewis
@danamlewis
Aug 27 2016 16:41
@bfaloona are you regularly entering carbs for meal assist?
Here's one of our original write ups about MA: https://gist.github.com/scottleibrand/df1019f8e12bac9030dc. Also, advanced meal assist is even better so you should set that up.
Brandon Faloona
@bfaloona
Aug 27 2016 16:42
Well, in this timeframe, carb input was correct.
Here's the pump-loop output:
{"carbs":0,"boluses":0.725,"mealCOB":0}
{"ratio":0.82}
{"iob":-0.35,"activity":-0.0029,"bolussnooze":0,"basaliob":-0.417,"netbasalinsulin":-1,"hightempinsulin":0.15,"time":"2016-08-27T16:06:58.000Z"}
{"delta":0,"glucose":138,"short_avgdelta":-1.78,"long_avgdelta":0.12}
{"duration":20,"rate":0.8,"temp":"absolute"}
{"max_iob":5,"type":"current","max_daily_safety_multiplier":3,"current_basal_safety_multiplier":4,"autosens_max":1.5,"autosens_min":0.7,"autosens_adjust_targets":true,"override_high_target_with_low":false,"bolussnooze_dia_divisor":2,"dia":4,"model":{},"current_basal":0.95,"max_daily_basal":0.95,"max_basal":8,"min_bg":125,"max_bg":125,"sens":70,"carb_ratio":9}
Adjusting basal from 0.95 to 0.8
Adjusting target_bg from 125 to 139
Adjusting sens from 70 to 85.4
Carb Impact: -3 mg/dL per 5m; CI Duration: 0 hours
Accel. Carb Impact: 10 mg/dL per 5m; ACI Duration: 0 hours
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
{"temp":"absolute","bg":138,"tick":"+0","eventualBG":145,"snoozeBG":145,"predBGs":{"IOB":[138,136,135,134,134,133,133,133,134,134,135,136,137,139,141,143,145,146,148,150,151,152,153,155,156,157,157,158,159,159,159,160,160,160,160,160,161,161,161,161,161,161,161,161,162]},"COB":0,"IOB":-0.35,"reason":"COB: 0, Dev: -18, BGI: 1.24, ISF: 85, Target: 139; Eventual BG 145 > 139 but Min. Delta -1.78 < Exp. Delta 1, temp 0.8 ~ req 0.8U/hr"}
Thanks for the link @danamlewis. I'll check that out.
Dana Lewis
@danamlewis
Aug 27 2016 16:44
That may be one of our first write ups, so look at oref0 issues list (might be closed technically) for more recent notes about it and AMa
Brandon Faloona
@bfaloona
Aug 27 2016 16:50
@danamlewis @tim2000s This docs and templates thing is a big deal (at least for me). While comparing a template to the openaps docs, I usually can't track down the answers because there are so many fundamental namespace issues. Without knowing the system I often find it impossible to translate between the two, or to grasp which of two docs is out of date.
Dana Lewis
@danamlewis
Aug 27 2016 16:51
You can always use an older version of the docs, one which does not use the template thingamajig. in RTD, in the bottom right corner if yu click the “v’ it pulls up a little menu, and you can swap between doc versions, if that helps
@warren-scott stick is plugged in, you’ve installed openaps already..and is your pump in range of the stick?
Brandon Faloona
@bfaloona
Aug 27 2016 16:57
Would a list of naming discrepancies be helpful to others as we try to reconcile the docs/scripts? I think that standardizing on paths, filenames, devices, reports, aliases, etc, would be a great first step.
I also think that attention should be paid to making testing a no-op. For example, when you run a loop for the first time, it should display all errors explicitly, and should output helpful verification information.
Then, as you learn and test the loop, you could progressively 'turn down' the logging so it's easier to read and store.
warren-scott
@warren-scott
Aug 27 2016 17:00
@danamlewis yes to all but I'm sensing the CareLink is not doing anything as it's not showing up as a device.
do I need to do something in the ini file to enable wireless communication?
Brandon Faloona
@bfaloona
Aug 27 2016 17:10
On a related note, a loop could include test asserts that validate critical functionality. I know loops commonly test for files and dates, but I think isolated asserts that served no other purpose might help people test their loops.
Brandon Faloona
@bfaloona
Aug 27 2016 17:27
This message was deleted
This message was deleted
Brandon Faloona
@bfaloona
Aug 27 2016 17:37
This message was deleted
Brandon Faloona
@bfaloona
Aug 27 2016 18:05
What about standardizing on alias prefixes? Clear naming could go a long way to helping new loopers understand the system. These would be very helpful for testing and debugging. I've ordered them below from exploration to validation, to debugging, to production:
openaps print-config
openaps print-recent-commits
openaps print-recent-file-changes
openaps print-recent-config-changes
openaps print-recent-data-changes
openaps print-recent-summary
openaps print-preflight
openaps print-clock-debug
openaps loop-cgm-debug
openaps loop-ns-debug
openaps loop-suggest-debug
openaps loop-enact-debug
openaps loop-pump
openaps loop-cgm
openaps loop-ns
openaps loop-suggest
openaps loop-enact
openaps util-killall-old
openaps util-reclone-repo
openaps util-use-stable-loop
openaps util-use-dev-loop
Those are just ideas. If they sounds useful to other I'll probably work on a few of the print-recent aliases.
Scott Leibrand
@scottleibrand
Aug 27 2016 18:11
@bfaloona if you want to standardize something, it needs to provide a benefit people can't get otherwise, so the easiest path forward is to use the standard. otherwise you end up with https://xkcd.com/927/
I think the path forward on that is to start tweaking something like refresh-loops in the direction you want to go, and exporting the results and testing them on a second rig as you go along, to make sure they install from scratch and Just Work
I think the easy-install-from-scratch bit is the only thing that's going to convince people to use it. and even then, we have to make it really rock solid to get people with an already-working loop to switch over
Ben West
@bewest
Aug 27 2016 18:25
@bfaloona there's actually a script which generates commonly used aliases and stuff
oref0 template
Brandon Faloona
@bfaloona
Aug 27 2016 18:44
@scottleibrand Agreed regarding another standard! LOL
Baby steps and tweaking existing tools is always best.
Brandon Faloona
@bfaloona
Aug 27 2016 19:01
@bewest @scottleibrand Scott's setup.sh script uses different aliases than generated by oref0 template. So, I'm not sure which to use. I have my own ideas I'd like to contribute, but I firstly want to contribute to the direction you folks are already headed. :smile:
I agree completely about the importance of easy-to-install-from-scratch. That's what I'd like to contribute to, and it will give me guidance about adding easy-to-test-from-scratch utilities to add.
Scott Leibrand
@scottleibrand
Aug 27 2016 19:04
some of mine could be updated to something more "standard" - I mostly want a fully integrated set of aliases, reports, etc. that work well together and are fully tested. unfortunately the oref0 template stuff is not integrated, so we can't just use those without doing the work to do so
Ben West
@bewest
Aug 27 2016 19:05
not sure what you mean by that?
Scott Leibrand
@scottleibrand
Aug 27 2016 19:05
there's no full and complete setup that all uses the same names (except mine, and it has other issues)
Ben West
@bewest
Aug 27 2016 19:06
not sure what that means
Scott Leibrand
@scottleibrand
Aug 27 2016 19:06
the templates are good building blocks, but the rest of the instructions in the docs don't fully match up
Ben West
@bewest
Aug 27 2016 19:06
I've warned against organizing around a "one true way" because people are actively taking advantage of different mechanisms
everyone has a different way of getting glucose into the system
once that's done, it's all the same
Scott Leibrand
@scottleibrand
Aug 27 2016 19:07
I'm trying to build a complete loop that installs from scratch and works right away for the two most common use cases (plugged in CGM and BG from NS). obviously there will be some other things that will have to be tweaked by people who want to do other things like openxshareble
Ben West
@bewest
Aug 27 2016 19:08
if cgm is plugged in, it should be sending bg to NS, not fetching
Scott Leibrand
@scottleibrand
Aug 27 2016 19:13
I think Jason's approach of doing both is what we want there.
That way you can use two receivers and not have a restart gap.
Ben West
@bewest
Aug 27 2016 19:15
help with oacids and daemonizing each device would be lovely
Brandon Faloona
@bfaloona
Aug 27 2016 19:15
The path I imagined was a template of aliases and loops with consistent names constructed in a way to allowed for customizations. Plus of course, people could choose to not use the templates at all, or even better, create additional templates.
Ben West
@bewest
Aug 27 2016 19:16
then, everything would be in the templates, (no cron job)
and it'd be faster, follow cgm more tightly
Brandon Faloona
@bfaloona
Aug 27 2016 19:17
To be clear I found your setup script extremely helpful @scottleibrand !
Ben West
@bewest
Aug 27 2016 19:17
@bfaloona you can prepare templates by doing openaps $type show --json
Scott Leibrand
@scottleibrand
Aug 27 2016 19:17
@bewest we've had a lot of good success running multiple loops (each in cron) to accomplish all of that.
There's a cgm-loop that waits exactly the right amount of time to catch the next BG...
Ben West
@bewest
Aug 27 2016 19:18
right, but it's not something I'd recommend or put in docs per se
not a fan of wait-for stuff in bash
Scott Leibrand
@scottleibrand
Aug 27 2016 19:19
I'm a fan of simple, tested, and working.
Brandon Faloona
@bfaloona
Aug 27 2016 19:28
What about both? Document a working simple method and improve the solution moving forward. #alwaystheoptimist
Dana Lewis
@danamlewis
Aug 27 2016 19:30
:+1:
Playing with the new boards today, which will give us some ideas for how much we can simplify
garykidd
@garykidd
Aug 27 2016 19:55
Can anyone help me troubleshoot a bit....
pi@raspberrypi:~/APS0 $ openaps use cgm oref0_glucose -h
usage: openaps-use cgm [-h] USAGE ...
openaps-use cgm: error: argument USAGE: invalid choice: 'oref0_glucose' (choose from 'DescribeClocks', 'GetFirmwareHeader', 'ReadBatteryLevel', 'ReadBatteryState', 'ReadBlindedMode', 'ReadChargerCurrentSetting', 'ReadClockMode', 'ReadDeviceMode', 'ReadDisplayTime', 'ReadDisplayTimeOffset', 'ReadGlucoseUnit', 'ReadHardwareBoardId', 'ReadLanguage', 'ReadManufacturingData', 'ReadRTC', 'ReadSetupWizardState', 'ReadSystemTime', 'ReadSystemTimeOffset', 'ReadTransmitterId', 'UpdateTime', 'WriteChargerCurrentSetting', 'battery', 'calibrations', 'glucose', 'insertion_time', 'iter_calibrations', 'iter_calibrations_hours', 'iter_glucose', 'iter_glucose_hours', 'iter_insertion_time', 'iter_insertion_time_hours', 'iter_meter_data', 'iter_meter_data_hours', 'iter_sensor', 'iter_sensor_hours', 'iter_sensor_insertions', 'iter_sensor_insertions_hours', 'iter_user_event_data', 'iter_user_event_data_hours', 'meter_data', 'scan', 'sensor', 'sensor_insertions', 'user_event_data')
~~~~~~~yet iter_glucose works fine
?
Brandon Faloona
@bfaloona
Aug 27 2016 19:57
What version of oref0 do you have installed? dev branch or npm package
What does openaps device show cgm look like?
I doubt I can help with this problem, but those two questions may provide some insight.
garykidd
@garykidd
Aug 27 2016 20:01
pi@raspberrypi:~/APS0 $ openaps --version
openaps 0.1.0-dev
pi@raspberrypi:~/APS0 $ openaps device show
medtronic://GK715
dexcom://GKDEX
process://ns/nightscout/ns https://xxxxyyyyyzzzzxyyys.azurewebsites.net XXXXXXXXXXXXXXXXXXXXX
process://oref0/oref0/
process://get-profile/oref0/get-profile
process://calculate-iob/oref0/calculate-iob
process://determine-basal/oref0/determine-basal
process://ns-status/ns-status/
timezones://tz
units://units
process://status/bash/-c "ns-status $*" --
dexcom://cgm
Brandon Faloona
@bfaloona
Aug 27 2016 20:02
hmm. I have openaps 0.1.5
How about openaps device show cgm --ini
garykidd
@garykidd
Aug 27 2016 20:04
pi@raspberrypi:~/APS0 $ openaps device show cgm --ini
[device "cgm"]
vendor = openaps.vendors.dexcom
extra = cgm.ini
Brandon Faloona
@bfaloona
Aug 27 2016 20:05
Hm. Well I'm not helping much. :smile:
garykidd
@garykidd
Aug 27 2016 20:06
Thanks for thinking about it at least...
Brandon Faloona
@bfaloona
Aug 27 2016 20:09
What oref0 do you have installed? There's no --verion switch, but the dev branch help output looks like this: https://github.com/openaps/oref0/blob/dev/bin/oref0.sh
oref0 -h
garykidd
@garykidd
Aug 27 2016 20:11

pi@raspberrypi:~/APS0 $ oref0 -h
Usage:
oref0 <cmd>

 ______   ______   ______  ______ 0
/ |  | \ | |  | \ | |     | |      
| |  | | | |__| | | |---- | |----  
\_|__|_/ |_|  \_\ |_|____ |_|      

Valid commands:
oref0 device-helper - <name> <spec> : create/template a device from bash commands easily
oref0 alias-helper - <name> <spec> : create/template a alias from bash commands easily
oref0 cron-5-minute-helper - <cmds> - generate a cron template for commands
to run every 5 minutes:
oref0 cron-5-minute-helper openaps do-everything
oref0 env - print information about environment.
oref0 pebble
oref0 ifttt-notify
oref0 get-profile
oref0 calculate-iob
oref0 meal
oref0 determine-basal
oref0 export-loop [backup-loop.json] - Print a backup json representation of
entire configuration. Optionally, if a
filename is specified, listing is
saved in the file instead.
oref0 help - this message

Brandon Faloona
@bfaloona
Aug 27 2016 20:13
That looks like the dev version.
garykidd
@garykidd
Aug 27 2016 20:16
so that's not the culprit then.
so maybe openaps version?
should I
sudo easy_install --upgrade setuptools
?
Brandon Faloona
@bfaloona
Aug 27 2016 20:19
Yes, I think you are right. Lots of activity since v0.1.0: https://github.com/openaps/openaps/releases
garykidd
@garykidd
Aug 27 2016 20:19
is the sudo command make sense then?
above
?
Brandon Faloona
@bfaloona
Aug 27 2016 20:19
I don't know, can you paste it here after you find out?
should be in the docs
sudo easy_install -ZU setuptools
sudo easy_install -ZU openaps
?
garykidd
@garykidd
Aug 27 2016 20:22

pi@raspberrypi:~/APS0 $ sudo easy_install --upgrade setuptools
Searching for setuptools
Reading https://pypi.python.org/simple/setuptools/
Best match: setuptools 26.0.0
Downloading https://pypi.python.org/packages/fd/e2/6685fa17489a921804951bdeb13faa177cd1095da91d9371c4908c903367/setuptools-26.0.0.zip#md5=6187d556fc96d2c4d17eb55a7f2ab504
Processing setuptools-26.0.0.zip
Writing /tmp/easy_install-y1UYQw/setuptools-26.0.0/setup.cfg
Running setuptools-26.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-y1UYQw/setuptools-26.0.0/egg-dist-tmp-0pD1Os
warning: no files found matching '*' under directory 'setuptools/_vendor'
Moving setuptools-26.0.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Removing setuptools 20.6.7 from easy-install.pth file
Adding setuptools 26.0.0 to easy-install.pth file
Installing easy_install script to /usr/local/bin
Installing easy_install-2.7 script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/setuptools-26.0.0-py2.7.egg
Processing dependencies for setuptools
Finished processing dependencies for setuptools

Brandon Faloona
@bfaloona
Aug 27 2016 20:23
Cool! So, you'll upgrade openaps too, right?
garykidd
@garykidd
Aug 27 2016 20:24
Yes--makes sense....
before I get there though...doe sit make sense that when I subsequently......
pi@raspberrypi:~/APS0 $ sudo easy_install -ZU setuptools
Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 9, in <module>
load_entry_point('setuptools==26.0.0', 'console_scripts', 'easy_install')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2476, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load
['name'])
File "build/bdist.linux-armv7l/egg/setuptools/init.py", line 11, in <module>
File "build/bdist.linux-armv7l/egg/setuptools/extern/init.py", line 1, in <module>
ImportError: No module named extern
I got the above errors?
++++++++++++++++++++++++++++++++++++++++++++++
and
Brandon Faloona
@bfaloona
Aug 27 2016 20:27
If the --upgrade succeeded, I would not worry about it. Best path might be to remove and reinstall, but I'm not too familiar with easy_install
garykidd
@garykidd
Aug 27 2016 20:27
pi@raspberrypi:~/APS0 $ sudo easy_install -ZU openaps
Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 9, in <module>
load_entry_point('setuptools==26.0.0', 'console_scripts', 'easy_install')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2476, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load
['name'])
File "build/bdist.linux-armv7l/egg/setuptools/init.py", line 11, in <module>
File "build/bdist.linux-armv7l/egg/setuptools/extern/init.py", line 1, in <module>
ImportError: No module named extern
++++++++++++++++++++++++++
If I were to manually remove and reinstall...how might I do that?
Brandon Faloona
@bfaloona
Aug 27 2016 20:29
I'm not sure.
Did you run the sudo apt-get install python ... command above the easy_install step in the docs? http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-0/openaps.html
Did the --upgrade work?
garykidd
@garykidd
Aug 27 2016 20:34
in inverse order....the upgrade seemed to install without errors.
I did not ```sudo apt-get install python ....```` though
sudo apt-get install python .....
=========================================
I wonder can I just....
curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash -
Ben West
@bewest
Aug 27 2016 20:36
oy
package managers :-)
so, apt-get is debian's package manager
it installs software in places like /usr/lib and /usr/bin and similar locations, these are called the "system" locations
every software ecosystem such as python, node.js, ruby, php, etc additionally have their own package managers that also install files
garykidd
@garykidd
Aug 27 2016 20:39
OK....
listening.....
Ben West
@bewest
Aug 27 2016 20:39
but they install files in /usr/local/lib and /usr/local/bin and similar places, called the "local" locations
starting from a blank system, the goal is to use apt-get to install a basic working python and node js environment
and then use the package managers in those environments to install most of the actual packages and code used
garykidd
@garykidd
Aug 27 2016 20:41
....but I have a conflct becuase certian files are already in those certainlocations?
Ben West
@bewest
Aug 27 2016 20:41
python has two package mangers, though they mostly work the same way and know about the same packages
garykidd
@garykidd
Aug 27 2016 20:42
....sorry...listening..again...
Ben West
@bewest
Aug 27 2016 20:42
these different systems can be told to trample on each other
python has easy_install which is associated with a project called setuptools
it can be installed using apt-get or pip or easy_install, but it matters which one you do
in particular, once it's done, it's not great to mix installing against another one of the package mangers
garykidd
@garykidd
Aug 27 2016 20:43
copy that
Ben West
@bewest
Aug 27 2016 20:43
originally, I was using easy_install, but it's old
the recommended thing is to use distribute project, which is associated with the tool called pip
apt-get has these packages: python-pip and python-setuptools
so it's possible to do apt-get install python-pip python-setuptools; easy_install -U setuptools; pip install setuptools and get very confused about which version of setuptools is running now
fortunately, the packages get installed in fairly predictable locations somewhere under /path/to/site-packages/$package
apt-get should be used to install pip
and then pip should be used to install openaps
I think the version from apt-get is too old, so it does need to be updated, probably within pip itself, so ideally it's apt-get install python python-pip; pip install -U openaps for dev it's pip install -U git+git://github.com/openaps/openaps.git@dev
in your situation, it's saying pip is too old
Ben West
@bewest
Aug 27 2016 20:48
actually, not sure
i'd try using pip instead of easy_install
that's the main thing
if it's not working still, I'd try pip install -U setuptools
and then try pip again with openaps
garykidd
@garykidd
Aug 27 2016 21:01

pip install -U setuptools
Downloading/unpacking setuptools from https://pypi.python.org/packages/07/1a/19b5d2de13e1c300f703e7914031fe5fe449d19e0ded5a34db9f3e7969ff/setuptools-26.0.0-py2.py3-none-any.whl#md5=90f849c550beb22a5d24824f2b43b3b2
Downloading setuptools-26.0.0-py2.py3-none-any.whl (459kB): 459kB downloaded
Installing collected packages: setuptools
Found existing installation: setuptools 5.5.1
Not uninstalling setuptools at /usr/lib/python2.7/dist-packages, owned by OS
Can't roll back setuptools; was not uninstalled
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 295, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install
requirement.install(install_options, global_options, args, *kwargs)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 672, in install
self.move_wheel_files(self.source_dir, root=root)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 902, in move_wheel_files
pycompile=self.pycompile,
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 214, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 208, in clobber
shutil.copy2(srcfile, destfile)
File "/usr/lib/python2.7/shutil.py", line 130, in copy2
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/easy_install.pyc'

Storing debug log for failure in /home/pi/.pip/pip.log

Brandon Faloona
@bfaloona
Aug 27 2016 21:02
@benwest @scottleibrand This package manager discussion makes me think there is a lot of value in defining some sort of canonical install process, plus device/report/alias templates and config.
garykidd
@garykidd
Aug 27 2016 21:04
Do I maybe need to terminate openaps instance first?
Brandon Faloona
@bfaloona
Aug 27 2016 21:04
I've been thinking of writing a script to switch between my dev loop and my stable loop. Seems like including dependencies would be required, so I can use the dev branch on the dev loop, but fall back to released packages and stable loop with one command.
Martin Haeberli
@mhaeberli
Aug 27 2016 21:16
@scottleibrand :+1: to your "trying to build a complete loop" comment ...
Dana Lewis
@danamlewis
Aug 27 2016 21:19
I just did a test with the new setup scripts….ahhhh…feels so good to simplify! @bfaloona you’ll be a great next tester when we polish a few things up in it.
garykidd
@garykidd
Aug 27 2016 21:19
@bewest If I'm following correctly I should be using apt-get to install pip..... and then pip to install aopenaps..... got error there so tried what I pasted in above....
been stuck here for days now
Brandon Faloona
@bfaloona
Aug 27 2016 21:21
@garykidd My suggestion is to focus on removing first, as @bewest mentioned they can stomp on eachother. Your output above shows Found existing installation: setuptools 5.5.1
Or try dropping the -U to install in non-upgrade mode.
(but I don't know pip!!)
tazitoo
@tazitoo
Aug 27 2016 21:24
@garykidd - you might be missing a sudo in front of pip install -U setuptools?
Brandon Faloona
@bfaloona
Aug 27 2016 21:25
:clap:
:pray:
Martin Haeberli
@mhaeberli
Aug 27 2016 21:32
@danalewis @scottleibrand @ps2 what is the timeframe roughly on new boards for Edison?
Dana Lewis
@danamlewis
Aug 27 2016 21:33
I can’t speak to @ps2 @fjungman board, but the explorer board we’re working on I think is slated to get reviewed by SparkFun for inclusion on their site in mid-September
not sure what the turn around time is after that for it to go up and be orderable (assuming they approve), so optimistic would be end of September? (that’s just my take)
garykidd
@garykidd
Aug 27 2016 21:34
pi@raspberrypi:~/APS0 $ sudo pip install -U setuptools
Downloading/unpacking setuptools from https://pypi.python.org/packages/07/1a/19b5d2de13e1c300f703e7914031fe5fe449d19e0ded5a34db9f3e7969ff/setuptools-26.0.0-py2.py3-none-any.whl#md5=90f849c550beb22a5d24824f2b43b3b2
Downloading setuptools-26.0.0-py2.py3-none-any.whl (459kB): 459kB downloaded
Installing collected packages: setuptools
Found existing installation: setuptools 5.5.1
Not uninstalling setuptools at /usr/lib/python2.7/dist-packages, owned by OS
~~~~~~~~
Seems like that last line maybe causing issue
Martin Haeberli
@mhaeberli
Aug 27 2016 21:35
@danamlewis thx - looking forward to it - (where?) are specs published on the explorer board ?
garykidd
@garykidd
Aug 27 2016 21:37
I guess no one has had this or similar issue?
Dana Lewis
@danamlewis
Aug 27 2016 21:38
@mhaeberli nothing published yet, which I know is annoying, but it’s still a WIP.
I take that back, here’s what we’ve got so far:

HW:
https://github.com/EnhancedRadioDevices/915MHzEdisonExplorer
done and working

FW:
https://github.com/EnhancedRadioDevices/subg_rfspy
works, but needs some major alterations for the hardware

SW:
https://github.com/EnhancedRadioDevices/915MHzEdisonExplorer_SW
useful for testing, but needs extensive additions and documentation

which is still probably not what you’re looking for, but it’s the building blocks. and the goal is to have a new set of OpenAPS docs that will support building with this, similar to how rPi setup is documented.
Pete Schwamb
@ps2
Aug 27 2016 21:56
Is there any secret to getting into the ‘User Settings’ menu on a 522? B+Act works for me on 523G, but isn’t working on my 522.
Martin Haeberli
@mhaeberli
Aug 27 2016 21:58
@danamlewis :+1:
Dana Lewis
@danamlewis
Aug 27 2016 21:58
@ps2 I’m not able to get into it on my 522, says to consult user guide
Pete Schwamb
@ps2
Aug 27 2016 21:59
I even found a 522 user guide online, and it says B+Act should do it.
Dana Lewis
@danamlewis
Aug 27 2016 22:00
just tried again, no go for me
Martin Haeberli
@mhaeberli
Aug 27 2016 22:00
@ps2 - may not help (I'm googling from plane) - http://www.medtronicdiabetes.com/customer-support/device-settings-and-features/pump-information/saving-recording-restoring-your-pump-settings supposedly has suggestions. But I don't have the pump with me ...
Pete Schwamb
@ps2
Aug 27 2016 22:03
Ah, can’t do it with temp basal running. :)
Dana Lewis
@danamlewis
Aug 27 2016 22:03
ahhh, haha
that’d do it
although, i cancelled my temp and it still wouldn’t let me in
Pete Schwamb
@ps2
Aug 27 2016 22:04
Took me a couple tries, as Loop was too fast. :)
Dana Lewis
@danamlewis
Aug 27 2016 22:06
I cancelled and tried it immediately, but maybe it was already comm-ing again, we only have 5 edison rigs sitting on the table here :)
garykidd
@garykidd
Aug 27 2016 22:07
I'm now figuring tht removing that python2.7 was a mistake. thinking I have to start completely over unless soome one has any thoughts to try and salvage work thus far?
Brandon Faloona
@bfaloona
Aug 27 2016 22:09
@garykidd Starting over with installing dependencies sounds like a good plan. Sorry I could not be of more help.
garykidd
@garykidd
Aug 27 2016 22:31
is there any way to install/ re-install python interpreter without full OS installation?
Martin Haeberli
@mhaeberli
Aug 27 2016 22:33
@garykidd - probably - sudo apt-get install python (but google is your friend) (since I suspect you did a sudo apt-get remove python ..)
tazitoo
@tazitoo
Aug 27 2016 22:37
...yeah reverse course - apt-get install ... what you apt-get removed...
garykidd
@garykidd
Aug 27 2016 22:44
nope didnt apt-get remove. actually
pi@raspberrypi:~/APS0 $ pip install -U setuptools
-bash: /usr/bin/pip: /usr/bin/python: bad interpreter: No such file or directory
not sure why Iam getting this error now
MitchDex
@MitchDex
Aug 27 2016 22:51
script stalls at input="${1:-$(</dev/stdin)}" when trying to create ping.sh (Running an open loop with oref0). any thoughts????
Brandon Faloona
@bfaloona
Aug 27 2016 22:52
@garykidd Looks like python is not installed?
@MitchDex which script?
MitchDex
@MitchDex
Aug 27 2016 22:53

!/bin/bash

input="${1:-$(</dev/stdin)}"
input=${input//$'\n'/\n}
echo $input
if [ ! -z "$input" ]; then
echo "{\"body\": \"$input\"}"
echo "{\"type\": \"note\", \"title\":\"openAPS\", \"body\":\"$input\"}" | \
curl -u ACCESS_KEY: -X POST https://api.pushbullet.com/v2/pushes \
--header 'Content-Type: application/json' --data-binary @-
fi
Dana Lewis
@danamlewis
Aug 27 2016 22:53
Ah, you're wanting to do pushbullet?
MitchDex
@MitchDex
Aug 27 2016 22:54
i think so.... : )
Dana Lewis
@danamlewis
Aug 27 2016 22:54
Might be a @cjo20 q then, that just got added to the docs recently
MitchDex
@MitchDex
Aug 27 2016 22:55
i replaced "access_key" with key from pushbullet
Dana Lewis
@danamlewis
Aug 27 2016 22:55
(Not a requirement though if you want to keep going in the meantime though)
MitchDex
@MitchDex
Aug 27 2016 22:56
got it - will continue on then...was getting frustrated : )
Dana Lewis
@danamlewis
Aug 27 2016 22:56
there will be more of that to come, but this one is optional frustration :) until someone chimes in with some input, it’s not a blocker
MitchDex
@MitchDex
Aug 27 2016 23:01
:thumbsup:
garykidd
@garykidd
Aug 27 2016 23:56
@MitchDex
pi@raspberrypi:~/APS0 $ sudo apt-get install python-pip python-dev build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
python-dev is already the newest version.
python-pip is already the newest version.
The following packages were automatically installed and are no longer required:
libasn1-8-heimdal libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkrb5-26-heimdal
libroken18-heimdal libwind0-heimdal libxfce4ui-1-0 xfce-keyboard-shortcuts
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgra
sorry^^^
@bfaloona ^^^