Skip to content

Commit 672baee

Browse files
committed
add a Reference template for Nightscout Remote Config vars
1 parent 641db72 commit 672baee

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

docs/nightscout/remote-config.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,75 @@
55
3. [Update *Nightscout* site and add some "config vars" lines in *Nightscout* site settings](#step-3-add-apn-to-nightscout)
66
4. [Test Remote Overrides](#step-4-test-remote-overrides)
77

8+
## Save Your Important Nightscout Information
9+
10+
There is some important information you need to save when using Nightscout, especially for Remote Control of a Looper's phone. In addition to the URL and API_SECRET, you need 3 or 4 additional variables (`config-vars`) that you add to your Nightscout configuration.
11+
12+
1. Decide where you want your Nightscout information saved and create a special folder
13+
2. Open a text-only editor (do not use a Smart Editor, those might change capitalization or formating and ruin some of the `config-vars`)
14+
* Create a blank Nightscout Reference file using the text-only editor
15+
* Tap on the copy icon below to copy the template and paste it into your blank file
16+
* Save the file
17+
3. As you move through the steps below to configure Nightscout for remote commands, fill in the file
18+
19+
``` { .bash .copy title="Template to use for Nightscout" }
20+
MyNightscoutReferenceFile.txt
21+
22+
## This file updated on: DD MMM YYYY
23+
24+
## Important Information for Remote Commands with Nightscout
25+
26+
You will want to add information specific to your Nightscout.
27+
This will be different depending on whether you build it yourself or pay a vendor.
28+
29+
PLACEHOLDER FOR YOUR SPECIFIC INFO, e.g., vendor, username
30+
31+
The URL will always start with https://
32+
33+
https://your-nightscout-site
34+
35+
API_SECRET
36+
37+
choose-something-hard-to-guess
38+
39+
* must contain at least 12 characters
40+
* hint: don’t make it too long and do not put special characters in it (better stick to letters and numbers)
41+
* It is case-sensitive
42+
43+
If you also use Browser Build method, you need to be careful not to mix
44+
up your keys.
45+
The APNS key for Nightscout is an Apple Push Notification Key.
46+
It may look like the FASTLANE_KEY used for Browser Build,
47+
but it is completely different.
48+
You need both (if using remote features). Do NOT get them mixed up.
49+
50+
LOOP_APNS_KEY
51+
<looks like this - include the entire key>
52+
-----BEGIN PRIVATE KEY-----
53+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
54+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
55+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
56+
AAAAAAAA
57+
-----END PRIVATE KEY-----
58+
59+
LOOP_APNS_KEY_ID
60+
<looks like this>
61+
AAAAAAAAAA
62+
63+
LOOP_DEVELOPER_TEAM_ID
64+
This is the same as the TEAMID used as a browser build Secret.
65+
<looks like this>
66+
AAAAAAAAAA
67+
68+
LOOP_PUSH_SERVER_ENVIRONMENT is used only if you use TestFlight (Browser Build)
69+
as a build method; or use Xcode but then distribute via TestFlight.
70+
71+
If you build from Mac-Xcode directly to a phone, do not include this config-var
72+
73+
LOOP_PUSH_SERVER_ENVIRONMENT = production
74+
75+
```
76+
877
## Set Up Remote for *Nightscout*
978
1079
You can use the *Nightscout* site to remotely set and cancel override presets remotely in the *Loop* app.
@@ -62,6 +131,13 @@ The step is required for the *Loop* app to give permissions to your *Nightscout*
62131
!!! info "Reminder"
63132
This only works with the **paid** Apple Developer ID.
64133
134+
!!! warning "*Apple* changed the APN system"
135+
*Apple* changed the way APN are created. Your old ones should still work, but it they don't, create new ones and update all the places where they are used.
136+
137+
When creating new APN keys, you have the option for "Sandbox", "Production" or "Sandbox & Production". Be sure to choose "Sandbox & Production".
138+
139+
**TODO: Update the graphics**
140+
65141
1. To get started, go to the `Keys` section under Apple Developer's [`Certificates, Identifiers & Profiles`](https://developer.apple.com/account/resources/authkeys/list){: target="_blank" } and login with the *Apple ID* associated with your developer team that you used to build the *Loop* app.
66142
2. If not already open in your browser (compare with the below screenshot),
67143
- Click on **`Keys`** (located in the left-hand column).

0 commit comments

Comments
 (0)