Skip to content

Commit

Permalink
Merge pull request #236 from openaps/dev
Browse files Browse the repository at this point in the history
Dev to master
  • Loading branch information
scottleibrand committed Jun 8, 2016
2 parents 5cb2149 + 9995813 commit 9ccd615
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/Resources/my-first-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ It will now be in a list of PR's that the team will review and potentially give

Congrats, you made your first contribution!

PS, your fork will still be sitting on your own personal github account. You can delete it if you are done with it. In the future, be sure to pull a fresh copy from github.com/openaps/docs before making new edits.
PS, your fork will still be sitting on your own personal github account. After you get a notification that your PR has been merged, you can delete your branch/fork if you are done with it. In the future, be sure to pull a fresh copy from github.com/openaps/docs before making new edits.
4 changes: 4 additions & 0 deletions docs/docs/walkthrough/phase-0/loops-in-progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@ List of people who are working on closed loops:
- Gary Kidd
- Nathan Morse
- Paul Davis (Brighton, UK)
- Marion Barker (Sunnyvale, CA, USA)
- Frank Jungman (San Diego, CA)
- Sophie Thacher
- Luis Betancourt (Veracruz, Mexico)
- Tom Boudreau (Washington DC, USA)
56 changes: 56 additions & 0 deletions docs/docs/walkthrough/phase-1/openaps-to-nightscout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
To get your OpenAps viewed onto your Nightscout site, start by using the following tool:(It would be a good idea to be disconnected from your pump and do a Bolus Wizard so you can check the status of your Nightscout uploading.)
$nightscout autoconfigure-device-crud
To view your data on your Nightscout site, start by doing the following:
$nightscout autoconfigure-device-crud https://yourname.com yourplainapisecret
So this would be your actual https://myname.azurewebsites.net or https://myname.herokuapp.com Your API_SECRET is listed in your Azure or Heroku settings.
To test this: $openaps use ns shell preflight
To get aliases:
curl -sg https://gist.githubusercontent.com/bewest/d3db9ca1c144b845382c885138a8f66e/raw/181c5d6f29cd6489ecc9630786cf2c4937ddde79/bewest-aliases.json | openaps import

To pull data: $openaps gather-clean-data

To set up Nightscout reports:
curl -sg https://gist.githubusercontent.com/bewest/d3db9ca1c144b845382c885138a8f66e/raw/522155bae116983499bb1de30f10f52eb3c4b6b7/ns-reports.json | openaps import

To see your progress: $openaps do-everything

To add the Maximum Insulin On Board to be 2 units:
oref0-mint-max-iob 2 max-iob.json

Then again, to check your progress: $openaps do-everything
At this point, you should see treatment circles, information about the battery, etc.

To verify what was uploaded to Nightscout:
$cat nightscout/uploaded.json

Then for the status:
oref0 device-helper ns-status 'ns-status $*' | openaps import

Then:
openaps use ns-status shell monitor/clock.json oref0-monitor/iob.json oref0-predict/oref0.json oref0-enacted/enacted-temp-basal.json monitor/battery.json monitor/reservoir.json monitor/status.json

You should see a lot of info. (Side note: the word "received" is spelled wrong.)

Make sure to save this as a report:
openaps report add nightscout/openaps-status.json JSON ns-status shell monitor/clock.json oref0-monitor/iob.json oref0-predict/oref0.json oref0-enacted/enacted-temp-basal.json monitor/battery.json monitor/reservoir.json monitor/status.json

Now it needs to be invoked to test that it is getting data.
openaps report invoke nightscout/openaps-status.json

Test uploading it:
openaps use ns shell upload devicestatus.json nightscout/openaps-status.json

If it works, save it as a report:
openaps report add nightscout/uploaded-recent-devicestatus.json JSON ns shell upload devicestatus.json nightscout/openaps-status.json added ns://JSON/shell/nightscout/uploaded-recent-devicestatus.json

Now those aliases we did earlier need adjustment for all of the recent work we just did:
openaps alias add report-nightscout "report invoke nightscout/preflight.json nightscout/recent-treatments.json nightscout/uploaded.json nightscout/recent-missing-entries.json nightscout/uploaded-entries.json nightscout/openaps-status.json nightscout/uploaded-recent-devicestatus.json"

SUCCESS!!

To upload to Nightscout, use: $openaps do-everything
To just test uploading to Nightscout, use: $openaps report-nightscout

Make sure to backup all the work you have just done:
oref0 export-loop | tee backup-loop.json

4 changes: 4 additions & 0 deletions docs/docs/walkthrough/phase-1/visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ Click on the Profile Editor button.
Create a new profile (if you don't already have one) using the settings that match what you already have set up in your pump.
Fill out all the profile fields and click save.

### New simpler method for Nightscout upload

[This walkthrough](openaps-to-nightscout.md) outlines an easier method than the below. We need volunteers to run through this method and replace the sections below as appropriate.

### Configuring and Uploading OpenAPS Status

**At this point in the docs I find it confusing as the next part dives straight into working inside of your openaps repo (or whatever the right term for it is). I would think before jumping straight to setting up the integration with Nightscout you would go over some basic `openaps use ns` type stuff, or even just doing `openaps init` for the first time. I see this stuff is in [Phase 2 - Configuring and Learning to Use openaps Tools](https://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-2/using-openaps-tools.html), so the next bit seems out of place if you're supposed to follow the phases in order**
Expand Down

0 comments on commit 9ccd615

Please sign in to comment.