General-purpose Nightscout setup, for Dexcom Share, xDrip+, or Spike

7 Jan

Revision for “General-purpose Nightscout setup, for Dexcom Share, xDrip+, or Spike” created on January 15, 2019 @ 14:02:15

Title
General-purpose Nightscout setup, for Dexcom Share, xDrip+, or Spike
Content
<h4>Heroku is currently the recommended platform for hosting your Nightscout site. You can run a single Nightscout site 24/7 with a free Heroku account.</h4> The following directions will guide you through setting up a <strong>new</strong> Nightscout site on Heroku. If your data will be coming from the Dexcom Share service — if you are running the official Dexcom app on the CGM-wearer's phone — follow all of the "bridge" instructions here. Everything you need to do will be covered by this guide. If your data will be coming from a third-party uploader app, like <a href="https://jamorham.github.io/">xDrip+</a> or <a href="https://spike-app.com/">Spike</a>, note the instructions for setting these up in the <a href="#xDripSpikeUsers">xDrip+ and Spike users</a> section near the end. <strong>IMPORTANT NOTES:</strong> <ul> <li>If possible, go through this setup process on a desktop/laptop — many of the screens are harder to read and navigate on mobile devices. Also, <em>these</em> <em>instructions</em> are much easier to read on a larger screen.</li> <li>For those familiar with Azure setups: Heroku automatically creates an mLab database for you during the setup process; you do <strong>not</strong> need to set up mLab separately. (If you want to use a different mLab database, you can replace the MONGODB_URI string in your Heroku config variables.)</li> </ul> To create your Nightscout website on Heroku: <ol style="margin-left: 0px; padding-left: 0px;"> <li style="padding-bottom: 10px;"><strong>Create a <a href="https://github.com/join">GitHub</a> account.</strong> <ul> <li>Choose the <strong>free plan</strong>. You can skip the survey questions in the second step.</li> <li>Verify your account via the email they sent.</li> <li>Once you're verified and logged in, go to the <a href="https://github.com/nightscout/cgm-remote-monitor">main Nightscout repository here</a>.</li> <li>Make your own copy of the project by "forking" it: Click on the <strong>Fork</strong> button in the upper right. <a href="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-03-at-11.35.18-AM.png"><img class="alignnone size-full wp-image-4212" src="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-03-at-11.35.18-AM.png" alt="" width="295" height="128" /></a></li> <li>After a moment, you will have your own fork of the project. Bookmark that page, as you'll come back to it from time to time. <a href="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-03-at-11.38.38-AM.png"><img class="alignnone wp-image-4213 size-full" src="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-03-at-11.38.38-AM.png" alt="" width="460" height="113" /></a></li> </ul> </li> <li style="padding-bottom: 10px;"><strong>Create a <a href="https://signup.heroku.com/">Heroku</a> account</strong>. <ul> <li>Enter your account details. "Role" and "Primary development language" can be anything, but "Hobbyist" and "Node.js" are the most appropriate choices.</li> <li><strong>Verify your account</strong> via the link in the verification email, and set your password.</li> </ul> </li> <li style="padding-bottom: 10px;">Go to back to your GitHub account, and make sure you're in your <strong>cgm-remote-monitor</strong> repository.<a href="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-03-at-11.38.38-AM.png"><img class="alignnone wp-image-4213 size-full" src="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-03-at-11.38.38-AM.png" alt="" width="460" height="113" /></a></li> <li style="padding-bottom: 10px;">In the repository, scroll down to where the Readme file is displayed, and click the purple <strong>Deploy to Heroku</strong> button. <ul> <li><em>Scroll down to where you see the full Readme displayed; do not click the README.md link in the file list. You'll get a "No app.json located in the repo URL provided" error on deploying if you click the wrong purple button.</em></li> <li><em>If you are doing this process on a phone or tablet, you may not see the Readme displayed on scrolling — have your browser load the Desktop version of the page first.</em> <a href="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-02-at-9.34.56-AM.png"><img class="alignnone wp-image-4190 size-full" src="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-02-at-9.34.56-AM.png" alt="" width="363" height="396" /></a></li> </ul> </li> <li style="padding-bottom: 10px;">On the Heroku screen that opens, fill in the information requested: <ul> <li><strong>App name</strong>: Your site will have a URL like "your-app-name.herokuapp.com". This is where you choose the "your-app-name" part.</li> <li><strong>Region</strong>: No matter where you are, this setting doesn't impact you; can leave it on United States.</li> <li><strong>Config Vars</strong>: Most of these are populated with defaults that will be fine for a typical setup. All of them can be edited later on. There are a few you'll want to note during this setup though: <ul> <li><strong>API_SECRET:</strong> This is required. Enter a passphrase you will use for your site. It must be at least 12 characters. Be sure to write it down.</li> <li><strong>BG_HIGH, BG_LOW, BG_TARGET_TOP, and BG_TARGET_BOTTOM</strong>: The thresholds at which your site will alert you. HIGH and LOW are your "urgent" thresholds; TARGET_TOP and TARGET_BOTTOM are the top and bottom of your "good" range. <ul> <li><em>All of these values must be entered in mg/dl amounts, even if you use mmol/L</em>. Multiply by 18 to convert — if you want a BG_TARGET_TOP of 10.0 mmol/L, enter "180" (10 x 18).</li> </ul> </li> <li><strong>BRIDGE_PASSWORD</strong> and <strong>BRIDGE_USER_NAME</strong>: If your data is coming from the Dexcom Share service, you are making a "bridge". Enter your Dexcom account name and password here — the same credentials you use to sign into the Dexcom app on the phone, and the Clarity service. <ul> <li><em>Make sure to also add the <strong>bridge </strong>plugin on the ENABLE line below.</em></li> <li><em><em>If you are <strong>outside the US</strong>, you will need to also add another variable later in the setup process.</em></em></li> </ul> </li> <li><strong>DISPLAY_UNITS</strong>: Units will be mg/dl by default. If you want mmol/L, enter just "mmol" here.</li> <li><strong>ENABLE</strong>: This is the variable that turns on all the features you want to use. There are many plugins available, and you can always add or remove them later. <ul> <li><em>This field must be just a list of plugin names separated by spaces. No quotation marks, commas, or anything else. Everything must be in all lower-case.</em></li> <li>A good starting set is: <strong>careportal basal </strong>(careportal is the plugin that lets you manually add events to your graph, like insulin doses, carbs eaten, temp basals, etc. The basal plugin shows your current basal rate in a little "pill" on the main page.)</li> <li>If you also want to track pump site changes  and sensor changes: <strong>careportal basal cage sage </strong>("cage" stands for "cannula age"; "sage" = "sensor age")<strong> </strong></li> <li>If you're doing a Dexcom Share bridge: <strong>careportal basal bridge</strong></li> <li>There's a list of most of the plugins and what they do <a href="http://www.nightscout.info/wiki/welcome/website-features/0-9-features">here</a>.</li> </ul> </li> <li><strong>MONGO_COLLECTION</strong>: This field is required, but should remain as-is (as "entries").</li> <li><strong>THEME</strong>: If you want your BG graph to be green/yellow/red as it moves across the thresholds, change this to <strong>colors</strong>.</li> </ul> </li> </ul> </li> <li style="padding-bottom: 10px;">Click the <strong>Deploy app</strong> button at the bottom of the page. <ul> <li>Heroku will begin deployment, going through a list of automated steps at the bottom of the page.</li> <li>During the "Configure environment" step, you will be asked to <strong>add a credit card</strong> to the account. All Heroku accounts need a credit card on file to verify the account and allow for paid add-ons. <em>You will never be charged without explicitly opting in to extra levels of service</em>, and for a typical Nightscout site you won't ever need anything extra.</li> <li>After adding your card, you'll be back at the deployment page. Click the <strong>Deploy app</strong> button again, and it'll complete this time.<a href="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-03-at-11.56.54-AM.png"><img class="alignnone wp-image-4223 size-full" src="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-03-at-11.56.54-AM.png" alt="" width="429" height="304" /></a> <em>Be patient. This can take a few minutes.</em></li> </ul> </li> <li style="padding-bottom: 10px;">Once it has successfully deployed, click the <strong>View</strong> button to open your new site.<a href="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-03-at-11.07.45-AM.png"><img class="alignnone size-full wp-image-4205" src="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-03-at-11.07.45-AM.png" alt="" width="267" height="84" /></a></li> <li style="padding-bottom: 10px;">You will get a warning message about your profile — it just needs to be set up. Continue to the Profile Editor page. <ul> <li>Find the <strong>Timezone</strong> picker, and choose your zone. Make sure not to pick one of the generic zones (like "PST"), but rather one with a country or region prefix (like "Canada/Pacific").</li> <li>You can make other changes on this page now if you want, but you don't need to.</li> <li>You can't save your changes yet — click the <strong>Authenticate</strong> link at the bottom, and enter your <strong>API_SECRET</strong> from before. <em>(Check the "Store hash on this computer" box if you want it to remember your authentication and not ask again.)</em></li> <li>Now click the <strong>Save</strong> button. You might get a warning message about the profile format, which you can ignore.</li> <li>Now go back to your main Nightscout page by typing in <strong>your site URL</strong> into the address bar. Your URL is the <strong>App name</strong> you chose earlier, plus ".herokuapp.com" (your-app-name.herokuapp.com).</li> </ul> </li> <li style="padding-bottom: 10px;">If you are using a <strong>Dexcom Share bridge</strong>, note the additional steps below.</li> </ol> <div class="warning"></div> <h3><a id="BridgeUsers"></a>Dexcom Share bridge users</h3> In order for your site to stay active 24/7, you'll need to set up a free <a href="https://uptimerobot.com/">Uptime Robot</a> (the constant pings from this status-checking service will keep your Nightscout app awake). <ul> <li>Create a new account, and verify it with the email you get.</li> <li>Log in, and click the <strong>+ Add New Monitor</strong> button.</li> <li>Choose <strong>HTTP(s)</strong> for the Monitor Type, pick any Friendly Name, and enter <strong>your site URL</strong> as the URL (http://your-app-name.herokuapp.com). Leave the rest as-is, and click <strong>Create Monitor</strong>.</li> </ul> <strong>Important note</strong>: In order for the bridge to work, you need to have <strong>Sharing active</strong> in your Dexcom app on the CGM-wearer's phone. You do not need to have any followers. If you are <strong>outside the US</strong>, you also need to add <strong>one more variable</strong> to your Heroku setup: <ol> <li>Get to your Heroku <strong>Config Vars</strong> list as described above.</li> <li>Scroll to the bottom of the list, and add a new line, with <strong>BRIDGE_SERVER</strong> as the KEY, and <strong>EU</strong> as the VALUE:<a href="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-02-at-11.05.23-AM.png"><img class="alignnone wp-image-4196 size-full" src="http://www.nightscout.info/wp-content/uploads/2017/02/Screen-Shot-2018-12-02-at-11.05.23-AM.png" alt="" width="813" height="133" /></a>Upper-case is important here. You don't need to do anything else after adding that — in a few minutes, your Nightscout page should start showing your BG data.</li> </ol> <div class="warning"></div> <h3>Configuring the site</h3> To make additions or changes to any of your <strong>default</strong> settings, go to your <a href="https://dashboard.heroku.com/">Heroku dashboard</a>. Go into your app, go to the  "Settings" section, and then click the "Reveal Config Vars" button to show all the site variables. <em>Bookmark your app's <strong>Settings</strong> page; you'll likely come back to it often to make changes.</em> When you visit your site in a browser, all of the settings will be set with defaults based on what you have entered in your Config Vars in Heroku. You can <em>change</em> most of those settings in the main settings pane for your page: <a href="http://www.nightscout.info/wp-content/uploads/2019/01/Screen-Shot-2019-01-07-at-9.32.28-PM.png"><img class="alignnone size-full wp-image-4251" src="http://www.nightscout.info/wp-content/uploads/2019/01/Screen-Shot-2019-01-07-at-9.32.28-PM.png" alt="" width="142" height="85" /></a> ...but those changes will only affect <em>that particular web browser</em>. For example, if your ALARM_LOW is set to "on" in your Heroku Config Vars, then your Low alarm will be enabled by default in every new browser window that loads your site. But you can manually uncheck the Low alarm in any one of those browsers, and it will remain off in there only. If you want particular plugins to be <em>checked</em> by default, and not just enabled, create a SHOW_PLUGINS variable in Heroku and list them in there, just like you did in the ENABLE line. <div class="warning"></div> <h3><a id="xDripSpikeUsers"></a>xDrip+ and Spike users</h3> After your Nightscout site is up and running, you'll need to enter your <strong>URL</strong> and your <strong>API_SECRET</strong> into your receiver app. Your <strong>API_SECRET</strong> was created during the setup process above — if you've forgotten it, head back to your Config Vars section in Heroku. <h4>xDrip+ users:</h4> Go to <em>Settings &gt; Cloud Upload &gt; Nightscout Sync (REST-API)</em>, and then enter your "Base URL" by combining your <strong>API_SECRET</strong> and your <strong>site URL</strong> like this: https://<strong>API_SECRET</strong>@<strong>your-app-name</strong>.herokuapp.com/api/v1/ (Note the <strong>/api/v1/ </strong>at the end, and the http<strong>s</strong>:// at the beginning.) <a href="http://www.nightscout.info/wp-content/uploads/2019/01/Untitled.jpg"><img class="alignnone size-medium wp-image-4240" src="http://www.nightscout.info/wp-content/uploads/2019/01/Untitled-198x300.jpg" alt="" width="198" height="300" /></a> <h4>Spike users:</h4> Go to <em>Settings &gt; Share</em>, scroll down to "Nightscout" and enable it, then enter your URL like this: <strong>your-app-name</strong>.herokuapp.com and then your <strong>API_SECRET</strong> in the next field. <a href="http://www.nightscout.info/wp-content/uploads/2019/01/Untitled2.png"><img class="alignnone size-medium wp-image-4241" src="http://www.nightscout.info/wp-content/uploads/2019/01/Untitled2-183x300.png" alt="" width="183" height="300" /></a> <div class="warning"></div> <h3>Deploying a different branch</h3> If you need to deploy a different branch to your existing Heroku site: <ol> <li style="list-style-type: none;"> <ol> <li>Get to your app's <a href="https://dashboard.heroku.com/">dashboard</a> in Heroku.</li> <li>Go to the "Deploy" tab.</li> <li><strong>If your app doesn't appear to be connected to Github:</strong> <ul> <li>Click "GitHub" next to "Deployment Method."</li> <li>Enter your GitHub user name in the first box next to "Connect to GitHub" and enter "cgm-remote-monitor" in the next box.</li> <li>Click "Search."</li> <li>Select your repository and click "Connect."</li> </ul> </li> <li><strong>If your app shows that it is connected to GitHub:</strong> <ul> <li>At the bottom of the screen, under the heading "Deploy a GitHub branch," select the branch (e.g., "dev") from the drop-down list.</li> <li>Click "Deploy Branch."</li> <li>Wait for the deployment to fully finish.</li> </ul> </li> </ol> </li> </ol>
Excerpt


