XDripNightScout: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 3: | Line 3: | ||
=== Install NVM === | === Install NVM === | ||
NightScout install NVM | NightScout install NVM | ||
< | <syntaxhighlight lang=bash> | ||
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash | $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash | ||
$ nvm install 0.10.42 | $ nvm install 0.10.42 | ||
$ nvm use 0.10.42 | $ nvm use 0.10.42 | ||
</ | </syntaxhighlight> | ||
=== Clone and Build === | === Clone and Build === | ||
< | <syntaxhighlight lang=bash> | ||
$ git clone https://github.com/nightscout/cgm-remote-monitor.git | $ git clone https://github.com/nightscout/cgm-remote-monitor.git | ||
$ cd cgm-remote-monitor | $ cd cgm-remote-monitor | ||
$ npm install | $ npm install | ||
</ | </syntaxhighlight> | ||
=== Setup my.env === | === Setup my.env === | ||
< | <syntaxhighlight lang=bash> | ||
$ cat my.env | $ cat my.env | ||
MONGO_CONNECTION=mongodb://user:password@my_mongodb_host:27071 | MONGO_CONNECTION=mongodb://user:password@my_mongodb_host:27071 | ||
Line 34: | Line 34: | ||
DEVICESTATUS_ADVANCED="true" | DEVICESTATUS_ADVANCED="true" | ||
</ | </syntaxhighlight> | ||
=== Start NightScout === | === Start NightScout === | ||
< | <syntaxhighlight lang=bash> | ||
env $(cat my.env) ENABLE="pump careportal iob cob basal" PUMP_FIELDS="reservoir battery" node server.js | env $(cat my.env) ENABLE="pump careportal iob cob basal" PUMP_FIELDS="reservoir battery" node server.js | ||
</ | </syntaxhighlight> | ||
=== NightScout API === | === NightScout API === | ||
< | <syntaxhighlight lang=bash> | ||
https://drew.invadelabs.com/api/v1/entries | https://drew.invadelabs.com/api/v1/entries | ||
https://drew.invadelabs.com/api/v1/current | https://drew.invadelabs.com/api/v1/current | ||
https://[email protected]/api/v1/entries | https://[email protected]/api/v1/entries | ||
</ | </syntaxhighlight> | ||
== mmcsv MiniMed Connect to CSV / JSON == | == mmcsv MiniMed Connect to CSV / JSON == | ||
< | <syntaxhighlight lang=bash> | ||
$ git clone https://github.com/LittleDMatt/mmcsv.git | $ git clone https://github.com/LittleDMatt/mmcsv.git | ||
$ vi lib/utils.js | $ vi lib/utils.js | ||
Line 64: | Line 64: | ||
Upload to nightscout: | Upload to nightscout: | ||
$ curl -vs -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "api-secret:my_api_secret" --data-binary @bla.json "http://192.168.1.124:1337/api/v1/treatments" | $ curl -vs -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "api-secret:my_api_secret" --data-binary @bla.json "http://192.168.1.124:1337/api/v1/treatments" | ||
</ | </syntaxhighlight> | ||
== xDrip == | == xDrip == | ||
== xDripPebble == | == xDripPebble == |
Revision as of 01:44, 25 January 2018
NightScout
Install NVM
NightScout install NVM
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
$ nvm install 0.10.42
$ nvm use 0.10.42
Clone and Build
$ git clone https://github.com/nightscout/cgm-remote-monitor.git
$ cd cgm-remote-monitor
$ npm install
Setup my.env
$ cat my.env
MONGO_CONNECTION=mongodb://user:password@my_mongodb_host:27071
MONGO_COLLECTION=entries
DISPLAY_UNITS=mg/dl
API_SECRET=my_api_secret
CUSTOM_TITLE=Drew
THEME=colors
#TREATMENTS_AUTH=on
ALARM_URGENT_HIGH=off
ALARM_HIGH=off
ALARM_LOW=off
ALARM_URGENT_LOW=off
DEVICESTATUS_ADVANCED="true"
Start NightScout
env $(cat my.env) ENABLE="pump careportal iob cob basal" PUMP_FIELDS="reservoir battery" node server.js
NightScout API
https://drew.invadelabs.com/api/v1/entries
https://drew.invadelabs.com/api/v1/current
https://[email protected]/api/v1/entries
mmcsv MiniMed Connect to CSV / JSON
$ git clone https://github.com/LittleDMatt/mmcsv.git
$ vi lib/utils.js
change to US time stamp
// changed date format from MM/DD/YYTHH:mm:ss
var CARELINK_TIME = 'MM/DD/YYTHH:mm:ss';
var OUTPUT_TIME_MASK = 'YYYY-MM-DDTHH:mm:ss';
$ bin/mmcsv fetch --username $CARELINK_USERNAME --password $CARELINK_PASSWORD$ --days 30 > ~/this.csv
$ bin/mmcsv parse ~/this.csv > ~/bla.json
Upload to nightscout:
$ curl -vs -X POST --header "Content-Type: application/json" --header "Accept: application/json" --header "api-secret:my_api_secret" --data-binary @bla.json "http://192.168.1.124:1337/api/v1/treatments"