Setting up Nightscout — A comprehensive guide

Diabits Developer
10 min readMay 6, 2020

--

Nightscout — a great option for remote diabetes monitoring.

Setting up your Nightscout can be a little tricky. This tutorial walks you through setting up your account with Dexcom, Abbott, and Medtronic devices for both Android and iOS. These include the Dexcom G4, G5, and G6, Abbott Freestyle Libre, and Medtronic 530g, Minimed Veo, Minimed Connect, and 640g.

What is Nightscout?

Nightscout is a open source DIY project that allows you to view your Medtronic, Dexcom, or Freestyle Libre data from any web browser for free. Nightscout sends your blood sugar data into the cloud, so you can view it remotely and use it in many interesting ways.

Nightscout was developed by a tech-savvy group of parents of children with type 1 diabetes as a solution for remote monitoring. Parents can use Nightscout to monitor their child’s blood sugars in real-time, reducing stress throughout the day.

What do you need?

What you need depends on which device you are using to connect to Nightscout. This graphic, courtesy of Nightscout, shows a high-level overview of how to get your CGM data into the cloud depending on which device you use. In this article we will cover how to set up your Medtronic, Dexcom, or Abbott device with Nightscout.

We’ll first walk you through the general setup requirements, and then go into detail about specific devices. It’s best to go through this process on a desktop rather than mobile device.

Set Up

Create a GitHub account

First thing you’ll want to do is create a GitHub account. Select the free individual plan, and verify your email.

Next, you’ll want to navigate to this Nightscout GitHub repository. Click on the “Fork” button to make a copy of the repository so you can use it for yourself.

Once you have your own forked copy of the repository, you should notice that the page URL is now github.com/your_github_name/cgm-remote-monitor. Bookmark this page so you can easily go back to it.

Create a Heroku account

Heroku is the easiest way to host your Nightscout website for free. Using this platform means you will be able to see your real time CGM data in the cloud.

Sign up for Heroku. Make sure to select Hobbyist in the role field and Node.js as the development language. Verify your account by clicking on the link they sent to your email address.

Connect your GitHub and Heroku accounts

Go back to your forked version of the Nightscout repository that you bookmarked. If you didn’t bookmark the page (tsk tsk!), you can also access your forked version of the repository by clicking on your profile and then navigating to “Your Repositories”.

Scroll down to README.md and click on the purple button “Deploy to Heroku”.

This will take you to Heroku, where you should be already signed in. Fill in the following required information:

  • App-name: Choose your app name! This will appear on your Heroku URL as your-app-name.herokuapp.com.
  • Region: Leave this as United States, even if you’re in a different country. Don’t worry, this setting won’t effect your Nightscout.

Config_vars are the configuration settings to your Nightscout and we’ll be changing and filling out some of them. Each setting has a description underneath it. You can always change these at a later time if need be.

  • API_SECRET: This is your password. It must be at least 12 characters long. Record this somewhere as you’ll need it later!
  • BG_HIGH & BG_LOW: These are your high and low thresholds. When your blood glucose is outside of this range, you’ll get an alert (if ALARM_URGENT_HIGH and ALARM_URGENT_LOW are turned on).
  • DISPLAY_UNITS: Choose if you want blood glucose units in mmol/L or mg/dL.
  • BRIDGE_SERVER: If you’re anywhere outside of the US, set this to “EU”. Otherwise, leave it as “US”.

The following configuration settings are a little different depending on your device manufacturer.

Dexcom

If you’re using Dexcom, set:

  • BRIDGE_PASSWORD: Enter your Dexcom password. This will be the same as you use to log in to the Dexcom app.
  • BRIDGE_USER_NAME: Enter your Dexcom username. This will be the same as you use to log in to the Dexcom app.
  • ENABLE: Enter “careport basal bridge”.

Medtronic

