NOTE: This is not a Nightscout viewing app for Android — this is a tool for uploading CGM data from a Dexcom G4. For an Android app for viewing a Nightscout site and getting native alerts, you want xDrip+, which you’ll need to “side-load” from here.
In this step, you’re setting up the Android phone to act as an uploader from your Dexcom G4 to Mongolab, the database in the cloud where CGM data will be stored. The basic steps are:
- Installing Nightscout on the uploader phone.
- Configuring the uploader application using the Mongolab connection strings.
As a prerequisite to installing the Nightscout app on your uploader phone(s), we recommend that you install any and all available Android software updates. If you do not, the Nightscout app may stop uploading data when an Android system update notification pops up. To install updates on a Moto G phone, go to System > System Update > Update Motorola Software.
1. Installing Nightscout on Your Phone
On your Android Phone
A cell plan is not required for this step. We recommend you use wifi only during installation.
All of these steps are performed on your uploader phone/device. It will not work to do this from a computer. It must be from the uploader phone.
Please choose the option for downloading the app:
Option 1: Direct installation (click here) (download and install the app and then continue with step 10 below)
Option 1: Install Using Google Play Store App: (follow steps 1-9 below)
- Using the uploader phone, connect to the internet via wifi or cell connection.
- Click on the Google Play Store icon on your uploader phone.
- Input your email address and password in the appropriate boxes.
- Select OK to agree to the terms of service.
- Unselect the boxes to Backup & Restore (This will try to download all the apps and data from a personal android device if you have one. You do not want this to happen) and Communication.
- Search for Nightscout in the search box at the top of the screen.
- Select Nightscout Uploader
- Select INSTALL (or UPDATE).
- Select Accept and the app will download and install.
- Click on Open.
- If it does not open, go to the menu on the home screen and scroll until you see Nightscout.
- Read and respond to the “Donate Data” pop-up screens.
- PLEASE READ and agree to the “I UNDERSTAND” disclosure by selecting YES.
- Once the Nightscout app is open, open the Preferences screen.Your uploader screen may not look the same as this. The Preferences (3 vertical dots) may be in the upper right or in the lower middle of the screen—depending on which Android phone/device you are using. Or you might need to tap the menu button on the phone itself, not on the screen.
- API Upload (REST) is the upload method
(Note: Any reference you see to mongoDB upload is out of date for the Nightscout upload ap as of 10/1/15. If you are using a different uploader that supports mongoDB upload, consult uploader-specific directions for configuration.)To configure API Upload (REST): Ensure that “Enabled” is ON, or the slider switched to the On position In the field that pops up, you will need to enter a string that combines your API_SECRET value (minimum 12 characters) and your website address.You can type these in manually or use the auto configure tool. Select the “REST API” tab:
Configure the BASE URL for REST API as follows:
If using an Azure site: https://YOURAPISECRET@YOURSITENAME.azurewebsites.net/api/v1
If using a Heroku site: https://YOURAPISECRET@YOURSITENAME.herokuapp.com/api/v1
If you have set up your elements out of order, you may need to come back to this step after setting up the Azure or Heroku website. You will need the API_SECRET that is used in Azure or Heroku and you will need your website name to configure the REST API upload.
Earlier Nightscout installations used MongoDB as upload method —this method will no longer work for the Nightscout app.
- If you want your website and/or Pebble to display raw data, enable the Sensor Data and Calibration Data checkboxes.For more information about raw data please see: Interpreting raw Dexcom data
- If you need to change the units from mg/dL to mmol, tap Unit Option and then select your choice in the pop-up menu.
- Touch the Back button to exit the Preference Menu.
- You are now ready to connect your Dexcom.
- When everything is properly connected and input you should see a screen that resembles this (YOURS WILL NOT HAVE NUMBERS OR A GRAPH AT THIS POINT):
With Mongolab now set up, the application should be able to start uploading in the next steps.
Connect the Dexcom Receiver to the Uploader Phone
- On your Dexcom, click into the Utilities/Date & Time and verify that every part of the time hh:mm am/pm and date mm/dd/yyyy are correct.
- Check your uploader time setting. Make sure it is set to the correct timezone and has the correct time and matches the Dexcom.
Do NOT move on until you have checked the time/date setting.
Connect the Dexcom receiver to your Android phone.
IMPORTANT: when connecting the phone to the Dexcom, the OTG cable plugs into the phone.
The regular USB cable plugs into the Dexcom. It will not work the other way.
During the initial connection, there may be a pop-up asking if the app should have permission to run / access services. Tap OK.
The Nightscout app should load. Do you see the Dexcom reading on the screen of the Nightscout app?
It will look like this if the cables are connected correctly:
If Your Nightscout Uploader Is Not Displaying the Same BG Reading As Your Dexcom
- Is the CGM showing a charging symbol on the display when you plug the cables together? Are any of the icons at the bottom of the Nightscout app screen red?
- If Dex is not charging or the uploader has a red icon, make sure the cable connections are secure, and that you have the OTG cable connected to the phone, and the regular MicroUSB cable connecting to the CGM
- If this does not resolve, try disconnecting the cables and reconnecting them (CAUTION: BE EXTRA CAREFUL when connecting to the CGM because of the fragile USB port on the DEX)
- If it doesn’t resolve, try powering down the Dex, and powering back up (DO NOT select Stop Sensor! Just power down and back on)
- If you’re still not getting a connection to the CGM, it could be due to bad cables. THIS IS NOT UNCOMMON! Try swapping out new cables and continue to test.
- You WILL NOT be able to proceed until you achieve a current BG number reading on your Nightscout app.
Verifying That Data is Flowing to Mongolab
If you followed the recommended sequence of steps to set up Nightscout, you have already configured your Azure (or Heroku) website and confirmed that the site was loading with a black page showing time and dashes before installing the uploader app. Now that the app is configured, you need to confirm that the website is receiving data from the uploader.
First, wait 10-15 minutes after setting up the uploader app and then try reloading the page in a browser. If you see current data, your installation is complete.
If you do not see current data, continue to the next troubleshooting steps.
What to Do If Your Site Has No Data
If your new site is not showing current data, look at the bottom of the uploader app screen on the phone. The “upload” icon shows whether or not your phone is actually connecting and uploading documents. If it is red, your phone is not able to upload documents. You need to find why your phone is not successfully uploading data.
Verify that you have a working Internet connection on your phone. If you also have a cellular data plan on your phone, and are currently using WiFi, try turning off WiFi and see if makes any difference running off of cellular. If you don’t have cellular data, but possibly have another WiFi hotspot to connect to (i.e. another smartphone with hotspot feature or tethering), attempt connecting to that as well.
If you are sure your phone is connected to the Internet and you still do not see current data, you will need to carefully doublecheck your base url for the REST API upload. Does the API SECRET match what you used in Azure? Is the API SECRET at least 12 characters? Is your base url using the correct syntax for your uploader app (e.g., https://YOURSECRET01@YOURSITE.azurewebsites.net/api/v1).
After checking the API SECRET and base url, restart the site in Azure. (It may take as much as 10 minutes for the site to fully restart and data to flow from the uploader, to the Azure site, and through to the Mongo database. If you still do not have data, go to the CGM in the Cloud group at Facebook where a member of the support team can help.)
(Note: Even if you had everything configured properly, if you created the website on a different day, you may need to “restart” the website in Azure (or Heroku) to get the flow of data started.)