Nightscout with iOS and Dexcom Share (Bridge)

26 Sep
Guides > Setup Guides > Nightscout with iOS and Dexcom Share (Bridge)

Nightscout Bridge (for Dexcom G4 with Share or Dexcom G5)

Users with a Dexcom G4 Share who are using iOS and the Dexcom Share 2 app and users with the Dexcom G5 can still set up a Nightscout site. This is referred to as a Nightscout Bridge.

Limitations of a Nightscout Bridge

Setting up a Nightscout site offers an iOS/Share user almost all features available with Nightscout, except for “raw data” and “noise”.

Setting Up a Nightscout site with a Nightscout Bridge

Prior to the Funnel Cake (0.8+) release of the Nightscout CGM Remote Monitor code, setting up a Nightscout Bridge required setting up a Nightscout site and a separate bridge application. With Funnel Cake, the bridge can be configured as part of a Nightscout site.

To set up a Nightscout site and bridge, you will need to do the following parts of a traditional Nightscout setup. Please refer to the setup directions for each stage of setup linked below, ignoring references to the “uploader.” iOS Share users do not have a Nightscout (or xdrip) uploader. References to the uploader are not related to this setup.

The following steps link into the relevant sections of setup directions that were not written for Share or G5 users. Set up the parts listed below, and return here for the next steps.

You will be doing the following steps:

  • Create a Mongolab account and database.
  • Create a Github account and a copy of the CGM-Remote-Monitor
  • Create an Azure or Heroku site.
  • Configure your site’s connection strings (mongo information).
  • Set the bridge variables (BRIDGE_USER_NAME and BRIDGE_PASSWORD).
  • If you are outside of the U.S., set the BRIDGE_SERVER variable.
  • Configure the ENABLE variable with the value bridge.
  • Deploy your site using the Github repository.
  • Create an Uptime Robot account.

Note: Your G4 with Share or G5 must be configured to “share” in order for a Nightscout bridge site to get data. If you need help setting up the G5 share feature, see this document.

  1. Mongolab
    You need to set up a free sandbox account at www.mongolab.com, and create a user and database specified here. Be sure to write down all the names and passwords as this information is required in the next steps.

  2. Github
    Your Github account allows you to create a personal copy of the Nightscout code. You will use this copy in the creation of your website. When updates are released for the code, you will return to Github to update your copy.

    To begin, set up a free account at www.github.com and then create a copy of the CGM-remote-monitor repository, as follows:

    • Sign up for a free account at github.com. You will see the following screen that confirms you have a free account:
      github setup
    • WRITE DOWN YOUR USERNAME & PASSWORD.
    • After creating your account and are logged in, open the master repository by clicking here -> cgm-remote-monitor
    • Make a copy (“Fork”) of the nightscout/cgm-remote-monitor to your own repository by clicking on the ‘Fork‘ button on top right
      OR – just click here -> fork the cgm-remote-monitor
    • When prompted with ‘Where should we fork this repository?‘, select your @<gitaccountname>, and it will Fork to your repository.
      At the top of the page, you will now see <gitaccountname>/cgm-remote-monitor indicating you have your own copy forked from Nightscout.
  3. Create an Azure Website

    Your Azure website will be the website you use to view your Nightscout data. The url for this website will also be used if you use a Pebble watch to access your Nightscout data.

    To set up your Nightscout website, follow the Step 2 on this page: Create an Azure Website.

  4. Deploy the GitHub Code to Your Azure Website

    Follow Step 3 on this page: Deploy GitHub Code to Azure.

  5. Configure the Mongo (Mlab) Portion of the Azure Site

    Follow Step 4 on this page: Configure Your Website to Use Mongo (Mlab).

    After completely setting up your website and verifying that you see a black Nightscout website with time and dashes, return to this page to configure the bridge portion of your site.

    Note: make sure you carefully follow the directions to create the site, deploy the Github repository, and enter the necessary mongo strings.

  6. Configure the Bridge

    To set up the integrated bridge variables, take the following steps in Azure:

    Note: The directions below have been updated to reflect the user interface in the new Azure portal.

    • From within your Azure dashboard, click All settings to open the Settings panel.
    • From the Settings menu, click Application Settings.
      azure-new-appsettings2
    • Scroll down to App Settings. If you do not already have the ENABLE variable from a pre-existing site, in the first blank box, type ENABLE. In the box next to it, enter bridge.
      newazure-bridge-enable

      Note: If you already had a Nightscout website, you may already have an ENABLE variable in your settings. You can only have one instance of the ENABLE variable. You can add bridge to your existing value. For example: careportal bridge.

    • If you are outside of the U.S.: On the next blank line, type BRIDGE_SERVER. In the box next to it, enter EU.
      newazure-bridge-EU
    • Scroll down to Connection Strings.
    • Your mongo strings should already be in place. On the next blank row, type BRIDGE_USER_NAME in the first box. In the box next to it, enter the username for your Dexcom Share (or G5) account. Select “custom” as the type from the dropdown menu.
      newazure-bridge-user
    • On the next blank line, type BRIDGE_PASSWORD. In the box next to it, enter the password for your Dexcom Share account. Select “custom” as the type from the dropdown menu.
      newazure-bridge-password
    • At the top of the panel, click the icon to save your changes.
      newazure-save

  7. Verify that the Account Works

    In a browser, go to your site: http://YOURSITE.azurewebsites.net. If your deployment and configuration of your bridge was successful, you will see a black screen with the time and your current CGM data.

    If you do not see a black screen, your deployment may have failed. You may also have an error in the entry of the mongo connection strings.

    If you do not see data but see a black screen with the time and date, wait five minutes and reload the page. If you still do not have data, there may be a problem with your Dexcom user variables or you may have an error in the entry of your mongo connection strings.

  8. Set Up Uptime Robot
    It may be necessary to set up a free account with Uptime Robot in order to keep the Nightscout Bridge site working properly. (Users of the bridge in Funnel Cake reported gaps when the site was not continuously being accessed. Uptime Robot solves this problem.)

    Create a free account at Uptime Robot and set up a “monitor” for your website. It will look similar to this:

    uptimerobot2

    (Note: You can name it anything you want in the “Friendly Name” box. This just helps you identify it in your own account. Your site URL goes in the URL box.)

  9. Switch to Pay-as-You-Go
  10. See this document for important information about changing your Azure account to Pay-as-You-Go.

Once your site is working, learn more about other features you can customize and get a better understanding of your site in these resources: