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

30th
Aug 2016
Dana Lewis
@danamlewis
Aug 30 2016 00:01
Ah, seemed out of context given the first sentence/off topic for this channel.
diabeticgonewild
@diabeticgonewild
Aug 30 2016 00:01
Got it. Sorry. I was kind of being a b*** anyway
diabeticgonewild
@diabeticgonewild
Aug 30 2016 00:13
My healthcare is unbelievably expensive. Runs around $400,000-500,000 per year with the vast majority of the cost due to rare disease. I'm taking about what my two insurances pay in total over the course of a year: one government based primary insurance and one completely private secondary insurance. It makes you feel terrible and even worthless that you are raping the US healthcare system. Like the intravenous immunoglobulin dose of brand name Gamunex-C that I receive every 14 days is over half that cost. See image link below. Anyway, /rant over/
https://imgur.com/a/X7rdH
But whatever, back to work
garykidd
@garykidd
Aug 30 2016 00:32
sudo apt-get install python python-dev python-setuptools python-software-properties python-numpy python-pip nodejs-legacy npm
mostly worked but....

Fetched 19.8 MB in 20s (958 kB/s)
*E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/o/openssl/libssl-dev_1.0.1k-3+deb8u5_armhf.deb 404 Not Found [IP: 5.153.225.207 80]

E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/o/openssl/libssl-doc_1.0.1k-3+deb8u5_all.deb 404 Not Found [IP: 5.153.225.207 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?*

garykidd
@garykidd
Aug 30 2016 00:42
~~~~~~~~~~~~~~~
pi@raspberrypi:~/APS000 $ openaps vendor add openapscontrib.timezones
No module named openapscontrib.timezones
openapscontrib.timezones doesn't seem to be an importable python module
If it is a python module, try using --path to influence
PYTHONPATH
garykidd
@garykidd
Aug 30 2016 00:59
I just restarted from scratch today and would really appreciate some direction
thanks in advance.
diabeticgonewild
@diabeticgonewild
Aug 30 2016 01:56
sudo apt-get install --fix-missing
sudo apt-get update
Do both
Then run the stuff you need to run? And report back
Ben West
@bewest
Aug 30 2016 02:28
specifically, for openapscontrib.timezones doesn't seem to be an importable python module, try installing openaps-contrib
sudo pip install openaps-contrib
diabeticgonewild
@diabeticgonewild
Aug 30 2016 03:29

Oh @danamlewis in case you are wondering, I was kind of irritated at the DOC for going at their own driven "social blitz" at big pharma for the ridiculous prices they charge for non-negotiable medicines, like insulin, AFTER people with EPI-PENS blitzed that Mylan CEO for rising the price of the EPI-PEN over 400% in X? Time.

If we all banded together, as patients from all sorts of chronic illnesses, so much more could be acheived.

BTW, my sister was going to be charged over $800 for 2 EPI-PENS. She has to carry them now after having going into anaphylaxis after receiving allergy shots. But, her allergy doctor gave her a coupon which dropped the price to like $150. Crazy.
This was recently, in the past 6 months.
garykidd
@garykidd
Aug 30 2016 04:10
pi@raspberrypi:~/APS000 $ openaps vendor add openapscontrib.timezones
added openapscontrib.timezones://
BINGO!
@diabeticgonewild @bewest Thank You
Brandon Faloona
@bfaloona
Aug 30 2016 04:12
:fire: :sparkles: :rocket:
garykidd
@garykidd
Aug 30 2016 04:14
@bfaloona my bad...Thank You very much too! Progress is good....even if slow.
Brandon Faloona
@bfaloona
Aug 30 2016 04:15
No worries. I'm excited you are making progress. I've had a few major setbacks too.
Anyone know how I might modify the docs /requirements.txt to point to a local repo of openaps?
garykidd
@garykidd
Aug 30 2016 04:32
1 step forward .875 steps back.....
pi@raspberrypi:~/APS000 $ oref0 template mint reports medtronic-pump | openaps import
bash: oref0: command not found
Traceback (most recent call last):
File "/usr/local/bin/openaps-import", line 89, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/bin/openaps-import", line 77, in run
candidates = json.load(args.input)
File "/usr/lib/python2.7/json/init.py", line 290, in load
**kw)
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
====================================================================
thoughts?
Brandon Faloona
@bfaloona
Aug 30 2016 04:53
What do you get from sudo npm install -g oref0 ?
Matthias
@ceben80
Aug 30 2016 04:56
@danamlewis
Good morning :wink:
Short Q regarding AMA, today morning I have set Carbs and Insulin in my pump per BolusExpert, but my loop is setting my TBR now to zero.
Look into this screenshot, what could be the reason Meal Assist set to Off :question:
blob
garykidd
@garykidd
Aug 30 2016 05:03
pi@raspberrypi:~ $ sudo npm install -g oref0
sudo: npm: command not found
Scott Leibrand
@scottleibrand
Aug 30 2016 05:03

