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

10th
Sep 2016
garykidd
@garykidd
Sep 10 2016 00:19
ok got that to work...on to next step.
thx @Spazholio
garykidd
@garykidd
Sep 10 2016 00:25
So up to ....Edit src/programmer/cc_programmer.cpp should I nano src/programmer/cc_programmer.cpp ?
Jason Calabrese
@jasoncalabrese
Sep 10 2016 00:31
Yeah, nano is probably the easiest
garykidd
@garykidd
Sep 10 2016 00:45
@jasoncalabrese so I'm actually up to last step on that page....
Flash it with sudo cc-tool --log install.log -ew PATH-TO-YOUR-HEX-FILE.hex
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
So my question relating to is.... Do I need to supply a hexfile? Or is this asking me for a path to which to save a hex file? and if so, where should I point it?
Scott Leibrand
@scottleibrand
Sep 10 2016 00:51
The hex files are in the releases section of the subg_rfspy repo on github.
David
@davidkeddydb
Sep 10 2016 01:00
I am working on monitor/glucose-zoned.json as I have a time issue I can't see to work out. Where can I see the code for timezone? I can try est, but I am betting it is not that simple.
Paul Martin
@Spazholio
Sep 10 2016 01:05
What’s the issue, and how are you creating the -zoned report?
garykidd
@garykidd
Sep 10 2016 01:08
@scottleibrand know why I am getting this error.....so close....
pi@raspberrypi:~/cc-tool/subg_rfspy $ sudo cc-tool --log install.log -ew /Users/g/Desktop/usb_ep0_TI_DONGLE_US_CCBOOTLOADER.hex 
  Error occured: Unable to open file /Users/g/Desktop/usb_ep0_TI_DONGLE_US_CCBOOTLOADER.hex
I know that's the right path
David
@davidkeddydb
Sep 10 2016 01:11
@Spazholio I am doing this, but it isnt working: http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-1/visualization.html well, I keep running into a clock issue with the missing-entries report
. on the missing-entries,json when trying openaps do-everything I get an error kicked that says: TypeError: can't compare offset-naive and offset-aware datetimes
I was going to use this but uncertain of how timezone needs to be entered: openaps use tz clock --timezone "[YOUR TIMEZONE]" --adjust "missing" --date "None" --astimezone monitor/clock.json
Scott Leibrand
@scottleibrand
Sep 10 2016 01:15
@garykidd I've never used Linux for that. I recommend the TI flashing app for Windows if you have a PC.
Michael
@MichaelGuarin0
Sep 10 2016 01:26
Im in the process of debugging my nightscout install and am going through the nightscout document. I've already installed node.js on my system and have already cloned https://github.com/nightscout/cgm-remote-monitor.git. I then run npm install command. It goes through the steps successfully then starts throwing errors starting with a build error.

pi@raspberrypi:~/sasha/cgm-remote-monitor $ npm install
npm WARN package.json mongodb@2.1.18 No README data
npm WARN engine benv@1.1.0: wanted: {"node":">= 0.12.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine hawk@3.1.3: wanted: {"node":">=0.10.32"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine boom@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine escodegen@1.8.1: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine boom@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
|

contextify@0.1.15 install /home/pi/sasha/cgm-remote-monitor/node_modules/benv/node_modules/jsdom/node_modules/contextify
node-gyp rebuild

make: Entering directory '/home/pi/sasha/cgm-remote-monitor/node_modules/benv/node_modules/jsdom/node_modules/contextify/build'
CXX(target) Release/obj.target/contextify/src/contextify.o
In file included from ../src/contextify.cc:3:0:
../node_modules/nan/nan.h:324:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
contextify.target.mk:82: recipe for target 'Release/obj.target/contextify/src/contextify.o' failed
make: * [Release/obj.target/contextify/src/contextify.o] Error 1
make: Leaving directory '/home/pi/sasha/cgm-remote-monitor/node_modules/benv/node_modules/jsdom/node_modules/contextify/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 4.4.13-v7+
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/sasha/cgm-remote-monitor/node_modules/benv/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! contextify@0.1.15 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.15 install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.4.13-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/sasha/cgm-remote-monitor
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! Error: ENOENT, lstat '/home/pi/sasha/cgm-remote-monitor/node_modules/benv/node_modules/jsdom/node_modules/acorn/test/compare/traceur.js'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 4.4.13-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/sasha/cgm-remote-monitor
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /home/pi/sasha/cgm-remote-monitor/node_modules/benv/node_modules/jsdom/node_modules/acorn/test/compare/traceur.js
npm ERR! fstream_path /home/pi/sasha/cgm-remote-monitor/n

What am I doing wrong?
Paul Martin
@Spazholio
Sep 10 2016 01:30
@davidkeddydb What does openaps report show —cli monitor/glucose-zoned.json show you?
David
@davidkeddydb
Sep 10 2016 01:31
@Spazholio What does clock.json report vs clock-zoned? I think that is my problem. Will go check devices again as I thought they were all the same. "2016-09-09T20:39:08"pi@raspberrypi:~/dkeopenaps/monitor $ cat clock-zoned.json
"2016-09-06T12:00:03-04:00"pi@raspberrypi:~/dkeopenaps/monitor $
@Spazholio I dont have a glucose-zoned, I was trying to create one
garykidd
@garykidd
Sep 10 2016 01:34
@scottleibrand I have a chromebook only and this old imac. Do you think that error is really reporting itself accurately..or do you think its not quite an inability to open the file?
Paul Martin
@Spazholio
Sep 10 2016 01:34
Ok, so your monitor/clock.json should be generated from the report pulled from the pump.
garykidd
@garykidd
Sep 10 2016 01:35
was wondering if I simply copied the file over to the pi via ssh and then tried again providing the local Rp3 path to direct it to? You think that is worth a shot maybe?
Paul Martin
@Spazholio
Sep 10 2016 01:35
What does ls -al monitor/clock* show you?
garykidd
@garykidd
Sep 10 2016 01:35
@scottleibrand ^
David
@davidkeddydb
Sep 10 2016 01:36
pi@raspberrypi:~/dkeopenaps $ ls -al monitor/clock*
-rw-r--r-- 1 pi pi 21 Sep 9 20:47 monitor/clock.json
-rw-r--r-- 1 pi pi 27 Sep 6 22:08 monitor/clock-zoned.json
Paul Martin
@Spazholio
Sep 10 2016 01:36
Ok, so it’s “accurate”. Your clock-zoned.json is quite old. =)
It looks like it tells you how to create a proper clock-zoned.json file here: https://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-1/visualization.html
I’m not sure if that’s still the “right” way to do it, but if it gets the job done...
David
@davidkeddydb
Sep 10 2016 01:39
I did that on the initial set up. I think I have screwed up making sure the report is run
Paul Martin
@Spazholio
Sep 10 2016 01:41
Ok, does openaps report invoke monitor/clock-zoned.json work?
David
@davidkeddydb
Sep 10 2016 01:42
was trying that but I get an error
garykidd
@garykidd
Sep 10 2016 01:42
gonna try on imac vs. RP3
David
@davidkeddydb
Sep 10 2016 01:42
lol. would help if I was in the right directory
Paul Martin
@Spazholio
Sep 10 2016 01:42
Oh yes. =)
David
@davidkeddydb
Sep 10 2016 01:46