OldNewDate CreatedAuthorActions
January 15, 2019 @ 14:02:15 John Weston
January 15, 2019 @ 14:01:27 John Weston
January 15, 2019 @ 14:00:58 [Autosave] John Weston
January 15, 2019 @ 13:59:55 John Weston
January 15, 2019 @ 13:58:38 John Weston
January 15, 2019 @ 13:58:16 John Weston
January 7, 2019 @ 23:56:10 John Weston
January 7, 2019 @ 23:52:40 John Weston
January 7, 2019 @ 23:50:53 John Weston
January 7, 2019 @ 23:48:38 John Weston
January 7, 2019 @ 23:22:26 John Weston
January 7, 2019 @ 23:22:04 John Weston
January 7, 2019 @ 23:18:12 John Weston
January 7, 2019 @ 23:17:29 John Weston
January 7, 2019 @ 23:16:54 John Weston
January 7, 2019 @ 23:16:14 John Weston
January 7, 2019 @ 23:09:18 John Weston
January 7, 2019 @ 23:07:43 John Weston
January 7, 2019 @ 23:07:14 John Weston
January 7, 2019 @ 21:01:05 John Weston
January 7, 2019 @ 21:00:08 John Weston
January 7, 2019 @ 20:58:51 John Weston
January 7, 2019 @ 20:57:46 John Weston
January 7, 2019 @ 20:55:08 John Weston
January 7, 2019 @ 20:54:39 John Weston
January 7, 2019 @ 20:53:38 John Weston
January 7, 2019 @ 20:03:57 John Weston
December 3, 2018 @ 14:37:59 John Weston
December 3, 2018 @ 14:35:36 John Weston
December 3, 2018 @ 13:57:46 John Weston
December 3, 2018 @ 13:53:40 John Weston
December 3, 2018 @ 13:52:06 John Weston
December 3, 2018 @ 13:51:21 John Weston
December 3, 2018 @ 13:50:50 John Weston
December 3, 2018 @ 13:49:39 John Weston
December 3, 2018 @ 13:46:49 John Weston
December 3, 2018 @ 13:46:01 John Weston
December 3, 2018 @ 13:45:07 John Weston
December 3, 2018 @ 13:41:44 John Weston
December 3, 2018 @ 13:26:29 John Weston
December 3, 2018 @ 13:23:49 John Weston
December 3, 2018 @ 13:21:19 John Weston
December 3, 2018 @ 13:15:36 John Weston
December 3, 2018 @ 13:12:06 John Weston
December 3, 2018 @ 13:08:21 John Weston
December 2, 2018 @ 21:23:28 John Weston
December 2, 2018 @ 21:19:27 John Weston
December 2, 2018 @ 21:12:35 John Weston
December 2, 2018 @ 13:15:00 John Weston
December 2, 2018 @ 13:13:42 John Weston
December 2, 2018 @ 13:10:30 John Weston
October 23, 2017 @ 17:43:54 Amy Cowen
October 23, 2017 @ 17:43:23 Amy Cowen
October 23, 2017 @ 17:42:56 [Autosave] Amy Cowen
September 22, 2017 @ 15:26:59 Amy Cowen
September 21, 2017 @ 23:28:21 Amy Cowen
September 21, 2017 @ 23:08:48 Amy Cowen
September 21, 2017 @ 23:00:33 Amy Cowen
September 21, 2017 @ 22:45:32 Amy Cowen
June 27, 2017 @ 17:40:52 Kate Farnsworth
May 15, 2017 @ 18:44:30 Amy Cowen
March 30, 2017 @ 11:02:24 Amy Cowen
March 30, 2017 @ 10:52:15 Amy Cowen
March 8, 2017 @ 17:16:37 Amy Cowen
March 8, 2017 @ 17:16:26 Amy Cowen
March 8, 2017 @ 16:46:52 Amy Cowen
March 8, 2017 @ 16:46:15 Amy Cowen
February 18, 2017 @ 21:20:12 Amy Cowen
February 18, 2017 @ 21:18:52 Amy Cowen
February 18, 2017 @ 21:17:45 Amy Cowen
February 18, 2017 @ 21:16:56 Amy Cowen
February 18, 2017 @ 21:13:03 Amy Cowen