That's not AMA, it's old school meal assist. You'd need to upgrade to oref0 dev to get AMA.

Need to also know your IC ratio to tell if all the carbs have already need covered by your bolus.

@garykidd what install instructions are you following? Did you run quick-packages.sh?
garykidd
@garykidd
Aug 30 2016 05:05
@scottleibrand you may recall my issue with pythin that forced me to re-leash jessie/start over altogether.
too some time but just stated following the rtd file verbatim
Scott Leibrand
@scottleibrand
Aug 30 2016 05:05
Yeah. Then did you follow the setup instructions to install openaps oref0 etc?
If so, quick-packages failed.
It installs openapscontrib, among other things.
Matthias
@ceben80
Aug 30 2016 05:06
thx @scottleibrand will do the upgrade
garykidd
@garykidd
Aug 30 2016 05:06
till I got to....curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash -
Scott Leibrand
@scottleibrand
Aug 30 2016 05:06
There might be an earlier step that installs npm.
If so, looks like that failed too.
garykidd
@garykidd
Aug 30 2016 05:08
which i didn't do rather I ....sudo pip install -U git+git://github.com/openaps/openaps.git@dev
followed by sudo apt-get install python python-dev python-setuptools python-software-properties python-numpy python-pip nodejs-legacy npm
Scott Leibrand
@scottleibrand
Aug 30 2016 05:09
That last one failed. Retry it?
garykidd
@garykidd
Aug 30 2016 05:10
followed by
sudo apt-get install --fix-missing and
sudo apt-get update
Scott Leibrand
@scottleibrand
Aug 30 2016 05:11
The nodejs-legacy and npm packages are the two you need for the npm error.
But you can rerun the entire command and see what it says.
garykidd
@garykidd
Aug 30 2016 05:11
@scottleibrand thanks....copy that.
unpacking a lot right now....
good sign.
pi@raspberrypi:~ $ oref0 template mint reports medtronic-MM715 | openaps import
-bash: oref0: command not found
Traceback (most recent call last):
File "/usr/local/bin/openaps-import", line 89, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/bin/openaps-import", line 77, in run
candidates = json.load(args.input)
File "/usr/lib/python2.7/json/init.py", line 290, in load
**kw)
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
==============
seemed to nodejs-legacy and npm pkgs...b4 trying above...
Matthias
@ceben80
Aug 30 2016 05:15
@scottleibrand would you mind give me quickly the command for upgrade to dev - thanks in advance :wink:
garykidd
@garykidd
Aug 30 2016 05:18
pi@raspberrypi:~ $ oref0 template mint reports medtronic-pump | openaps import
-bash: oref0: command not found
Traceback (most recent call last):
File "/usr/local/bin/openaps-import", line 89, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/bin/openaps-import", line 77, in run
candidates = json.load(args.input)
File "/usr/lib/python2.7/json/init.py", line 290, in load
**kw)
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Scott Leibrand
@scottleibrand
Aug 30 2016 05:18
@mgranberry The sudo pip install -U git+git://github.com/openaps/openaps.git@dev one Gary just pasted should work.
Matthias
@ceben80
Aug 30 2016 05:21
:+1:
pi@aps-ti:~/myopenaps $ openaps --version
openaps 0.1.6-dev
Thanks again for your time Scott :clap:
garykidd
@garykidd
Aug 30 2016 05:24
@scottleibrand should Icontinue on following the rtd in spite of error/s poste dabove.
?
++++++++++++++++++++++++++++
Assuming this is correct/correct flow.....

openaps device add pump medtronic

Then to configure the new pump device with its serial number:

openaps use pump config --serial 123456

Create bunch of reports:

oref0 template mint reports medtronic-pump | openaps import

???
Scott Leibrand
@scottleibrand
Aug 30 2016 05:29
Did you re-run everything in order after the command you had to re-do?
Assume everything depends on the thing before it.
diabeticgonewild
@diabeticgonewild
Aug 30 2016 06:14
You're welcome @garykidd :)
Matthias
@ceben80
Aug 30 2016 07:06

@scottleibrand @bewest
Q to preferences.json I found the underneath here in intend-to-bolus

Looks as variable definitions outside the source code, great.
Simply nano this lines to preferences.json :question:

How does this work that the variables are read from the code?

{
  "max_iob": 2.5,
  "max_daily_safety_multiplier": 5,
  "current_basal_safety_multiplier": 6,
  "autosens_max": 1.5,
  "autosens_min": 0.9,
  "autosens_adjust_targets": true,
  "override_high_target_with_low": true,
  "min_5m_carbimpact": 4,
  "carbratio_adjustmentratio": 0.9
}
Scott Leibrand
@scottleibrand
Aug 30 2016 07:45
Those are rather high multipliers. I wouldn't use those values unless you've read the code that implements them and know exactly why you want to do so.
The oref0-profile command (I think) has a switch to spit out the defaults for all of them.
garykidd
@garykidd
Aug 30 2016 13:56
anyone get this error....Could not find .egg-info directory in install record for openaps==0.1.6.dev0 from git+git://github.com/openaps/openaps.git@dev in /usr/local/lib/python2.7/dist-packages
Brandon Faloona
@bfaloona
Aug 30 2016 15:19
Not sure about that error @garykidd . Do you really want to use the dev branches? I'm not recommending one way or another, but I'm curious what you want.
I just googled your .egg-info error. Looks like it could be an older version of setuptools or pip causing that.
Try this:
pip install --upgrade setuptools pip
garykidd
@garykidd
Aug 30 2016 15:33
This message was deleted
==========================================================================

pi@raspberrypi:~/APS000 $ pip install --upgrade setuptools pip
Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages/setuptools-26.1.1-py2.7.egg
Downloading/unpacking pip from https://pypi.python.org/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-8.1.2-py2.py3-none-any.whl#md5=0570520434c5b600d89ec95393b2650b
Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB): 1.2MB downloaded
Installing collected packages: pip
Found existing installation: pip 1.5.6
Not uninstalling pip at /usr/lib/python2.7/dist-packages, owned by OS
Can't roll back pip; 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 204, in clobber
os.makedirs(destdir)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pip-8.1.2.dist-info'

Storing debug log for failure in /home/pi/.pip/pip.log
pi@raspberrypi:~/APS000 $