ok, so I ran openaps do-everything and I am still getting same errors though times now seem right. First error I get is at get-profile://text/shell/oref0-monitor/profile.json

module.js:340
throw err;
^
Error: Cannot find module '/home/pi/dkeopenaps/max-iob.json'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-get-profile.js:60:23)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
reporting oref0-monitor/profile.json
calculate-iob://text/shell/oref0-monitor/iob.json

module.js:485
throw err;
^
SyntaxError: /home/pi/dkeopenaps/oref0-monitor/profile.json: Unexpected end of input
at Object.parse (native)
at Object.Module._extensions..json (module.js:482:27)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-calculate-iob.js:43:22)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)

missing entries still gives me: TypeError: can't compare offset-naive and offset-aware datetimes
No JSON object could be decoded
David
@davidkeddydb
Sep 10 2016 01:51
when I try to invoke I get: TypeError: can't compare offset-naive and offset-aware datetimes
No JSON object could be decoded
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 744, in run_script
File "build/bdist.linux-armv7l/egg/pkg_resources/init.py", line 1499, 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 332, in includes
if self.prev <= when and when <= self.curr:
TypeError: can't compare offset-naive and offset-aware datetimes
No JSON object could be decoded
lol my times are now right though: -rw-r--r-- 1 pi pi 21 Sep 9 21:44 monitor/clock.json
-rw-r--r-- 1 pi pi 27 Sep 9 21:43 monitor/clock-zoned.json
Paul Martin
@Spazholio
Sep 10 2016 02:04
What’s in each of those files?
And the reason you got the first error is that you’re missing a max-iob.json file.
David
@davidkeddydb
Sep 10 2016 02:06
I thought I had created the max-iob.json file and populated but I don't see it so I must not have
Paul Martin
@Spazholio
Sep 10 2016 02:08
Ah, ok.
David
@davidkeddydb
Sep 10 2016 02:11
ok, have it there now. backup-loop.json max-iob.json preferences.json
bewest-aliases.json model.json pump.ini
calculate-iob.ini monitor pump-session.json
cgm.ini nightscout raw-cgm
detect-sensitivity.ini ns.ini raw-pump
determine-basal.ini openaps.ini settings
get-profile.ini oref0.ini typescript
last_four_cgm_hours.json oref0-monitor tz.ini
last_four_pump_hours.json oref0-predict units.ini
will retry running openaps do-everything
garykidd
@garykidd
Sep 10 2016 02:13
@scottleibrand so was just trying to copy over the hex file from imac to pi. I cp /Users/g/Desktop/GKCCBTLDRHEX.hex pi@raspberrypi.local and that seemed to work.
so then I ssh pi@raspberrypi.local
ls
and I think the file is showing up as cc-tool-0.26-src.tgz
does that make any sense?
Jason Calabrese
@jasoncalabrese
Sep 10 2016 02:15
You might need to use scp, or download the file on the pi with wget https://path/to/file
David
@davidkeddydb
Sep 10 2016 02:16

@Spazholio Ok I think the max iob is now gone but I am still getting the missing-entires time issue and an iob report issue: pump://JSON/read_settings/settings/settings.json
reporting settings/settings.json
get-profile://text/shell/oref0-monitor/profile.json

/usr/local/lib/node_modules/oref0/lib/profile/basal.js:10
var basalRate = basalprofile_data[basalprofile_data.length-1].rate
^
TypeError: Cannot read property 'rate' of undefined
at Object.basalLookup (/usr/local/lib/node_modules/oref0/lib/profile/basal.js:10:66)
at generate (/usr/local/lib/node_modules/oref0/lib/profile/index.js:32:33)
at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-get-profile.js:104:19)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
reporting oref0-monitor/profile.json
calculate-iob://text/shell/oref0-monitor/iob.json

