Skip to content

Commit b9fd20b

Browse files
dirkgastaldodanamlewis
authored andcommitted
Update nightscout-setup.md (openaps#980)
* Update nightscout-setup.md nits formatted links typos clarification These graphics are not showing on this page: AddRole, AddSubject Dana/Scott/others: please see notes in brackets above. * Remove NOTEs and clarify using token auth roles * Fix image links
1 parent 743fcbf commit b9fd20b

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

docs/docs/While You Wait For Gear/nightscout-setup.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## Nightscout Introduction
44

5-
[Nightscout](http://nightscout.info) is an open source, DIY project that allows real-time access to a CGM data
6-
via personal website, smartwatch viewers, or apps and widgets available for
5+
[Nightscout](http://nightscout.info) (NS) is an open source, DIY project that allows real-time access to CGM data
6+
via a personal website, smartwatch viewers, or apps and widgets available for
77
smartphones. Setting up a Nightscout web app is the recommended way to visualize your
88
OpenAPS closed loop.
99

10-
Nightscout allows a user to upload CGM data from a variety of sources, to an
10+
Nightscout allows a user to upload CGM data from a variety of sources to an
1111
online database and cloud computing service. The information is then processed
12-
and displayed visually as a graph. There are plugins that allow greater
12+
and displayed visually as a graph. There are plugins that allow more
1313
information to be shown about OpenAPS, too. As the data is uploaded to an online
1414
website and then retrieved by OpenAPS, it allows OpenAPS a wider range of
1515
compatibility with various CGM solutions.
@@ -26,13 +26,13 @@ your data, customized watchfaces with your OpenAPS data, and integration with IF
2626

2727
* If you plan to use Nightscout with OpenAPS, we recommend using Heroku, as OpenAPS can reach the usage limits of the free Azure plan and cause it to shut down for hours or days. If you end up needing a paid tier, the $7/mo Heroku plan is also much cheaper than the first paid tier of Azure. Currently, the only added benefit to choosing the $7/mo Heroku plan vs the free Heroku plan is a section showing site use metrics for performance (such as response time). This has limited benefit to the average OpenAPS user. **In short, Heroku is the free and OpenAPS-friendly option for NS hosting.**
2828

29-
* Create an account at [Heroku](https://www.heroku.com) and choose the Primary Development Language to be Node.js when you create your account. You’re going to use a free account, but you will still need to enter credit card information for your account setup before the app will deploy. You'll need confirm your Heroku account by clicking a link sent via email.
29+
* Create an account at [Heroku](https://www.heroku.com) and choose the Primary Development Language to be Node.js when you create your account. You’re going to use a free account, but you will still need to enter credit card information for your account setup before the app will deploy. You'll need to confirm your Heroku account by clicking a link sent via email.
3030

3131
![Heroku signup example](../Images/nightscout/heroku_signup.jpg)
3232

3333
* Create an account at [GitHub](https://github.com)
3434
*****************
35-
**Note:** If you already have an existing GitHub account and NS site, you may just need to update your repository by doing a Compare in GitHub. Use `https://github.com/yourgithubname/cgm-remote-monitor/compare/master...nightscout:master` and replace yourgithub name. Click the big green `Create pull request` button. Another screen will appear, fill in a title and click button to `create the pull request`, and then you can `Merge pull request`, and finally `Confirm merge`. That process updates your Nightscout repository in Github. Once updated, you can skip the "click the Fork Button" step below and start following along with the purple `Deploy to Heroku` button step from your updated Nightscout cgm-remote-monitor repository.
35+
**Note:** If you already have an existing GitHub account and NS site, you may just need to update your repository by doing a Compare in GitHub. Use `https://github.com/yourgithubname/cgm-remote-monitor/compare/master...nightscout:master` and replace "yourgithubname" with your GitHub name. Click the big green `Create pull request` button. Another screen will appear, fill in a title and click button to `create the pull request`, and then you can `Merge pull request`, and finally `Confirm merge`. That process updates your Nightscout repository in GitHub. Once updated, you can skip the "click the Fork Button" step below and start following along with the purple `Deploy to Heroku` button step from your updated Nightscout cgm-remote-monitor repository.
3636
*****************
3737
* Go to the [Nightscout cgm-remote-monitor repository](https://github.com/nightscout/cgm-remote-monitor)
3838

@@ -59,7 +59,7 @@ your data, customized watchfaces with your OpenAPS data, and integration with IF
5959
<tbody>
6060
<tr>
6161
<th>API_SECRET</th>
62-
<td>Create your own API_SECRET…this is like the password to your NS site. Please write it down somewhere safe or commit it to memory, you will be using it in the future. It needs to be at least 12 characters long and should NOT use the `@` symbol.</td>
62+
<td>Create your own API_SECRET. This is like the password to your NS site. Please write it down somewhere safe or commit it to memory, you will be using it in the future. It needs to be at least 12 characters long and should NOT use the `@` symbol.</td>
6363
</tr>
6464
<tr>
6565
<th>AUTH_DEFAULT_ROLES</th>
@@ -127,7 +127,7 @@ your data, customized watchfaces with your OpenAPS data, and integration with IF
127127
**The remaining variables can be left at their default values.**</br></br>
128128

129129
*****************
130-
**Note:** for BRIDGE_MAX_COUNT: This value sets the number of BG values to pull from Share per update. Each Dexcom BG value represent 5 minutes. Nightscout defaults to BRIDGE_MAX_COUNT=1. If you lose connectivity with your Dexcom transmitter, your Share app will automatically backfill data points when you regain connectivity. Nightscount does not do this and you will have gaps in the data for when you were out of range. More information here https://github.com/nightscout/cgm-remote-monitor#bridge-share2nightscout-bridge
130+
**Note:** for BRIDGE_MAX_COUNT: This value sets the number of BG values to pull from Share per update. Each Dexcom BG value represent 5 minutes. Nightscout defaults to BRIDGE_MAX_COUNT=1. If you lose connectivity with your Dexcom transmitter, your Share app will automatically backfill data points when you regain connectivity. Nightscount does not do this and you will have gaps in the data for when you were out of range. More information [here](https://github.com/nightscout/cgm-remote-monitor#bridge-share2nightscout-bridge).
131131

132132
You can change the BRIDGE_MAX_COUNT value to pull more samples per query, which will backfill BRIDGE_MAX_COUNT values for you. This change increases your data usage and may affect your Nightscout billing tier. Setting BRIDGE_MAX_COUNT to 7 will update the previous 35 minutes of data and will keep OpenAPS up to date on your current BG trends. If you frequently have larger data gaps and you use autotune, you may consider increasing this number more to backfill data more aggressively.
133133
*****************
@@ -146,7 +146,7 @@ You can change the BRIDGE_MAX_COUNT value to pull more samples per query, which
146146

147147
You do not have to enter all the information in the profile if you are using OpenAPS (since OpenAPS will be providing the information for IOB and COB rather than letting NS calculate them), but you do have to fill out the `Basal Profile` and `TimeZone` at a minimum in order to have your temp basals properly display. Click `Save` when you have entered the information. You will be prompted to authenticate, if it is the first time you’ve used the device to make changes in your profile. Click on the `Authenticate` link at the bottom of the site, and enter your API_SECRET to complete the authentication.
148148

149-
**Note:** OpenAPS will only work based on the values in your pump; not the values that you put into Nightscout profile. You will need to keep the Nightscout basal profile in-sync with any changes you make in your pump to prevent later confusion in watching the temp basal rendering.
149+
**Note:** OpenAPS will only work based on the values in your pump; not the values that you put into your Nightscout profile. You will need to keep your Nightscout basal profile in-sync with any changes you make in your pump to prevent later confusion in watching the temp basal rendering.
150150

151151
![Profile for basals](../Images/nightscout/profile.jpg)
152152

@@ -260,12 +260,12 @@ If you want to secure your Nightscout and CGM data, then all rigs need to have o
260260

261261
Here are the steps you need to follow:
262262

263-
1. Visit https://mynightscout.herokuapp.com/admin
263+
1. Visit https://yourappname.herokuapp.com/admin. Replace "yourappname" with the name you chose for your app above, that is, the prefix of your NS site's URL.
264264
- Add a new Role
265265

266266
Name: `oref0rig`
267267

268-
Permissions: Add the following 6 permissions. Note that the default window is to small to fit them all.
268+
Permissions: Add the following 6 permissions. Note that the default window is too small to see them all after you paste them in.
269269
```
270270
api:devicestatus:create,
271271
api:devicestatus:read,
@@ -279,20 +279,20 @@ Here are the steps you need to follow:
279279
280280
2. Add a new Subject
281281
282-
Name: the name of your rig (same as the hostname of your rig).
283-
Note: Nightscout will shorten the name to 10 characters in your accesstoken, e.g. `myedisonhostname` becomes `myedisonho-0dccda4ae591e763`
282+
Name: the name of your rig (same as the hostname of your rig). You will need to add a new Subject for each rig you run.
283+
Note: Nightscout will shorten the name to 10 characters in your accesstoken, e.g., `myedisonhostname` becomes `myedisonho-0dccda4ae591e763`
284284
285285
Roles: `oref0rig`
286286
287287
![AddSubject](../Images/nightscout/subject-oref0rig.png)
288288
289289
Press Save button.
290290
291-
In the Subject - People, Device etc. view you'll see the accesstoken for your rig, e.g. `myrigname-27c914cabc506fa3`
291+
In the Subject - People, Device etc. view you'll see the access token for your rig, e.g., `myrigname-27c914cabc506fa3`
292292
293-
3. You need your rig to use the token based authentication token. This can be done in three different ways:
293+
3. You need your rig to use the token based authentication. This can be done in three different ways:
294294
295-
- Using the `oref0-setup.sh` interactive setup. Enter the accesstoken (subjectname and hash of 16 characters, e.g. `myrigname-27c914cabc506fa3`)
295+
- Using the `cd && ~/src/oref0/bin/oref0-setup.sh` interactive setup. Enter the access token (subjectname and hash of 16 characters, e.g., `myrigname-27c914cabc506fa3`)
296296
Example of the interactive setup:
297297
```
298298
Are you using Nightscout? If not, press enter.
@@ -305,7 +305,7 @@ Here are the steps you need to follow:
305305
306306
- Using the `oref0-setup` or `oref0-runagain.sh` command line.
307307
Use `--api-secret=token=myrigname-27c914cabc506fa3`. Don't forget to start with `token=`.
308-
During install it will connect to the Nightscout and check if the permissions are ok. If OK you'll see this in your log:
308+
During install it will connect to your Nightscout site and check if the permissions are ok. If OK you'll see this in your log:
309309
```
310310
2017-06-10 19:46:14,758 INFO Nightscout host: https://mynightscout.herokuapp.com
311311
2017-06-10 19:46:14,816 INFO Starting new HTTPS connection (1): mynightscout.herokuapp.com
@@ -314,7 +314,7 @@ Here are the steps you need to follow:
314314
```
315315
If it's not ok it will exit the setup script and tell you which permissions are missing.
316316
317-
- Change the token in `ns.ini`. It's the third argument of the `args=` line, e.g.
317+
- Change the token in `ns.ini`. It's the third argument of the `args=` line:
318318
```
319319
[device "ns"]
320320
fields = oper
@@ -323,16 +323,16 @@ Here are the steps you need to follow:
323323
```
324324
You must also change your `API_SECRET` in your crontab, e.g. `API_SECRET=token=myrigname-27c914cabc506fa3`. Use `crontab -e` to edit your crontab.
325325
326-
4. Test the rig, e.g. by running `openaps upload` or `openaps upload-ns-status` or just running the pump loop. You'll see the update from myrigname in the OpenAPS pill in Nightscout.
326+
4. Test the rig by running `openaps upload` or `openaps upload-ns-status` or just running the pump loop. You should see the update from myrigname in the OpenAPS pill in Nightscout.
327327
328328
5. When all the rigs are 0.5.0 and are all using token based authentication, you can change the environment variables of your Nightscout:
329-
- `AUTH_DEFAULT_ROLES` from `readable devicestatus-upload` to `denied` if you wish to block read-only access to your Nightscout instance. If you don't mind your CGM data being accessible to anyone with your Nightscout URL, you can just leave `AUTH_DEFAULT_ROLES` as `readable`.
329+
- `AUTH_DEFAULT_ROLES` from `readable devicestatus-upload` to `denied` if you wish to block read-only access to your Nightscout instance. If you don't mind your CGM data being accessible to anyone with your Nightscout URL, you can just leave `AUTH_DEFAULT_ROLES` absent, which will default it to the value of `readable`.
330330
331-
Important:
332-
- Just like keeping your pump serial number and API_SECRET for yourself, you should not post your authentication token `myrigname-27c914cabc506fa3` on the internet
331+
Other notes:
332+
- Just like keeping your pump serial number and API_SECRET for yourself, you should not post your authentication token `myrigname-27c914cabc506fa3` on the Internet
333333
- The authentication is also stored in your `crontab`, as `API_SECRET=token=myrigname-27c914cabc506fa3`. When token based authentication is used the API_SECRET on the rig will always start with `token=` instead of a hash.
334-
- You must always secure your Nightscout site with secure http (https), so don't use http://mynightscout.herokuapp.com but always use https://mynightscout.herokuapp.com
335-
- Keep your API_SECRET as a root/Administrator password and only use it for configuring Nightscout. For just reading use a token with the `readable` role, and if you want to use the Careportal add the `careportal` role for that user.
334+
- You must always secure your Nightscout site with secure http (https). Don't use http://mynightscout.herokuapp.com but rather always use https://mynightscout.herokuapp.com.
335+
- Once you have token auth enabled, you can stop entering your API_SECRET in your browser when authenticating, and keep your API_SECRET as a root/Administrator password that you only use for configuring Nightscout. Instead, you can set up a user (as in steps 1 and 2 above) with the appropriate role. If you wish to be able to enter treatments into NS, you'll need to create an account with `careportal` access and authenticate with that in Nightscout. If you set AUTH_DEFAULT_ROLES to `denied` in step 5, you'll also need a user with `readable` permissions for any browsers that should have read-only access.
336336
337337
### Switching from Azure to Heroku
338338
@@ -344,11 +344,11 @@ Important:
344344
345345
![Deploy branch](../Images/nightscout/deploy_branch.jpg)
346346
347-
## Nightscout Troubleshooting and FAQ's
347+
## Nightscout Troubleshooting and FAQ
348348
349349
### It's not working - I'm missing data in Nightscout?
350350
351-
If you are using a "test pump" that has not received sufficient data in some time, Nightscout pills will NOT be displayed onscreen. Nightscout may also not work if it hasn't had CGM data in a while - so if you haven't been using a CGM and uploading CGM data to Nightscout for the past few days, the site may be empty as well. If this happens, simply use this pump in tandem with a CGM so glucose values are recorded and eventually uploaded to Nightscout. Once sufficient data has been collected, (and OpenAPS plugin is enabled and saved), the OpenAPS pills should appear automatically. Medtronic CGM users may also [need to do this to get their CGM data flowing into Nightscout after a gap in uploading data](http://openaps.readthedocs.io/en/latest/docs/Customize-Iterate/offline-looping-and-monitoring.html#note-about-recovery-from-camping-mode-offline-mode-for-medtronic-cgm-users).
351+
If you are using a "test pump" that has not received sufficient data in some time, Nightscout pills will NOT be displayed onscreen. Nightscout may also not work if it hasn't had CGM data in a while - so if you haven't been using a CGM and uploading CGM data to Nightscout for the past few days, the site may be empty as well. If this happens, simply use this pump in tandem with a CGM so glucose values are recorded and eventually uploaded to Nightscout. Once sufficient data has been collected (and OpenAPS plugin is enabled and saved) the OpenAPS pills should appear automatically. Medtronic CGM users may also [need to do this to get their CGM data flowing into Nightscout after a gap in uploading data](http://openaps.readthedocs.io/en/latest/docs/Customize-Iterate/offline-looping-and-monitoring.html#note-about-recovery-from-camping-mode-offline-mode-for-medtronic-cgm-users).
352352
353353
### A Note about Nightscout's COB Pill
354354

0 commit comments

Comments
 (0)