Brandon Faloona
@bfaloona
Aug 30 2016 15:35
Sorry, you'll need sudo in front of that command, so it has permissions
@garykidd When pasting in console text or code, you might want to use the 'backtick' character to help with readability.
Text surrounded by single backtick uses this format: sudo
Text with THREE backticks before and three after uses the multi-line format, but requires you to use Shift-Enter to get a new line while avoiding submitting your comment in gitter.
Brandon Faloona
@bfaloona
Aug 30 2016 15:41
Looks like three backticks followed by Enter key avoids the need for Shift-Enter because gitter changes keyboard modes.
Example console output:
/Users/brandon/dev/aps/openaps/docs/docs/reference/openaps/openaps-trigger.md:: WARNING: document isn't included in any toctree
/Users/brandon/dev/aps/openaps/docs/docs/reference/openaps/openaps-use.md:: WARNING: document isn't included in any toctree
/Users/brandon/dev/aps/openaps/docs/docs/reference/openaps/openaps-vendor.md:: WARNING: document isn't included in any toctree
done
preparing documents... done
writing output... [100%] reference/oref0/oref0-reset-usb                                                                       
generating indices... genindex py-modindex
Eric
@ecc1
Aug 30 2016 15:56
This is probably obvious to everyone, but just in case it's helpful: you can use your phone with a USB OTG cable and a serial terminal app to log in to your Edison in an emergency (when it's not connected to a network etc). Verified using the FTDI connector on a mini-breakout board, and DroidTerm on my Android phone.
garykidd
@garykidd
Aug 30 2016 15:59
pi@raspberrypi:~/APS000 $ sudo pip install --upgrade setuptools pip Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages/setuptools-26.1.1-py2.7.egg Downloading/unpacking pip from https://pypi.python.org/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-8.1.2-py2.py3-none-any.whl#md5=0570520434c5b600d89ec95393b2650b Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB): 1.2MB downloaded Installing collected packages: pip Found existing installation: pip 1.5.6 Not uninstalling pip at /usr/lib/python2.7/dist-packages, owned by OS Successfully installed pip Cleaning up...
pi@raspberrypi:~/APS000 $ sudo pip install --upgrade setuptools pip Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages/setuptools-26.1.1-py2.7.egg Downloading/unpacking pip from https://pypi.python.org/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-8.1.2-py2.py3-none-any.whl#md5=0570520434c5b600d89ec95393b2650b Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB): 1.2MB downloaded Installing collected packages: pip Found existing installation: pip 1.5.6 Not uninstalling pip at /usr/lib/python2.7/dist-packages, owned by OS Successfully installed pip Cleaning up...
Tim Street
@tim2000s
Aug 30 2016 16:16
Right guys, dumb question, but how do I pass the output from ns get entries into monitor/glucose.json ? I'm using nightscout as my glucose data source due to 640G integration.
Brandon Faloona
@bfaloona
Aug 30 2016 16:17
Scott Leibrand
@scottleibrand
Aug 30 2016 16:18
@ecc1 that was not obvious, thanks. I've only tried that from a laptop.
Jarred Yaw
@jyaw
Aug 30 2016 16:26
My a1c was 5.6 today! Wahoo! Still got some things to work on but that number tho.
Dana Lewis
@danamlewis
Aug 30 2016 16:27
:) :confetti_ball:
Jarred Yaw
@jyaw
Aug 30 2016 16:27
I usually ran 7-8 pre OpenAPS
Dana Lewis
@danamlewis
Aug 30 2016 16:29
I can't wait til we have the infrastructure in place to do a study with (those in the community who want to donate their data/share what their outcomes have been), to build on the first study with 18 folks.
Jarred Yaw
@jyaw
Aug 30 2016 16:37
That would be incredible data to have!
Tim Street
@tim2000s
Aug 30 2016 16:49
So as an answer to my earlier question, I've replaced monitor/glucose.json with nightscout/glucose.json which pulls the ns entries down, however, I'm fairly sure there is an issue with the formatting. Are there any reports/conversions I'm missing?
Colin Lennon
@colinlennon
Aug 30 2016 16:52
@tim2000s in the file coming from NS, does each record have a "glucose" field?
Tim Street
@tim2000s
Aug 30 2016 16:53
@scottleibrand @jkelleher This is exactly what I'm doing with 640G collecting data and 522 being acted on by openAPS. Got some plans to build a mongoDB on the Pi and write from the 640 Uploader via BLE to the Pi but that's a way off. In the meantime I'm pulling the data from nightscout, but I haven't got that working properly yet.
@colinlennon No, it has an "sgv" field, in mg/dl.
Colin Lennon
@colinlennon
Aug 30 2016 16:56
You need to pipe the output into json then. I'm on the train so don't have the details, but it's in the docs
json - e 'this. glucose' = 'this. sgv'
Something like that I think
Tim Street
@tim2000s
Aug 30 2016 16:58
I'll have a dig through and see what I can find.
Thanks.
That's the issue - I can't see it in the docs!
Ben West
@bewest
Aug 30 2016 17:07
shouldn't need that
@bfaloona I'd rather someone filled them out rather than delete them
that part of the guide is focused on how to use the openaps tools, which is quite different from a walkthrough/how-to-build a "loop"
for most of that guide, you can work through the material without any medical devices
Brandon Faloona
@bfaloona
Aug 30 2016 17:12
I've removed them in this PR. Happy to yank that change out if you prefer.
openaps/docs#372
And I've opened this bug to address the local links issue: openaps/docs#371
I'm keen to see that resolved soon because people are going to the docs, but then being sent to dead ends.
Brandon Faloona
@bfaloona
Aug 30 2016 17:20
PR 372 touches the .rst files that sphinx uses to display table of contents, next and prev links, as well as links in general (??). So, I'm hoping someone can confirm that that change does not break the flow of the walkthrough, for example, when using the next/previous links or table of contents.
Tom Boudreau
@TomBoudr_twitter
Aug 30 2016 17:25
@danamlewis @jyaw I went from high 6s and low 7s using a CGM to a 5.6 with OpenAPS
hey Q for anyone... I'm new to a G5... how do I use it past its 1 week schedule?
thannett
@thannett
Aug 30 2016 17:26
Just stop and restart the sensor.
Tom Boudreau
@TomBoudr_twitter
Aug 30 2016 17:29
perfect
thanks @thannett
thannett
@thannett
Aug 30 2016 17:29
:smile:
Tim Street
@tim2000s
Aug 30 2016 17:34
This is what I'm getting from NS @colinlennon
blob
Tom Boudreau
@TomBoudr_twitter
Aug 30 2016 17:38
@thannett I'm already adicting to CGM data on my watch, took a whole 24 hours.
garykidd
@garykidd
Aug 30 2016 17:39
is this an issue..
This message was deleted
This message was deleted
This message was deleted
garykidd
@garykidd
Aug 30 2016 17:45
oref0 template mint reports medtronic-pump | openaps import
pump://JSON/read_bg_targets/raw-pump/bg-targets-raw.json
units://JSON/bg_targets/settings/bg-targets.json
pump://JSON/read_insulin_sensitivities/raw-pump/insulin-sensitivities-raw.json
units://JSON/insulin_sensitivities/settings/insulin-sensitivities.json
pump://JSON/read_clock/raw-pump/clock-raw.json
tz://JSON/clock/monitor/clock.json
pump://JSON/read_temp_basal/monitor/temp-basal-status.json
determine-basal://text/shell/oref0-predict/oref0.json
pump://JSON/iter_pump_hours/raw-pump/pump-history-raw.json
tz://JSON/rezone/monitor/pump-history.json
pump://JSON/model/model.json
pump://JSON/reservoir/monitor/reservoir.json
pump://JSON/read_status/monitor/status.json
pump://JSON/read_battery_status/monitor/battery.json
pump://JSON/set_temp_basal/oref0-enacted/enacted-temp-basal.json
oref0://JSON/shell/settings/settings.json
pump://JSON/read_settings/raw-pump/settings.json
oref0://JSON/shell/settings/selected-basal-profile.json
pump://JSON/read_selected_basal_profile/raw-pump/selected-basal-profile.json
pump://JSON/read_temp_basal/raw-pump/temp-basal-status.json
pump://JSON/reservoir/raw-pump/reservoir.json
pump://JSON/read_status/raw-pump/status.json
pump://JSON/read_battery_status/raw-pump/battery.json
Traceback (most recent call last):
File "/usr/local/bin/openaps-import", line 89, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 52, in call
self.epilog( )
File "/usr/local/bin/openaps-import", line 50, in epilog
super(ImportToolApp, self).epilog( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 75, in epilog
self.create_git_commit( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 82, in create_git_commit
self.git_repo( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 78, in git_repo
self.repo = getattr(self, 'repo', Repo(os.getcwd( ), odbt=GitCmdObjectDB))
File "/usr/local/lib/python2.7/dist-packages/git/repo/base.py", line 171, in init
raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: /home/pi

What's with the traceback errors?
Colin Lennon
@colinlennon
Aug 30 2016 17:48
@tim2000s I'm home now so I should be able to help! Do you have a device called 'curl'? If so, could you copy the definition of it from your openaps.ini file?
garykidd
@garykidd
Aug 30 2016 18:00
This message was deleted
is there a new method/script to install latest master or dev openaps besides following this....in particlar first two entries....
?
After trying sudo pip install -U git+git://github.com/openaps/openaps.git@dev
I get continued errors that I cant resolve.
Tim Street
@tim2000s
Aug 30 2016 18:08
Hi @colinlennon , no I don't.
Colin Lennon
@colinlennon
Aug 30 2016 18:15
@tim2000s your nightscout/glucose.json report will use a device. I think it's that device we need to check. It might be called something other than 'curl'. If you check the report, that should give you the device name
Brandon Faloona
@bfaloona
Aug 30 2016 18:15
@garykidd Can you run git status in your project directory? The error above makes me think you ran this command in the wrong directory.
Tim Street
@tim2000s
Aug 30 2016 18:16
@colinlennon it's using the device ns
Colin Lennon
@colinlennon
Aug 30 2016 18:19
@tim2000s Ah! Okay. Could you copy the definition for that device and paste it in?
Tim Street
@tim2000s
Aug 30 2016 18:23
This message was deleted
[device "ns"]
fields = oper
cmd = nightscout
args = ns https://
I've removed the data from the nightscout site and REST API secret
Colin Lennon
@colinlennon
Aug 30 2016 18:29
@tim2000s Hmmm, okay. I've just had a look at the docs and it looks like a new device "ns" has been added since I set my loop up
garykidd
@garykidd
Aug 30 2016 18:30

git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)

DEXCGM.ini
MM715-session.json
MM715.ini
cgm.ini
tz.ini

nothing added to commit but untracked files present (use "git add" to track)

Tim Street
@tim2000s
Aug 30 2016 18:30
Ah! Interesting
Colin Lennon
@colinlennon
Aug 30 2016 18:30
@tim2000s so I don't think the problem is what I thought it was.
@tim2000s What makes you think there's an issue with the formatting?
garykidd
@garykidd
Aug 30 2016 18:32
openaps report invoke raw-cgm/glucose-raw.json
cgm://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 82, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/bin/openaps-report", line 75, in run
output = app(args, self)
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/subcommand.py", line 52, in call
return self.method.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps/reports/invoke.py", line 40, in main
output = task.method(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 45, in call
output = self.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/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/readdata.py", line 300, in iter_records
for x in reversed(xrange(start, end)):
OverflowError: Python int too large to convert to C long
Tim Street
@tim2000s
Aug 30 2016 18:33
@colinlennon The error messages I was getting.
@colinlennon however, running it again, it looks as though I may be wrong. I've gone through all the reports and changed the calling of monitor/glucose.json to nightscout/glucose.json.
But it appears that monitor/glucose.json is called from the python code.
Colin Lennon
@colinlennon
Aug 30 2016 18:36
@tim2000s Yeah, I know it's just a portion of the file, but from the screenshot you pasted in above, the format looks good.
Tim Street
@tim2000s
Aug 30 2016 18:36
And I'm not clear how to invoke a report that writes from a process I've set up to a file in a different directory.
Colin Lennon
@colinlennon
Aug 30 2016 18:37
So your report is written to the 'nightscout' directory now?
Tim Street
@tim2000s
Aug 30 2016 18:38
When you invoke the nightscout report for device ns it writes to the nightscout directory automatically.
Colin Lennon
@colinlennon
Aug 30 2016 18:38
This message was deleted
I think that's just because the report is called nightscout/glucose.json. For example, you edit openaps.ini, find the entry for that report and change it to monitor/glucose.json, the file would be created in the monitor directory.
The output directory is determined by the report name
Tim Street
@tim2000s
Aug 30 2016 18:41
Ah. Okay. I'll give it a whirl
Back in 5 minutes
Colin Lennon
@colinlennon
Aug 30 2016 18:42
:+1:
Tim Street
@tim2000s
Aug 30 2016 18:45
Okay, so this is what happens when we try run openaps do-everything:
PREFLIGHT OK
ns://JSON/shell/monitor/glucose.json
reporting monitor/glucose.json
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 743, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1531, 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 29, in main
    app.parser.set_defaults(**task.method.from_ini(report.fields))
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/process.py", line 67, in from_ini
    fields.update(remainder=fields.get('remainder', [ ]).strip( ).split(' '))
AttributeError: 'list' object has no attribute 'strip'
Colin Lennon
@colinlennon
Aug 30 2016 18:47
Hmmm. Could you try running this - openaps report invoke monitor/glucose.json
Tim Street
@tim2000s
Aug 30 2016 18:47
That produces the earlier file.
Colin Lennon
@colinlennon
Aug 30 2016 18:48
Okay, I think the problem definitely lies elsewhere then. I would suggest running each openaps command that is included in your do-everything alias, one-by-one
That way, you can pinpoint which one is generating the error
Tim Street
@tim2000s
Aug 30 2016 18:54
Yes - got it - looks like I had a double entry in one of the lines, playing havoc.
Looks like there may be something similar on pump data conversion - will have to double check.
Tim Street
@tim2000s
Aug 30 2016 19:04
Thanks for the help @colinlennon
Tim Street
@tim2000s
Aug 30 2016 19:28

Okay - another question. Can you see what's wrong with this:

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

That would produce this error?

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 743, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1531, 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 23, in main
    device = app.devices[report.fields['device']]
KeyError: 'units'
It looks as though I may be missing the units device...
Colin Lennon
@colinlennon
Aug 30 2016 19:42
@tim2000s that could be it, yep. I have a units device which is used to convert bg targets and insulin sensitivities. The glucose values I pull from Nightscout are in mg/dl, same as you, and I don't convert them. Maybe that has changed more recently - I'm a few releases behind you.
Sorry, just read your posts in more detail. It looks like it is bg targets and yes, I think you just need to add a units device :+1:
Tim Street
@tim2000s
Aug 30 2016 19:44
So, long story. The nightscout set-up was pulling mg/dl, and I'd a double call in the alias to pull that data. The pump data is all in mmol/l and I'd used the templates to generate the required reports etc. Unfortunately, the templates don't create the "units" device, and that's where I'm now breaking.
Colin Lennon
@colinlennon
Aug 30 2016 19:46
Ah okay. You may be the first person in the UK/commonwealth using the templates
Tim Street
@tim2000s
Aug 30 2016 19:48
Well we should be good shortly.
Colin Lennon
@colinlennon
Aug 30 2016 19:48
:+1:
Tim Street
@tim2000s
Aug 30 2016 19:49
Once I've done it this way, I should have an idea of all the pitfalls, so that when I try and use the loop on iphone, it will all make sense!
Colin Lennon
@colinlennon
Aug 30 2016 19:50
@tim2000s Off-topic Tim, but do you know if you'll have any issues getting infusion sets for an old Medtronic pump? You're NHS funded, right? The sets are different for the older ones. I think the 640g uses a standard Luer lock, the Paradigms use a proprietary connector.
Tim Street
@tim2000s
Aug 30 2016 19:50
No, it's no differeny.
The 640G and the Paradigms all use the same sets
Colin Lennon
@colinlennon
Aug 30 2016 19:51
Oh really? That's interesting. The boxes I get are specifically labelled "Paradigm" but you're not the first person to tell me that there's no difference!
boxes of infusion sets, that is
Tim Street
@tim2000s
Aug 30 2016 19:59
And Boom! Adding the device units has it doing what it's supposed to!
Colin Lennon
@colinlennon
Aug 30 2016 20:01
woohoo :smile:
Matthew Williams
@mwilliams
Aug 30 2016 20:02
Just got all my hardware talking with OpenAPS - fired up a brand new sensor on my old pump which Im about to start a new set on. I'll definitely be hacking tonight - sooooo stoked.
Tim Street
@tim2000s
Aug 30 2016 20:04
Awesome. Breakthrough. Glucose data received, and tbr sent to pump as a result. And TBR is in line with what the 640G has already done, so that's spot on!
Matthew Williams
@mwilliams
Aug 30 2016 20:08
@tim2000s Wow!!!
Tim Street
@tim2000s
Aug 30 2016 20:08
Moving on to the uploading to nightscout, any ideas as to why the following is happening?
openaps report invoke nightscout/recent-missing-entries.json
ns://JSON/shell/nightscout/recent-missing-entries.json
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 743, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1531, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, 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-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__
    return self.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_contrib-0.0.15-py2.7.egg/openapscontrib/timezones/__init__.py", line 298, in main
    if spec.includes(get(elem)):
  File "/usr/local/lib/python2.7/dist-packages/openaps_contrib-0.0.15-py2.7.egg/openapscontrib/timezones/__init__.py", line 264, in get
    return parse(item.get(args.date))
  File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 1164, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 552, in parse
    res, skipped_tokens = self._parse(timestr, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 671, in _parse
    l = _timelex.split(timestr)         # Splits the timestr into tokens
  File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 188, in split
    return list(cls(s))
  File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 184, in next
    return self.__next__()  # Python 2.x support
  File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 177, in __next__
    token = self.get_token()
  File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 93, in get_token
    nextchar = self.instream.read(1)
AttributeError: 'NoneType' object has no attribute 'read'
No JSON object could be decoded
Brandon Faloona
@bfaloona
Aug 30 2016 20:21
Looks like your Jason Object is of NoneType. Is one of the files used by the nightscout/recent-missing-entries.json report empty?
openaps report show --cli nightscout/recent-missing-entries.json
Tim Street
@tim2000s
Aug 30 2016 20:22
This message was deleted
openaps use ns shell format-recent-type tz entries monitor/glucose.json
And that's definitely not an empty file
Brandon Faloona
@bfaloona
Aug 30 2016 20:25
hmm. Well, the code is trying to parse a date, if that's any help.
(I'm just assuming based on the traceback)
Tim Street
@tim2000s
Aug 30 2016 20:31
I'm wondering what's missing. This is the report:
[report "nightscout/recent-missing-entries.json"]
oper = format-recent-type
use = shell
reporter = JSON
device = ns
remainder = tz entries monitor/glucose.json
json_default = True
Colin Lennon
@colinlennon
Aug 30 2016 20:43
@tim2000s I can't help you with that one I'm afraid, I'm using the old NS upload method (I really need to switch to the new method when I get a chance)
@mwilliams Good luck!
Jarred Yaw
@jyaw
Aug 30 2016 21:36
@TomBoudr_twitter that's awesome! I was in the 7s, but I didn't really ever use a cgm (until about a month before starting my closed loop) because of bad Medtronic experiences. So essentially, I was low (and high) a lot. The 5.6 number is insanely great with my perceived improvement with time in range. Its incredibly cool.
Ben West
@bewest
Aug 30 2016 22:15
for uploading, consider using upload-non-empty-treatments
if there's nothing new to upload, it won't try to upload an empty document
oop, sorry
upload-non-empty-type
upload-non-empty-type entries.json nightscout/recent-missing-entries.json
type nightscout ns help for extended help
Brandon Faloona
@bfaloona
Aug 30 2016 22:54

I've got some date problems! Oh my. All dates appear correct: Pi, nightscout cgm, and pump all agree on recent time, but my IOB report (below) is for the wrong day!

Anyone have any ideas?

pi@openaps-lp:~/openaps-lp3 $ date --utc
Tue 30 Aug 22:50:07 UTC 2016

pi@openaps-lp:~/openaps-lp3 $ date
Tue 30 Aug 15:50:15 PDT 2016

pi@openaps-lp:~/openaps-lp3 $ openaps use pump read_clock
"2016-08-30T15:50:39"

pi@openaps-lp:~/openaps-lp3 $ head monitor/glucose.json cgm/glucose.json  cgm/ns-glucose.json 
==> monitor/glucose.json <==
[
  {
    "_id": "57c60ac50b12fbe73f0c9f94",
    "sgv": 143,
    "date": 1472596649000,
    "dateString": "2016-08-30T22:37:29.000Z",
    "trend": 4,
    "direction": "Flat",
    "device": "share2",
    "type": "sgv",

==> cgm/glucose.json <==
[
  {
    "_id": "57c60ac50b12fbe73f0c9f94",
    "sgv": 143,
    "date": 1472596649000,
    "dateString": "2016-08-30T22:37:29.000Z",
    "trend": 4,
    "direction": "Flat",
    "device": "share2",
    "type": "sgv",

==> cgm/ns-glucose.json <==
[
  {
    "_id": "57c60ac50b12fbe73f0c9f94",
    "sgv": 143,
    "date": 1472596649000,
    "dateString": "2016-08-30T22:37:29.000Z",
    "trend": 4,
    "direction": "Flat",
    "device": "share2",
    "type": "sgv",


pi@openaps-lp:~/openaps-lp3 $ openaps use iob shell monitor/pumphistory-zoned.json settings/profile.json monitor/clock-zoned.json|tail

  {
    "netbasalinsulin": 0, 
    "activity": 0, 
    "basaliob": 0, 
    "time": "2016-08-31T03:04:22.000Z", 
    "hightempinsulin": 0, 
    "bolussnooze": 0, 
    "iob": 0
  }
]
garykidd
@garykidd
Aug 30 2016 23:08
pi@raspberrypi:~/APS000 $ openaps report add raw-cgm/glucose-raw.json JSON cgm oref0_glucose --no-raw --hours 2.0
added cgm://JSON/oref0_glucose/raw-cgm/glucose-raw.json
pi@raspberrypi:~/APS000 $ openaps use cgm config --G5
{
"model": "G5"
}pi@raspberrypi:~/APS000 $ openaps report invoke raw-cgm/glucose-raw.json
cgm://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 82, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/bin/openaps-report", line 75, in run
output = app(args, self)
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/subcommand.py", line 52, in call
return self.method.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps/reports/invoke.py", line 40, in main
output = task.method(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 45, in call
output = self.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/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/readdata.py", line 300, in iter_records
for x in reversed(xrange(start, end)):
OverflowError: Python int too large to convert to C long
Appreciate any/all help...thx
Ben West
@bewest
Aug 30 2016 23:35
update dexcom_reader: rm -Rf ~/src/dexcom_reader; sudo pip install -U dexcom_reader
garykidd
@garykidd
Aug 30 2016 23:44
pi@raspberrypi:~/APS000 $ rm -Rf ~/src/dexcom_reader; sudo pip install -U dexcom_reader
rm: cannot remove ‘/home/pi/src/dexcom_reader/dexcom_reader.egg-info/top_level.txt’: Permission denied
rm: cannot remove ‘/home/pi/src/dexcom_reader/dexcom_reader.egg-info/PKG-INFO’: Permission denied
rm: cannot remove ‘/home/pi/src/dexcom_reader/dexcom_reader.egg-info/requires.txt’: Permission denied
rm: cannot remove ‘/home/pi/src/dexcom_reader/dexcom_reader.egg-info/dependency_links.txt’: Permission denied
rm: cannot remove ‘/home/pi/src/dexcom_reader/dexcom_reader.egg-info/not-zip-safe’: Permission denied
rm: cannot remove ‘/home/pi/src/dexcom_reader/dexcom_reader.egg-info/SOURCES.txt’: Permission denied
Requirement already up-to-date: dexcom_reader in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: pyserial in /usr/local/lib/python2.7/dist-packages (from dexcom_reader)
pi@raspberrypi:~/APS000 $ openaps report invoke raw-cgm/glucose-raw.json
cgm://JSON/oref0_glucose/raw-cgm/glucose-raw.json
raw-cgm/glucose-raw.json raised Python int too large to convert to C long
This message was deleted
This message was deleted
This message was deleted
sudo rm -Rf ~/src/dexcom_reader; sudo pip install -U dexcom_reader ?