module.js:485
throw err;
^
SyntaxError: /home/pi/dkeopenaps/oref0-monitor/profile.json: Unexpected end of input
at Object.parse (native)
at Object.Module._extensions..json (module.js:482:27)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-calculate-iob.js:43:22)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
reporting oref0-monitor/iob.json
determine-basal://text/shell/oref0-predict/oref0.json
Could not parse input data: [SyntaxError: /home/pi/dkeopenaps/oref0-monitor/iob.json: Unexpected end of input]
reporting oref0-predict/oref0.json
pump://JSON/set_temp_basal/oref0-enacted/enacted-temp-basal.json
oref0-enacted/enacted-temp-basal.json raised No JSON object could be decoded
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 744, in run_script
File "build/bdist.linux-armv7l/egg/pkg_resources/init.py", line 1499, in run_script
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 75, in run
output = app(args, self)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/subcommand.py", line 52, in call
return self.method.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/invoke.py", line 40, in main
output = task.method(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/use.py", line 45, in call
output = self.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/medtronic.py", line 430, in main
program = self.get_program(args)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/medtronic.py", line 427, in get_program
program = json.load(argparse.FileType('r')(params.get('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
rais

Jason Calabrese
@jasoncalabrese
Sep 10 2016 02:16
Copy the path from the releases page
David
@davidkeddydb
Sep 10 2016 02:16
let me apologize to everyone in the room by the way if this is not the most efficient way to paste the errors being thrown
Jason Calabrese
@jasoncalabrese
Sep 10 2016 02:17
Looks like you need to run your active basal report
Paul Martin
@Spazholio
Sep 10 2016 02:18
@garykidd That command created a file called pi@raspberrypi.local on your Mac in the same location as your hex file. @jasoncalabrese is right - you have to use scp.
garykidd
@garykidd
Sep 10 2016 02:30
I think I did it. That was totally unclear...well at least if you have as little experience as I do. I like wget T
Thanks @Spazholio @jasoncalabrese @scottleibrand Very Much
David
@davidkeddydb
Sep 10 2016 02:33
ok, different errors but making progress. determine-basal://text/shell/oref0-predict/oref0.json
BG data is too old, or clock set incorrectly Fri Sep 09 2016 19:37:50 GMT-0400 (EDT) vs Fri Sep 09 2016 22:31:32 GMT-0400 (EDT)
reporting oref0-predict/oref0.json
pump://JSON/set_temp_basal/oref0-enacted/enacted-temp-basal.json
oref0-enacted/enacted-temp-basal.json raised type object argument after ** must be a mapping, not list
Traceback (most recent call last):
still have something screwed up with missing-entries
Jason Calabrese
@jasoncalabrese
Sep 10 2016 02:35
You're glucose data isn't current our isn't zoned, there's a check to only use days less than 10m old
*data
David
@davidkeddydb
Sep 10 2016 02:36
How do I check if it is zoned?
I dont have a glucose-zoned file
Jason Calabrese
@jasoncalabrese
Sep 10 2016 02:36
Also you'll check that there's a rate field in the suggested output before trying to enact it
What's your cgm source?
David
@davidkeddydb
Sep 10 2016 02:37
dex plugged in by usb
sorry g4
Jason Calabrese
@jasoncalabrese
Sep 10 2016 02:37
OK, so that does need to be zoned
Something like this should work
openaps report add monitor/glucose-zoned.json JSON tz rezone monitor/glucose-oref0.json --date "display_time system_time dateString" --adjust missing
David
@davidkeddydb
Sep 10 2016 02:40
I now in my feeble attemps to zone it I am not doing it correctly. I had written this, but I know it isnt correct: openaps report add monitor/glucose-oref0.json JSON tz monitor/glucose-zoned.json
Jason Calabrese
@jasoncalabrese
Sep 10 2016 02:40
You'll need to adjust that to match your report paths
garykidd
@garykidd
Sep 10 2016 02:41
assuming that the 123456 is your serial number in the following...correct.... openaps device add pump mmeowlink subg_rfspy /dev/ttyACM0 123456
?
David
@davidkeddydb
Sep 10 2016 02:42
as I have pretty much followed along with the openaps set up, I think you have them the same as I what I have but I will recheck
@jasoncalabrese Thank you as that was a huge help. One more report now down. If I can get this wacky thing with missing-entries solved I have got it.

this is the whole thing from missing-entries: 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 744, in run_script
File "build/bdist.linux-armv7l/egg/pkg_resources/init.py", line 1499, 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 332, in includes
if self.prev <= when and when <= self.curr:
TypeError: can't compare offset-naive and offset-aware datetimes
No JSON object could be decoded

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 744, in run_script
File "build/bdist.linux-armv7l/egg/pkg_resources/init.py", line 1499, 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 48, in main
reporters.Reporter(report, device, task)(output)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/reporters/init.py", line 33, in call
self.blob = self.serialize(data)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/reporters/init.py", line 31, in serialize
return self.method.serialize(render(data), self)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/process.py", line 56, in prerender_json
return json.loads(data)
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

garykidd
@garykidd
Sep 10 2016 02:56
Appreciate the help....
This message was deleted
David
@davidkeddydb
Sep 10 2016 02:59
I think the problem I am running into is in the first lines of setting up the sending glucose data. when I try to invoke recent-missing-entries, I get the error TypeError: can't compare offset-naive and offset-aware datetimes
No JSON object could be decoded
Russell Gardner
@RussGG
Sep 10 2016 03:06
I downloaded the bewest ns aliases and ran the nano. I noticed an entries.json report in there that I didn't have. So I did this and received an error trying to invoke it.
pi@raspberrypi:~/ccgopenaps2 $ openaps report add entries.json JSON ns shell entries added ns://JSON/shell/entries.json pi@raspberrypi:~/ccgopenaps2 $ openaps report invoke entries.json ns://JSON/shell/entries.json No JSON object could be decoded Unknown request: entries
David
@davidkeddydb
Sep 10 2016 03:19
Assuming this is the first line to start the set up of recent-missing-entries this is where my problem is as it errors out each time. openaps use ns shell format-recent-type tz entries monitor/glucose.json | json -a dateString | wc -l
Matthew Williams
@mwilliams
Sep 10 2016 03:26
@davidkeddydb I'm having similar issues. Using Minimed enlite CGM. I suspect my issue is with my glucose formatting as well. Though that doesn't error out on me, it simply returns an empty array.
garykidd
@garykidd
Sep 10 2016 03:28
@jasoncalabrese hmmm I'm pretty sure I was able to succesfully flash the hex file....removed my pump device and have been following instructions but doesnt seem to work..got up to mm tune but the device doesnt seem to be recognized becuase I cant find a difference between ls -al /dev/tty* with and without the ti stick pluggedinto RP3....any ideas I can try.
?
David
@davidkeddydb
Sep 10 2016 03:35
@mwilliams mine fails at set up and I cant invoke it. I see that
@bewest has a method but I cant get it working yet
Matthew Williams
@mwilliams
Sep 10 2016 03:37
yeah, I'm running with his alias's too, I can get a successful do-everything run, but it uploads nothing. My determine-basal://text/shell/oref0-predict/oref0.json report generates a Error: could not calculate eventualBG error, been working on troubleshooting it a few nights now... Been looping for two days, itching for NS to visualize things better!
Jason Calabrese
@jasoncalabrese
Sep 10 2016 03:37
@garykidd it's plugged into USB?
garykidd
@garykidd
Sep 10 2016 03:38
yeah...was thinking of reflashing...maybe with other hex file...but I doubt thats it.
David
@davidkeddydb
Sep 10 2016 03:39
@mwilliams I searched gitter and found this post from Ben West: I dont know how to do the set up he has but here is what he says: it turns out instead of using ns shell upload, I use the following:
openaps use ns shell upload-non-empty-type entries.json nightscout/recent-missing-entries.json
I have that as a report instead of ns shell upload
that one is the new upload-non-empty-type which works same way as upload (it takes first the endpoint name, and secondly the file to upload)
the difference is it won't error if the file is empty (which is common and OK)
Jason Calabrese
@jasoncalabrese
Sep 10 2016 03:39
For my usb pi I have /dev/serial/by-id/usb-Nightscout_subg_rfspy_000002-if00
Might be a little different
garykidd
@garykidd
Sep 10 2016 03:40
hmmm so should I check mine and how do I do that?
Jason Calabrese
@jasoncalabrese
Sep 10 2016 03:40
Which firmware did you flash
Jason Calabrese
@jasoncalabrese
Sep 10 2016 03:41
Try an ls on the by-serial dir
Don't think you want the cc-bootloader version
cc-bootloader, if a way to setup the stick so you can flash without using a debugger
garykidd
@garykidd
Sep 10 2016 03:46
thanks for input...willupdate you in a miniute or two....
pi@raspberrypi:~/APS301/hex $ sudo cc-tool --log install.log -ew usb_ep0_TI_DONGLE_US_STDLOC.hex
  Programmer: CC Debugger
  Target: CC1111
  Erasing flash...
  Completed       
  Writing flash (3 KB)...
  Completed (2.48 s.)
Jason Calabrese
@jasoncalabrese
Sep 10 2016 03:48
@mwilliams if predict is failing I don't see how you're looping
The best way to debug that is to run the report manually, 1 at a time
garykidd
@garykidd
Sep 10 2016 03:49
pi@raspberrypi:~/APS301 $ openaps use pump model
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 63, 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-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 44, in __call__
    self.before_main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 63, in before_main
    self.check_session(app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 140, in check_session
    self.session = self.get_session_info( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 103, in get_session_info
    fields = self.create_session( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 128, in create_session
    self.pump.power_control(minutes=minutes)
  File "/usr/local/lib/python2.7/dist-packages/mmeowlink/handlers/stick.py", line 217, in power_control
    raise CommsException("No acknowledgement from pump on wakeup. Is it out of range or is the battery too low?")
mmeowlink.exceptions.CommsException: No acknowledgement from pump on wakeup. Is it out of range or is the battery too low?
Jason Calabrese
@jasoncalabrese
Sep 10 2016 03:50
You might have paths wrong, there are some inconsistencies is different versions of the docs
Try mmtune
openaps use pump mmtune
Paul Martin
@Spazholio
Sep 10 2016 03:52
ALWAYS run mmtune. It will save many, many headaches. =)
David
@davidkeddydb
Sep 10 2016 03:56
@bewest I know you worked a ton and I have read all the posts you have made on missing-entries and the ns shell but I cannot get it to work. Here is the error I keep getting:
ns://text/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 744, in run_script
File "build/bdist.linux-armv7l/egg/pkg_resources/init.py", line 1499, 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 332, in includes
if self.prev <= when and when <= self.curr:
TypeError: can't compare offset-naive and offset-aware datetimes
reporting nightscout/recent-missing-entries.json
garykidd
@garykidd
Sep 10 2016 03:58
This message was deleted
Jason Calabrese
@jasoncalabrese
Sep 10 2016 03:58
@davidkeddydb the problem is that one of your files isn't zoned
David
@davidkeddydb
Sep 10 2016 03:59
ok, how do I find it and how do I fix it? I know I have a clock-zoned file. I do not have a glucose-zoned file
garykidd
@garykidd
Sep 10 2016 04:00
mmtune seemed to work but I cant use it
hmmm
Jason Calabrese
@jasoncalabrese
Sep 10 2016 04:00
@garykidd the -99 showing no reception for those freqs, so the stick seems to be working, but it can't see the pump
have you been able to connect to the pump at all before?
Paul Martin
@Spazholio
Sep 10 2016 04:01
Would you get that if the serial is incorrect? Or would it find a good frequency, but not actually be able to DO anything?
garykidd
@garykidd
Sep 10 2016 04:01
I have been able to connect to the pump just fine with carelink stick
Jason Calabrese
@jasoncalabrese
Sep 10 2016 04:01
@davidkeddydb you'll need to create a glucose-zoned.json file and use that
garykidd
@garykidd
Sep 10 2016 04:01
pi@raspberrypi:~/APS301 $ openaps use pump model
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 63, 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-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 44, in __call__
    self.before_main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 63, in before_main
    self.check_session(app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 140, in check_session
    self.session = self.get_session_info( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 103, in get_session_info
    fields = self.create_session( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 128, in create_session
    self.pump.power_control(minutes=minutes)
  File "/usr/local/lib/python2.7/dist-packages/mmeowlink/handlers/stick.py", line 217, in power_control
    raise CommsException("No acknowledgement from pump on wakeup. Is it out of range or is the battery too low?")
mmeowlink.exceptions.CommsException: No acknowledgement from pump on wakeup. Is it out of range or is the battery too low?
Jason Calabrese
@jasoncalabrese
Sep 10 2016 04:02
can you connect to it with the carelink now?
battery is good?
garykidd
@garykidd
Sep 10 2016 04:03
DO I need to remove pump and add it back in order to try using carelink again?
I'll kick my self, literally, if battery is dead
Jason Calabrese
@jasoncalabrese
Sep 10 2016 04:05
you can have 2 pump devices (different names), I'm not sure if you can have both plugged in
if you're already looping I'd use a 2nd pi to test the ti stick and keep the other going
garykidd
@garykidd
Sep 10 2016 04:06
I only have ti plugged in now still. battery is fine (unfortunately) that've been an easy fix. serial number is correct in pump.ini too.
not quite looping just yet
I have an edison but wanted to test and get everyting going on pi first
David
@davidkeddydb
Sep 10 2016 04:17
@jasoncalabrese something like this: openaps report add monitor/glucose-zoned.json JSON tz glucose monitor/glucose.json
garykidd
@garykidd
Sep 10 2016 04:20
carelink is working fine still...WTF?
I added pump-2 as TI so I can keep testing...I'm tired.
garykidd
@garykidd
Sep 10 2016 04:26
once ti is flashed...do you have to disconnect any special way when you disconnect debugger?
David
@davidkeddydb
Sep 10 2016 04:33
@jasoncalabrese More like: openaps report add monitor/glucose-zoned.json JSON tz clock monitor/glucose-oref0.json
Jason Calabrese
@jasoncalabrese
Sep 10 2016 04:39
yeah, that looks right, give it a try
David
@davidkeddydb
Sep 10 2016 04:39

well, new errors now: pump://JSON/read_selected_basal_profile/raw-pump/selected-basal-profile.json
raw-pump/selected-basal-profile.json raised ACK is 0 bytes:

and I still dont have the glucose zoned though I think I set it up right

still getting the time issue
Jason Calabrese
@jasoncalabrese
Sep 10 2016 04:40
that could be anything breaking the coms, just try it again
try openaps report invoke monitor/glucose-zoned.json
then cat monitor/glucose-zoned.json
garykidd
@garykidd
Sep 10 2016 04:41
trying to re-flash again in desperation.
David
@davidkeddydb
Sep 10 2016 04:41
raise ArgumentTypeError(message % (string, e))
argparse.ArgumentTypeError: can't open 'monitor/glucose-oref0.json': [Errno 2] No such file or directory: 'monitor/glucose-oref0.json'
Jason Calabrese
@jasoncalabrese
Sep 10 2016 04:42
mkdir monitor
openaps report invoke monitor/glucose-oref0.json
David
@davidkeddydb
Sep 10 2016 04:46
I have a monitor directory, let me look in there
Mike
@libxmike
Sep 10 2016 04:49
does any one use loop with Libre and Nightscout?
David
@davidkeddydb
Sep 10 2016 04:50
/glucose-oref0.json': [Errno 2] No such file or directory: 'monitor/glucose-oref0.json'
pi@raspberrypi:~/dkeopenaps $
Jason Calabrese
@jasoncalabrese
Sep 10 2016 04:52
then that report isn't defined right
openaps report show monitor/glucose-oref0.json --ini
David
@davidkeddydb
Sep 10 2016 04:57
no, it apparently didnt create it. I just added again: added tz://JSON/clock/monitor/glucose-zoned.json
should clock be in there at all?
garykidd
@garykidd
Sep 10 2016 04:59
@jasoncalabrese i reflashed
setFreq": 916.636, 
  "usedDefault": false
}pi@raspberrypi:~/APS301 $ openaps use pump-2 model
"715"pi@raspberrypi:~/APS301 $
BAMMM!
interesting that the frequency changed from default and now it works...no?
thanks
Jason Calabrese
@jasoncalabrese
Sep 10 2016 05:03
Great, is expected that the default won't be used
It will charge in different environments too
*change
garykidd
@garykidd
Sep 10 2016 05:05
I am actually downstairs and my rig is upstairs and its sending and receiving just fine. pretty cool
can you pin it to a certain frequency?
Paul Martin
@Spazholio
Sep 10 2016 05:07
You don’t want to.
garykidd
@garykidd
Sep 10 2016 05:08
It's srtange to me that it seemed to indicate previously that the standard frequency was open---yet it wouldnt work....now that the "standard frequency" was less than ideal and it switched frequencies----seems to work...and well. Hoping that the standard freqeuncy, should it be deemed the best frequency..if pump communications will conk out again.
@Spazholio Yup I understand but was thinking more for testingpurposes
Paul Delano
@spike1197
Sep 10 2016 05:11
Hello everyone. I am starting the process to put this together for our son. I am having a brain block on how to connect the TI CC1111 with the goodfet42. I have jumper wires, not a 10-pin ribbon cable. I just want to make sure I have the right connections so I don't fry any of these little devices.
Mike
@libxmike
Sep 10 2016 05:12
is it necessary to have enlite/dexcom sensor with minimed/medtronic or can loop be done just with nightscout data that comes from Libre/LimiTTer ?
David
@davidkeddydb
Sep 10 2016 05:12
@jasoncalabrese ok, so I have to check it but I rewrote it to this though not sure it is right: openaps report add monitor/glucose-zoned.json JSON cgm oref0_glucose
I am tapping out. @garykidd You are still way ahead of me!!! Great stuff by the way. If I can get this rezoning set I should almost be there. Thanks @jasoncalabrese for all of the help. Hopefully I will crack it here at some pont
garykidd
@garykidd
Sep 10 2016 05:17
@davidkeddydb rest easy my man.
@jasoncalabrese does this look strange to you....
pi@raspberrypi:~/APS301 $ openaps use pump-2 mmtune
{
  "scanDetails": [
    [
      "916.300", 
      0, 
      -99
    ], 
    [
      "916.324", 
      0, 
      -99
    ], 
    [
      "916.348", 
      0, 
      -99
    ], 
    [
      "916.372", 
      0, 
      -99
    ], 
    [
      "916.396", 
      0, 
      -99
    ], 
    [
      "916.420", 
      0, 
      -99
    ], 
    [
      "916.444", 
      0, 
      -99
    ], 
    [
      "916.468", 
      0, 
      -99
    ], 
    [
      "916.492", 
      0, 
      -99
    ], 
    [
      "916.516", 
      0, 
      -99
    ], 
    [
      "916.540", 
      0, 
      -99
    ], 
    [
      "916.564", 
      0, 
      -99
    ], 
    [
      "916.588", 
      0, 
      -99
    ], 
    [
      "916.612", 
      0, 
      -99
    ], 
    [
      "916.636", 
      0, 
      -99
    ], 
    [
      "916.660", 
      0, 
      -99
    ], 
    [
      "916.684", 
      0, 
      -99
    ], 
    [
      "916.708", 
      1, 
      -87
    ], 
    [
      "916.732", 
      0, 
      -99
    ], 
    [
      "916.756", 
      0, 
      -99
    ], 
    [
      "916.780", 
      0, 
      -99
    ], 
    [
      "916.804", 
      0, 
      -99
    ], 
    [
      "916.828", 
      0, 
      -99
    ], 
    [
      "916.852", 
      0, 
      -99
    ], 
    [
      "916.876", 
      0, 
      -99
    ]
  ], 
  "setFreq": 916.708, 
  "usedDefault": false
garykidd
@garykidd
Sep 10 2016 05:23
arghhhh
"setFreq": 916.63, 
  "usedDefault": true
}pi@raspberrypi:~/APS301 $ openaps use pump-2 model
""pi@raspberrypi:~/APS301 $ openaps use pump-2 model
""pi@raspberrypi:~/APS301 $
Martin Haeberli
@mhaeberli
Sep 10 2016 05:37
@libxmike you can run oref0 or Loop app on NightScout data if you like
Jason Calabrese
@jasoncalabrese
Sep 10 2016 05:42
@garykidd sometimes you can get the stick into a bad state while testing, and pulling it out will reset it
Not sure what else it would be
Mike
@libxmike
Sep 10 2016 05:57
@mhaeberli thanx!
garykidd
@garykidd
Sep 10 2016 12:51
@jasoncalabrese thanks. I'm thinking that the stick is defective. Thanks for help
Eric Jensen
@elnjensen
Sep 10 2016 13:51
@garykidd If you run mmtune, check the strengths at different frequencies in the output. All -99s means it didn't reach the pump at all at any of those frequencies, in which case it will fall back to the default frequency. So a result of usedDefault can often mean it failed. In the full output you posted at 01:17 there is one freq (916.708 MHz) where it didn't get -99, so that's what it used. So use that info to guide your interpretation of the mmtune output.
I'd suggest putting the pump right next to the TI stick and running my tune again, to make sure it's not a range issue. Range is pretty good, but only if you're on the right frequency.
Sorry 'my tune' above should be mmtune.
garykidd
@garykidd
Sep 10 2016 14:07
@bewest was wondering your view on my issues above with TI stick. It seems to work only when the default frequency is changed....it seems to be 100% consisten with this pattern. There's no way to force a frequency...or set of them..right?
@elnjensen thanks bud.....it's actually right on top//or at least right next to it. I'm thinking of sending it back....bummer
Eric Jensen
@elnjensen
Sep 10 2016 14:09
mmtune is the way to set the frequency. If that doesn't work, then you must be having other problems.
Do you still get all -99?
garykidd
@garykidd
Sep 10 2016 16:12
Most times but not all. When I don't I get 87s and then it works.
Dana Lewis
@danamlewis
Sep 10 2016 16:20
@libxmike no one has yet used it with Libre, I believe, but if the data is in NS then it would be possible if you were using limitter and pulling data in every 5 minutes to imitate CGM. But probably worth confirming the data comes in that often, otherwise there will be times as designed in the code that lack of data would pause loop comms.
garykidd
@garykidd
Sep 10 2016 16:39
@elnjensen sorry meant when I get anything other than 99 it's alwaysa on frequ
ency on 87 and then it always works. And seems to have excellent range. Was hoping that I could somehow pin a frequency at first but if they Are all 99s then it wouldn't do any good i suppose. More I think about it the more I'm convinced I just have a defective to stick. Anyone else have any problems like this? I don't suppose I could flash mm commander or older version of hex file.
Eric Jensen
@elnjensen
Sep 10 2016 16:46
@garykidd Two questions before you give up on that TI stick:
  • Do you have either the pump or the TI stick in any sort of case? Or do you get those -99s with just the bare pump and bare TI stick next to each other on the table?
  • Are you running anything else at the same time that could be trying to talk to the pump? e.g. are you still running your loop with Carelink at the same time as testing the TI stick, or even running a cron job with commands for the TI stick itself, or running a RileyLink with iOS app, or anything like that? Two things simultaneously trying to talk to the pump can cause one to fail.
garykidd
@garykidd
Sep 10 2016 16:49
@elnjensen unfortunately no case on stick and pump right next to stick. Initially, I had had cron running...but without carelink stick...but I commented it out. No other rf comms. Weird that it works sometimes.
garykidd
@garykidd
Sep 10 2016 16:56
dont think rpi3 bluetooth could be interfering..i actually dont think I;m using it..but is there an easy way to disable just to check?
pi@raspberrypi:~/APS301 $ sudo bluetoothctl
[NEW] Controller xxxxxxxxxxxx raspberrypi [default]
[bluetooth]# power off
Changing power off succeeded
[CHG] Controller XXXXXXXX Powered: no
[CHG] Controller XXXXXXXXX Discovering: no
[bluetooth]# exit
[DEL] Controller B8:27:EB:8E:DC:6C raspberrypi [default]
pi@raspberrypi:~/APS301 $ openaps use pump-2 mmtune
{
  "scanDetails": [
    [
      "916.300", 
      0, 
      -99
    ], 
    [
      "916.324", 
      0, 
      -99
    ], 
    [
      "916.348", 
      0, 
      -99
    ], 
    [
      "916.372", 
      0, 
      -99........
Bummer
garykidd
@garykidd
Sep 10 2016 17:13
Got another ti stick coming...gotta be defective
Mike
@libxmike
Sep 10 2016 17:14
@danamlewis yes, the data is in NS / mongoDB and comms from limitter every 5 min, the data is very stable , I get maybe 2-3 missing in 1h
@danamlewis I ordered everything I need, minimed 522, carelink etc for loop, Rpi's I have few here, also the Zero which I want to use it for it, daily I use omnipod
Mike
@libxmike
Sep 10 2016 17:19
@danamlewis if no one has it done yet with limitter, then I may be the trail patient :)
Dana Lewis
@danamlewis
Sep 10 2016 17:21
Cool :) hope you add some PRs to the docs when you figure it out so others can follow you!
Mike
@libxmike
Sep 10 2016 17:23
I just have to start somewhere, well end of this mont I have Hallux Valgus surgery, after that I have 3 week off so plentora of time to thinker with it :)
Eric Jensen
@elnjensen
Sep 10 2016 17:31
@garykidd You only posted the beginning of the mmtune output. Can I assume it showed -99 all the way to the bottom? The only reason I ask is that it's no surprise that you'd get -99 at the part of the frequency range you showed. The range where the pump can communicate is pretty narrow. For example, I always get -99 from 916.3 all the way through 916.7; it's only a few frequencies right around 916.8 where I get better numbers.
pi@raspberrypi:~/openaps_sor $ openaps use pump mmtune
{
  "scanDetails": [
    [
      "916.300", 
      0, 
      -99
    ], 
    [
      "916.324", 
      0, 
      -99
    ], 
    [
      "916.348", 
      0, 
      -99
    ], 
    [
      "916.372", 
      0, 
      -99
    ], 
    [
      "916.396", 
      0, 
      -99
    ], 
    [
      "916.420", 
      0, 
      -99
    ], 
    [
      "916.444", 
      0, 
      -99
    ], 
    [
      "916.468", 
      0, 
      -99
    ], 
    [
      "916.492", 
      0, 
      -99
    ], 
    [
      "916.516", 
      0, 
      -99
    ], 
    [
      "916.540", 
      0, 
      -99
    ], 
    [
      "916.564", 
      0, 
      -99
    ], 
    [
      "916.588", 
      0, 
      -99
    ], 
    [
      "916.612", 
      0, 
      -99
    ], 
    [
      "916.636", 
      0, 
      -99
    ], 
    [
      "916.660", 
      0, 
      -99
    ], 
    [
      "916.684", 
      0, 
      -99
    ], 
    [
      "916.708", 
      0, 
      -99
    ], 
    [
      "916.732", 
      5, 
      -59
    ], 
    [
      "916.756", 
      5, 
      -50
    ], 
    [
      "916.780", 
      5, 
      -50
    ], 
    [
      "916.804", 
      5, 
      -49
    ], 
    [
      "916.828", 
      5, 
      -49
    ], 
    [
      "916.852", 
      5, 
      -50
    ], 
    [
      "916.876", 
      5, 
      -55
    ]
  ], 
  "setFreq": 916.828, 
  "usedDefault": false
Can you post the bottom end of your mmtune output?
garykidd
@garykidd
Sep 10 2016 17:34
I tried reflashing with older version hex file to no avail.
just being thourough....
}pi@raspberrypi:~/APS301 $ openaps use pump-2 mmtune
{
  "scanDetails": [
    [
      "916.300", 
      0, 
      -99
    ], 
    [
      "916.324", 
      0, 
      -99
    ], 
    [
      "916.348", 
      0, 
      -99
    ], 
    [
      "916.372", 
      0, 
      -99
    ], 
    [
      "916.396", 
      0, 
      -99
    ], 
    [
      "916.420", 
      0, 
      -99
    ], 
    [
      "916.444", 
      0, 
      -99
    ], 
    [
      "916.468", 
      0, 
      -99
    ], 
    [
      "916.492", 
      0, 
      -99
    ], 
    [
      "916.516", 
      0, 
      -99
    ], 
    [
      "916.540", 
      0, 
      -99
    ], 
    [
      "916.564", 
      0, 
      -99
    ], 
    [
      "916.588", 
      0, 
      -99
    ], 
    [
      "916.612", 
      0, 
      -99
    ], 
    [
      "916.636", 
      0, 
      -99
    ], 
    [
      "916.660", 
      0, 
      -99
    ], 
    [
      "916.684", 
      0, 
      -99
    ], 
    [
      "916.708", 
      0, 
      -99
    ], 
    [
      "916.732", 
      0, 
      -99
    ], 
    [
      "916.756", 
      0, 
      -99
    ], 
    [
      "916.780", 
      0, 
      -99
    ], 
    [
      "916.804", 
      0, 
      -99
    ], 
    [
      "916.828", 
      0, 
      -99
    ], 
    [
      "916.852", 
      0, 
      -99
    ], 
    [
      "916.876", 
      0, 
      -99
    ]
  ], 
  "setFreq": 916.63, 
  "usedDefault": true
Eric Jensen
@elnjensen
Sep 10 2016 17:36
Hmm. You don't have a European-made pump by any chance, do you? And/or you're not using the "WW" firmware?
garykidd
@garykidd
Sep 10 2016 17:38
So, just to make sure Iunderstand fully, if there are 99's across the board, does that mean it's not able to detect anything at those frequencies.....and if so, couldnt that mean either 1 that the stick isnt transmitting to initiate pump to reply back......or 2 the ti stick is transmitting but the pump isnt replying back?
@elnjensen Can't imagine I do since it is my old pump and I've always lived in US.
Eric Jensen
@elnjensen
Sep 10 2016 17:39
Right, just checking since those pumps use different frequencies.
garykidd
@garykidd
Sep 10 2016 17:39
Good question on the WW vs US...I do have US STD flashed.
and recall that I did get it to work some of the time......FWIW, I also tried communicating with another pump....a 712....and similar results...worked sometimes but not others...and interstingly enough openaps use pump-2 status never worked though it seemed to work sometimes on my main pump a 715.
what's mmcommander...si that something to try maybe?
garykidd
@garykidd
Sep 10 2016 17:47
and this is the ti stick I got---this is suitable...correct? [http://www.digikey.com/product-search/en?mpart=CC1111EMK868-915&vendor=296]
Paul Martin
@Spazholio
Sep 10 2016 17:55
Random shot in the dark - do you have home automation software, @garykidd? Like, something that turns all your lights on and stuff when you hit a button on another device?
garykidd
@garykidd
Sep 10 2016 17:59
@Spazholio nope.
@elnjensen or @Spazholio are you guys using ti stick?
Paul Martin
@Spazholio
Sep 10 2016 18:00
I am. And that looks like the right device that you posted.
garykidd
@garykidd
Sep 10 2016 18:00
you have a debugger too?
Paul Martin
@Spazholio
Sep 10 2016 18:01
And I asked because I have some old school home automation hardware at home. It runs on the exact same frequency as the pump comms. That's why I asked.
And yeah, I have a debugger.
I'm using my TI in serial mode rather than USB though.
garykidd
@garykidd
Sep 10 2016 18:02
Maybe I could send you my ti and see if it'll work in your rig?
Paul Martin
@Spazholio
Sep 10 2016 18:04
I'm game to give it a shot if you like. My Pi3 isn't my production rig so I can certainly try out some different things. Bear in mind, it could be your pump, too.
garykidd
@garykidd
Sep 10 2016 18:04
@Spazholio @elnjensen thanks for your help here guys..lots of good thinking and experimenting...and even though it isnt working---I appreciate the help sincerely
Paul Martin
@Spazholio
Sep 10 2016 18:05
Hit me up in a DM if you want to try it out. I'm in Michigan if that affects your decision. :)
garykidd
@garykidd
Sep 10 2016 18:06
@Spazholio the thought occurred to me too. I was able to get carelink setup working withno signal issues...assuming very close range of course
Eric
@ecc1
Sep 10 2016 18:06
A $20 RTL-SDR dongle might be a good idea for people debugging their radio setups, if you're willing to learn a little about some SDR tools.
Could allow easy verification of US vs. WW frequencies, whether signal is getting out at all, etc.
Paul Martin
@Spazholio
Sep 10 2016 18:09
And I've always compiled my own hex files - can't imagine that makes any difference, but it IS something I do differently.
garykidd
@garykidd
Sep 10 2016 18:09
@ecc1 what's strang eis that I can get it to work sometimes. was also thinking of trying via serial connectioin.
Paul Martin
@Spazholio
Sep 10 2016 18:10
@ecc1 Are there any good startup tutorials you'd recommend? I know nothing about that sort of thing.
Tim Mecklem
@tmecklem
Sep 10 2016 18:15
can anyone help me understand what the nightscout recent-missing-entries report should look like with the elite cgm
John Kelleher
@jkelleher
Sep 10 2016 18:15
Hi all, looking for some clarity for building my first rig. On 640G+Enlite(Guardian2). Have Edison/RPi/Chip (on the way), CNL 2.4, old Carelink stick. Have NS up/running pulling from 640G but the OTG cable into the Android phone presents problems. Have heard of HAPP - does this take the cloud NS data and suggest OpenAPS basals via iOS app to do manual basal adjustments? And for a rig, my big concern is whether the old Paradigm 522WWP but no transmitter (maybe) will do the business? A little help appreciated...
Tim Mecklem
@tmecklem
Sep 10 2016 18:16
The normal report looks like openaps use ns shell format-recent-type tz entries monitor/glucose.json but results in [] when applied to the enlite cgm entries.
where the content of that cgm file has entries that look like:
{
    "glucose": 232, 
    "display_time": "2016-09-05T20:55:00", 
    "name": "GlucoseSensorData", 
    "date_type": "prevTimestamp", 
    "_tell": 139, 
    "packet_size": 0, 
    "op": 116
  }
Dana Lewis
@danamlewis
Sep 10 2016 18:19
@jkelleher HAPP is android based, but yes provides recommendations that you could manually enact.
Eric
@ecc1
Sep 10 2016 18:19
(Didn't realize gitter would spam the channel with that youtube thumbnail, sorry)
Dana Lewis
@danamlewis
Sep 10 2016 18:20
A 522 is compatible and can have temp basals sent to it, not sure what else you're wanting to find out about it?
Tim Mecklem
@tmecklem
Sep 10 2016 18:27
This looks like the same problem I’m having: https://github.com/openaps/docs/issues/129#issuecomment-245789475
(no replies yet)

The guide says

Using the Medtronic CGM¶
Because the Medtronic pump collects data directly from the Enlite sensors, OpenAPS will retrieve CGM data in addition to your regular pump data from your pump. While you use the same OpenAPS commands to get it, the Medtronic CGM data need a little special formatting after being retrieved. We’ll discuss these special circumstances as they come up later.

Which looks pretty interesting, but I’m not sure where the later discussions happen in the guide.
John Kelleher
@jkelleher
Sep 10 2016 18:32
@danamlewis sorry but first gotta thank you for pushing all this along and marshalling an army! You're a bit of hero around this house! So big thanks. Ok, got that out of the way ;)
So with 522 + older Guardian transmitter, I then need the rig. This can be RPi+CareLink+Powerbank? Or swap RPi for Edison or Chip? Then could drop Carelink and use T1 or RileyLink for comms? Am I close? Or for interim step, HAPP can pull NS cloud data to advise? (We have NS running with OTG cable from phone to CNL but difficult to charge).
It took a while to find that.
Dana Lewis
@danamlewis
Sep 10 2016 18:53
@jkelleher :) re: rigs - yes! Lots of options including the ones you mentioned, and yes you could start with HAPP on an android to start getting a feel for the type of recommendations oref0 provides. Alternatively, someone recently added to the docs how to use pushbullet to get notifications sent to your phone in open loop mode. (More work than HAPP but then much of the groundwork to OpenAPS will be done, and then it's a few more small steps to close the loop after that)
@tmecklem might be good to add a link to the first reference since you had trouble finding it later?
Tim Mecklem
@tmecklem
Sep 10 2016 18:54
Yeah, I plan to do a PR on it, but I didn’t want to commit to that until I knew that was the right answer to my question :)
Dana Lewis
@danamlewis
Sep 10 2016 18:55
:)
garykidd
@garykidd
Sep 10 2016 18:58
@Spazholio so was wondering if you could walk me through switching source of BG from cgm to NS? I tried got it working but it wouldnt stay working if I moved away from--or disconnected cgm from rig
Paul Martin
@Spazholio
Sep 10 2016 19:17
I swear on all that is holy, I’m going to start taking nursing classes so I can learn how to give myself intravenous insulin injections. Going from 80 to 230 in an hour from 6 chips and a strip of tortilla is NOT normal.
</rant off>
@garykidd It’s been a while since I’ve mucked about with it. Are you successfully able to pull data from NS? Not sure what you mean when you say it wouldn’t stay working if you disconnect the CGM from the rig.
Mike
@libxmike
Sep 10 2016 19:27
@Spazholio intravenously is not best idea, after 5-15 insulin is gone, in conjunction with intramuscular is better, i did few times intravenously with pen and very shrt 5mm syringe
But I have gut veins for it :)
good accessible
Paul Martin
@Spazholio
Sep 10 2016 19:29
@libxmike I do IM quite a bit when it goes high fast - shoulder or forearm works best for me. Is it a bad thing that the insulin is gone after 5-15 mins? As long as it does the job and brings me down within that 5-15 mins and not the several hours it takes otherwise, that’s what I thought I was looking for. =)
Mike
@libxmike
Sep 10 2016 19:38
IV for is forearm, elbows other side, or what the name is :) sixpack for IM, stomach ist best for IM, fast acting. 5-15 min is not bad if no Hormons play involvement which may make insulin resistant, also fat and protein will circulate longer than 15min, maybe few hours
Dana Lewis
@danamlewis
Sep 10 2016 19:39
@Spazholio did you have negative iob when you were at 80?
Paul Martin
@Spazholio
Sep 10 2016 19:40
@danamlewis No, I had about 2U IOB.
@libxmike You’re assuming I can hit my stomach muscles with a needle. =)
Mike
@libxmike
Sep 10 2016 19:43
@Spazholio I'm talking about my own experience :)
@Spazholio you say you may need longer needle? :)
Paul Martin
@Spazholio
Sep 10 2016 19:45
Oh, I get the longest I can. The pharmacist always looks at me oddly when I say I want the longest insulin needle they have. Apparently those things are generally have an inverse association. =)
Mike
@libxmike
Sep 10 2016 19:47
I thing 9mm ist the longest
Paul Martin
@Spazholio
Sep 10 2016 19:52
I think you’re right.
Mike
@libxmike
Sep 10 2016 19:53
Are you in US?
Paul Martin
@Spazholio
Sep 10 2016 19:53
I am, yes.
Mike
@libxmike
Sep 10 2016 19:55
I was there the whole '90's but from what I read the prices for DM supply went bonkers
Tim Mecklem
@tmecklem
Sep 10 2016 20:01
I’m still struggling a surprising amount from trying to use elite cgm to report to nightscout.
:(
It’s complaining about invalid dat string format. The date field looks like: "dateString": "2016-09-10T15:37:00-0400"
is it a problem there’s no : between the timezone offset hours and minutes?
Mike
@libxmike
Sep 10 2016 20:03
@tmecklem did you check you environment variables?
Tim Mecklem
@tmecklem
Sep 10 2016 20:03
it’s trying to tz entries and erroring "ValueError: Unknown string format"
what environment variable needs to be set?
Mike
@libxmike
Sep 10 2016 20:05
Can't tell w/o knowing the app or the system as I not started yet with loop/openaps
I had often more or less similar problems on my linux and Solaris servers, try google the error
Tim Mecklem
@tmecklem
Sep 10 2016 20:06

I start with enlite data like:

  {
    "name": "GlucoseSensorData", 
    "date_type": "prevTimestamp", 
    "_tell": 2, 
    "sgv": 166, 
    "date": "2016-09-10T15:47:00", 
    "packet_size": 0, 
    "op": 83
  }

and the output from mm-format-ns-glucose becomes:

  {
    "glucose": 166, 
    "name": "GlucoseSensorData", 
    "date_type": "prevTimestamp", 
    "_tell": 2, 
    "dateString": "2016-09-10T15:47:00-0400", 
    "packet_size": 0, 
    "device": "openaps://medtronic/pump/cgm", 
    "date": 1473536820000, 
    "sgv": 166, 
    "type": "sgv", 
    "op": 83
  }
running that as the input into the nightscout/recent-missing-entries.json report gives the "ValueError: Unknown string format” error
report looks like openaps use ns shell format-recent-type tz entries raw-cgm/glucose-nightscout.json
and that glucose-nightscout is the mm-format-ns-glucose output
do I need to pass options to the tz entries to make it understand?
I’m just lost here.
Tim Mecklem
@tmecklem
Sep 10 2016 20:43
I found an unknown command in the file with a date of “undefined-0400"
seems relevant
Eric
@ecc1
Sep 10 2016 21:15
I seem to be having good results after installing network-manager on my (ubilinux) Edison. Couldn't get connman or roaming via wpa-supplicant to work reliably, but this works well so far.
Tim Mecklem
@tmecklem
Sep 10 2016 21:23
Ok. The undefined entry was causing the bad time with a bad time. All set for now. Add one more T1D to the open looping trial.
I'll try to circle back and do a PR on the docs.
This one is set up on a zero with slice of radio and a wifi dongle.
lmaguire
@lmaguire
Sep 10 2016 23:19
Hi, we're trying to upload data from Medtronic pump to Nightscout for first time. We're trying to follow the instructions in the User Guide under Visualization, subsection "Unifying pump treatments in Nightscout".
we added the nightscout/recent-treatments.json and nightscout/uploaded.json and settings/model.json reports.
when we invoke nightscout/recent-treatments.json, we get a JSON file that does indeed look like pump data.
Terri Lyman
@tatigger
Sep 10 2016 23:26
I am trying to understand what I have done in terms of adding reports and invoking them. From what I can tell so far, I have created an OpenAPS directory that I call Faith, that contains 4 directories, Nightscout, Enact, Monitor and Settings. In my directory Faith, I can show reports. That command does not work within the other directories (Nightscout, Enact, Monitor or Settings). I do have some files in those directories. For example, Nightscout contains openaps-status.json , uploaded-entries.json, recent-missing-entries.json, and uploaded.json.
These files are empty. Where did they come from and what should they contain?
lmaguire
@lmaguire
Sep 10 2016 23:28
but when we then invoke nightscout/uploaded.json, it complains that "No JSON object could be doecoded"
Do we need to do something else to upload the data first?
Terri Lyman
@tatigger
Sep 10 2016 23:29
In my directory Settings I also have a few files, for example model.json when cat gives 522
I guess what I am really asking is, I am looking for a systematic way to see what reports I have added and invoked so far, how to verify their outputs, and find the reports I am still missing.
Terri Lyman
@tatigger
Sep 10 2016 23:34
I think this report, which I find in the main directory, gives me the model.json in Settings, is that correct? pump://JSON/model/model.json
Or does it come from this report? pump://JSON/model/settings/model.json