If you’re using Medtronic, set:

  • ENABLE: Enter “careport basal mmconnect”.
  • MMCONNECT_USER_NAME: Enter your Minimed CareLink account name. This will be the same user name as what you use to log into the MiniMed Connect app on your phone.
  • MMCONNECT_PASSWORD: Enter your Minimed CareLink account password. This will be the same user name as what you use to log into the MiniMed Connect app on your phone.

Abbott

If you’re using Abbott, simply set:

  • ENABLE: Enter “careport basal”.

Once you’re done with the above device-specific configurations, click “Deploy App” at the bottom and enter your credit card information on the next screen. Don’t worry! This is a free service and you won’t be charged. This is just for account verification purposes. This can take up to 10 minutes.

If you get an error message after saving your billing information, click on “Deploy App” again and it should work.

Setting up your Nightscout Account

At this stage, you should see a notice that your app was successfully deployed. Click on “View” at the bottom of your Heroku page. This will take you to your Nightscout account.

Choose your timezone.

At the bottom of the page, click on “Authenticate”. Enter your API_SECRET (the password you created earlier). Then, click “Save”.

Once saved, remove “/profile” in the URL displayed at the top of your browser and press ‘enter’ on your keyboard.

You’ll be redirected to your Nighscout homepage. It will be empty right now, but don’t worry. We will be connecting your CGM data in the following steps.

This is where set up is very different depending on your device. Scroll to find your devices instructions.

Dexcom

Connecting your Dexcom to Nightscout

Follow the iOS or Android instructions, depending on which you use.

iOS

Enable Dexcom Share in your Dexcom app.

You will need to create a free Uptime Robot account. This makes sure that your Nightscout account stays active 24/7 and will be continuously updated. Once you’re on uptimerobot.com, click sign up and select the Free Plan.

Once you have verified your email, log into Uptime Robot and select “+ Add New Monitor”.

This will take you to a settings menu. Enter as follows:

  • Monitor Type: Select “HTTP(s)” in the drop down menu.
  • Friendly Name: Enter whichever name you choose!
  • URL (or IP): Enter your Nightscout URL
  • Monitoring Interval: Select the frequency your CGM updates. It should be 5 minutes.

Click on “Create Monitor” and you’re done! Scroll down to Additional Resources on this blog for some Nightscout tips, tricks, and other resources!

Android

Newer versions of Android will allow you to connect to Nightscout directly using Dexcom Share, a feature available on your device’s Dexcom app. If you’re running an older version of Android, or are using a Dexcom G4 without Share, you will need to download and install xDrip or xDrip+. These downloads are not from the Google Play store, and so you’ll need to give your phone’s browser permission to install unknown apps when prompted.

The following instructions are taken from here.

Note: Most recent xDrip release was Beta6 v2.0.6_1 at time of this publication. You should download the most recent release.

Note: If your phone is running Marshmallow (Android 6), you must manually enable location permissions in your phone’s system settings (Settings>apps>xdrip>Permissions).

  1. Enable Dexcom Share in your Dexcom app.

2. Open xDrip and tap on the three bars on the top left and tap settings.

3. Then, tap Hardware Data Source and select Dexcom Share. Then, enter your 10-character Dexcom receiver serial number or use the option to scan the Share barcode.

Note: Your serial number is located on the back of your Dexcom receiver and should start with 2 letters.

4. Return to the menu (the 3 bars on the top left corner) and tap Bluetooth Scan.

This will automatically start scanning for Bluetooth devices.

5. Tap on “DEXCOMRX”. If this is your first time connecting with Share, you may be returned to the xDrip app and asked to start your sensor. To do this, enter the menu and tap Start Sensor. Enter the approximate time and date your Dexcom sensor was started.

Only tap Start Sensor if after tapping on DEXCOMRX you are returned to xDrip.

Now that your xDrip is successfully paired with the Dexom receiver, the Dexcom receiver will show a solid, not flashing, Bluetooth icon on the top left corner.

6. In xDrip, go to the menu and tap System Status and check that Connection Status says “Connected”.

7. Return to settings and check “Run Collection Service in foreground”.

Now, all you need to do is connect xDrip to Nightscout.

8. Navigate to Settings and tap Data Sync.

9. Select API Uploader (REST) as the upload method and enter your Nightscout URL. For me, this is https://test-nightscout-rachael.herokuapp.com.

That’s it! Check out Additional Resources at the end of this blog for some Nightscout tips, tricks, and other resources!

Medtronic

Connecting your Medtronic to Nightscout

Below are instructions for Android. For iOS, Nightscout supports the MiniMed Connect. Instructions are available here.

Android

Instructions courtesy of Lennart Goedhart from 600SeriesAndroidUploader.

You will need:

  1. USB OTG cable
  2. Contour Next Link 2.4 BG meter
  3. Medtronic 600 series pump

First, you need to link the pump and meter. To do this, you need to:

  • Make sure the time is correct on your pump and that it is fully charged
  • Place the pump and meter next to each other
  • On the meter, go to Setup > Pump Options > Connect to pump
  • Click “Yes”, then “OK”.
  • Click “Auto Connect” on the meter.

Then, on your Android smartphone, navigate to Security in your settings. Ensure that Unknown Sources is toggled on. Then, download the 600 Series Uploader APK to download the app. As this app isn’t available on Google Play, you may be asked to change your permissions to allow installs from unknown sources.

When you first open the app, accept the permission request to run in the background.

Then, click on the three bars on the top left to enter the menu.

Tap on Settings, and under Sharing, tap on “Send to Nightscout”. Then, add your Nightscout URL and API_SECRET from earlier. Your Nightscout URL should look similar to https://test-nightscout-rachael.herokuapp.com.

Return to the homepage and plug in your meter to your pump using your USB OTC cord. Next, click on “Register USB stick” and follow the instructions.

Return the the app homepage and tap “Get Now”. Your Medtronic device should now be connected to Nightscout. If you need any additional support, you can join the Nightscout for Medtronic Facebook page.

That’s it! Check out Additional Resources at the end of this blog for some Nightscout tips, tricks, and other resources!

Abbott Freestyle Libre

MiaoMiao

MiaoMiao turns your flash glucose monitor into a continuous glucose monitor. Setting up your Nightscout with MiaoMiao is easy. MiaoMiao has a great tutorial you can follow.

iOS

Download Spike from the App Store. Go to Settings > Share, and scroll down to Nightscout. Toggle “Enabled” to “On”. Enter your Nightscout URL and API_SECRET from earlier. As an example, my Nightscout URL is https://test-nightscout-rachael.herokuapp.com.

Congrats! Your Freestyle Libre data is now accessible in Nightscout. Check out Additional Resources at the end of this blog for some Nightscout tips, tricks, and other resources!

Android

First, you must download the Glimp app from Google Play. Open the app and accept the permission requests.

In Glimp, tap on the three dots in the top right corner to open the menu. Tap Options.

Tap on Settings
Select Options

Then, tap Remote Glucose Monitoring.

Enter your Nightscout URL and API_SECRET from earlier. As an example, my Nightscout URL is https://test-nightscout-rachael.herokuapp.com.

Congrats! Your Freestyle Libre data is now accessible in Nightscout.

Additional Resources

Congratulations, you made it!

Now that you have Nightscout, your data lives in the cloud and you can view it live. Nightscout also allows you to do some pretty cool things, like access your data from your smartwatch or connect with Amazon Alexa.

Nightscout is also compatible with Diabits, a free diabetes management app available on for iOS and Android. Using personalized machine learning algorithms, Diabits predicts where your blood sugar is headed 60 minutes ahead of time, so that you can take proactive steps to avoid highs and lows.

Diabits predicts your blood sugar, insulin, and carbs on board in real time.
Diabits provides you with various insights on your health.

Thanks for reading and we hope you found this tutorial useful!

--

--

Diabits Developer

We’re the developers behind Diabits, a free smartphone app that employs machine learning to predict blood glucose levels in people with diabetes.