openaps get-ns-glucose
head -20 cgm/ns-glucose.json
pi@raspberrypi:~/APS401 $ openaps get-ns-glucose
ns://JSON/shell/cgm/ns-glucose.json
No JSON object could be decoded
Unknown request: oref0_glucose_since
Format potential entries (glucose values) for Nightscout.
openaps use ns shell format-recent-type tz entries monitor/glucose.json | json -a dateString | wc -l
# Add it as a report
openaps report add nightscout/recent-missing-entries.json JSON ns shell format-recent-type tz entries monitor/glucose.json
# fetch data for first time
openaps report invoke nightscout/recent-missing-entries.json
# add report for uploading to NS
openaps report add nightscout/uploaded-entries.json JSON ns shell upload entries.json nightscout/recent-missing-entries.json
# upload for fist time.
openaps report invoke nightscout/uploaded-entries.json
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 48, in main
reporters.Reporter(report, device, task)(output)
File "/usr/local/lib/python2.7/dist-packages/openaps/reports/reporters/__init__.py", line 33, in __call__
self.blob = self.serialize(data)
File "/usr/local/lib/python2.7/dist-packages/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/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
pi@raspberrypi:~/APS401 $
Installing latest oref0 dev
and then do the npm spinner
pi@raspberrypi:~/APS401 $ cd ~/src/oref0/ && git pull
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), done.
From git://github.com/openaps/oref0
d21a334..f1693b3 dev -> origin/dev
Updating d21a334..f1693b3
Fast-forward
bin/oref0-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Checking /home/pi/APS401: true
/home/pi/APS401 already exists
/home/pi/src/oref0/ already exists; pulling latest
Already up-to-date.
Checking oref0 installation
Installing latest oref0 dev
> oref0@0.2.0 global-install /home/pi/src/oref0
> npm install && sudo npm install -g && sudo npm link && sudo npm link oref0
npm WARN package.json mocha@2.5.3 No README data
npm ERR! Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js'
npm ERR! { [Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 4.4.21-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/src/oref0
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/src/oref0/npm-debug.log
npm ERR! not ok code 0
npm ERR! oref0@0.2.0 global-install: `npm install && sudo npm install -g && sudo npm link && sudo npm link oref0`
npm ERR! Exit status 50
npm ERR!
npm ERR! Failed at the oref0@0.2.0 global-install script.
npm ERR! This is most likely a problem with the oref0 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm install && sudo npm install -g && sudo npm link && sudo npm link oref0
npm ERR! You can get their info via:
npm ERR! npm owner ls oref0
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.4.21-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "run" "global-install"
npm ERR! cwd /home/pi/src/oref0
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
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!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/src/oref0/npm-debug.log
npm ERR! not ok code 0