Streamlined Nightscout Setup Guide

23 Aug
Guides > Streamlined Nightscout Setup Guide

The little “yellow” guide to setting up Nightscout.

Setting Up CGM Remote Monitoring

  1. Decide what uploader device you will be using and what uploader app you need to pair with your (or your T1D’s) CGM. The type of CGM you will be using determines what options are available to you for uploader application and uploader device. This guide is NOT a walkthrough of the various uploader configurations (e.g., xDrip, xDrip wixel, Parakeet, Medtronic, etc.). If you are unsure what options are available, you will find some (but not all) of them outlined here in the How Do You Get Your CGM in the Cloud chart.
  2. Decide if you will use Nightscout. Dexcom G4 Share and G5 users: for both Android and iOS users, there are ways to “just” use Dexcom apps with Dexcom G4 with Share or with G5. Using Nightscout in addition to (or instead of) the Dexcom apps is optional. Many people use Nightscout for the additional features or as an alternative to uploading data to Dexcom’s servers. To better understand the difference and what Nightscout offers:

    Nightscout is not simply a replacement for the Dexcom apps. Nightscout (the site) extends the Dexcom apps and offers greater functionality and a more integrated solution.

Setting Up Nightscout (the website)

If you decide to set up Nightscout (full or bridge), the following directions will help ensure you complete the major steps and take advantage of a few additional features (from the start) to better customize your Nightscout experience.

All of the steps below are fully documented on the Nightscout site. This guide helps simplify the steps and can serve as a checklist during setup. For the core (GithHub, Azure, and mLab) steps, it is imperative that you read and follow the linked directions.

  1. Create a GitHub account. Write down the account information. [Directions (step 1)]
  2. Fork the cgm-remote-monitor repository in GitHub. (This means you are making your own copy of it.)
  3. Create a mLab account and set up a database and user, being careful to write down the account information (so you can log in again in the future), the database name, the database user name, the database user password, and the “string” shown at the top of your mLab screen when you are done. (You will need those pieces of information to create your connection string in Azure.) [Directions]
  4. Create an Azure account. Write down the account information. [Directions (step 2)]
  5. Follow the directions (carefully) to:
    1. Create a web app [Directions (step 2.2.1-14)]
    2. Deploy your GitHub code [Directions (step 3)]
    3. Enter your mLab connection string and collection variables [Directions (step 4)]
    4. Set the API_SECRET value (being careful to ensure it is at least 12 characters) [Directions (step 4)]
  6. Confirm your site was successfully deployed and configured. [Directions (step 5)]
    If your Nightscout website loads as a “black” page in a browser, great. You are ready for data.

    If your Nightscout site loads as a “white” page in a browser, you need to check to see that the GitHub deployment was successful. If it was not, try it again. If the deployment has a green checkmark, but the site is white, then you need to check the mLab string very carefully. Also make sure the API_SECRET is at least 12 characters. (If you make any changes, be sure to hit “save” in Azure.)

  7. Once your site is loading as a “black” page with time and dashes (or the word “undefined”), move on to the next steps.
  8. Follow the directions to change your Azure set to pay-as-you-go AND the “free tier.” [This is a two-part process. If you do not take steps to select the “free tier,” you will be billed. [Directions (step 6)]
  9. You can use your site “as is,” or you can take advantage of other features and customize some of your settings, as described below. If I was setting up a new site, I would go through and make the following configuration changes (in Azure):
    • Turn on (or “enable”) Nightscout features. Key features you might want to use include: CarePortal, IOB, COB, CAGE, basal, bwp, sage, iage, rawbg (Android only), pushover. [Note: If your site is a bridge site, bridge must also be in the ENABLE string.]

      What do you want?

      • Raw data = rawbg (if you are using Android)
      • CarePortal = careportal (system for logging)
      • Insulin-on-Board = iob (if you make CarePortal entries, you want this)
      • Carbs-on-Board = cob (if you make CarePortal entries, you want this)
      • Cannula Age = cage (helpful!)
      • Basal = basal (adds basal visualization to the graph)
      • Basal Wizard Profile = bwp (try it; see what you think)
      • Pushover = pushover (enables notifications)
      • Insulin Age = iage (when did you change the cartridge)
      • Sensor Age = sage (when did you start a sensor session)
      • Bridge = bridge (if you are using iOS to upload and want to pull the data from the Dexcom server to a Nightscout site)

      The golden rule is that the ENABLE variable can only appear one time. (If you try and follow multiple sets of directions, you may end up with an ENABLE variable in the App Settings and one in Connection Strings. This will not work.) Put your ENABLE variable in the first blank box of a blank row in App Settings. In the box next to it, enter the features you want to use, with a space between each one. For example:

      careportal rawbg iob cob cage sage iage basal pushover

    • If you are using an iOS uploader and configuring the bridge, be sure to add “bridge” to your enable string (see above) and set the BRIDGE_USER_NAME and BRIDGE_PASSWORD variables. [Directions] (If you are outside of the U.S., you also need to set the BRIDGE_SERVER variable.)
    • Customize your alarm ranges (thresholds) by setting your own target and urgent low and high values. (If you do not set them, the lines drawn will be at default values, and alarms will go off at those values.) To change the ranges, configure the following variables in App Settings:
      amyguide-thresholds

      • BG_HIGH – This is the number that will trigger the Urgent High Alarm. This is typically higher than the BG_Target_Top.
      • BG_LOW – This is the number that will trigger the Urgent Low Alarm. This is typically lower than the BG_Target_Bottom.
      • BG_TARGET_TOP – This is the number that triggers the High Alarm, as it approaches Urgent High/ BG_High. It is typically lower than the BG_High.
      • BG_TARGET_BOTTOM – This is the number that triggers the Low Alarm, as it approaches Urgent Low/ BG_Low. It is typically higher than the BG_Low.
    • Make it so that rawbg is “always visible” by setting the SHOW_RAWBG variable to “always.”
      amyguid-showrawbg

    • Make it so that other features that you want “always visible” are always visible by setting the SHOW_PLUGINS variable. List the features you want to be “on” by default in a space-delimited list. For example: iob cob basal bwp cage sage careportal iage
      amyguide_showplugins

    • If you use MMOL, set the DISPLAY_UNITS variable to mmol.
    • If you want your site to use color by default, set the THEME variable to “color.”
    • If you want your site to have a specific “title” or “name” in the top bar, set the CUSTOM_TITLE variable with your desired title/name.

    Note: Many of the above settings can be turned on/off in the browser settings panel. Making changes in Azure sets your defaults, which can make using your site more efficient.

  10. Consider using Pushover for notifications. (These may come through on your phone and your watch.) If you decide to use Pushover, make sure it appears in the ENABLE string (see above) and set the appropriate combination of Pushover keys. If you don’t know what you want, set the minimum: PUSHOVER_USER_KEY (and enter your key) and PUSHOVER_API_TOKEN (and enter the API TOKEN from the Pushover application). Reading the directions is required. [Directions]
  11. Configure your profile in Nightscout. (This is necessary for IOB tracking and basal display to work properly.) [Directions]
  12. If you are using an iOS uploader and configuring the bridge, set up an Uptime Robot account. [Directions]
  13. Set up your uploader application. If you are using an Android uploader app, you will need to take appropriate steps to pair your uploader phone and device (following appropriate/specific directions for your setup) and configure the uploader to “upload” data. If you are uploading to Nightscout, you will either be setting up REST API or mongodb upload. Follow the directions specific to your uploader and the version of the uploader app you are using.
  14. If you will be using a smart watch, choose one of the available watchfaces that works with your watch and with your setup (e.g., not every watchface can be configured to work with G5 or G4 Share and iOS).
  15. Basic Pebble setup:
    1. Install the Pebble Time app on the phone that will be carried by the person who will wear the Pebble.
    2. Follow the Pebble app prompts to pair the Pebble and phone.
    3. Install your choice of CGM watchface by using the + to add a watchface from within the Pebble app (or follow a link from the CGM Watchfaces page and click the “Add” button).
    4. Configure the watchface. Open the settings for the watchface (on the phone within the Pebble app) and enter your settings.
      • Nightscout users: Enter the Nightscout endpoint. It uses this syntax: https://YOURSITEURL.azurewebsites.net/pebble.
      • If you are a MMOL user, some watchfaces require that you add ?units=mmol to the end of the endpoint: https://yoursite.azurewebsites.net/pebble?units=mmol
      • Other watchfaces require that you update your DISPLAY_UNITS in your Azure or Heroku site settings to enable mmol.
      • G4 Share or G5 users (uploading to Dexcom servers): Enter the Dexcom Share or G5 account information. [Your watchface will not show data unless this information is correctly entered.]
  16. Install the CarePortal Pebble app. If you use a Pebble and plan to use CarePortal, this app is essential. After installing the app, you must configure it by filling in the settings (including the endpoint, as shown, and the API SECRET). The endpoint takes this syntax: https://yoursite.azurewebsites.net/api/v1/treatments
  17. If you need assistance with your uploader setup, post in the CGM in the Cloud group at Facebook. Be sure to note what uploader app you are using, what uploader phone type, and the version of the OS if it is Android.
  18. Explore the full range of features available to see what “else” you can do with a Nightscout site that you might be missing.