Skip to content
oamyoamy edited this page Aug 7, 2015 · 27 revisions

Setting up the Share to Nightscout bridge on Heroku is very easy whether you have an existing Nightscout website or not. You can setup the bridge to work with a Nightscout website hosted by Azure, Heroku, or anywhere else. Heroku is a web hosting service like Windows Azure, however they structure usage and billing differently.

Note: Heroku pricing has changed. Dynos costs $7 a month for 24/7 usage. Dynos are free if they sleep 6 hours a day.

Deployment Overview

You will perform the following steps to deploy the Share to Nightscout bridge on Heroku.

  • Setup a Heroku account (if necessary)
  • Deploy a Nightscout website (if necessary)
  • Deploy a Nightscout bridge
  • Verify operation

Setup a Heroku account (if necessary)

Skip this step if you already have a Heroku account.

  1. Browse to Heroku and sign up for an account.
  2. Once logged into Heroku, click on your username in the top left of the Heroku Dashboard, then click "Manage Account."
  3. Click "Billing" Add a credit card for payment information. You should not be charged for running a Nightscout website or bridge, but you need payment information on file before you deploy any apps.

Deploy a Nightscout website (if necessary)

Skip this step if you already have a Nightscout website setup on Heroku or Azure that you wish to use for the bridge.

If you need a Nightscout website for the bridge, follow the general steps below. For detailed instructions, you can look at the Nightscout Heroku lab.

  1. Login to your GitHub account. If you don't have a GitHub account, create one.

  2. Fork a copy of cgm-remote-monitor to your GitHub account.

    • If you are doing this for the first time, you may find the Github Step section helpful from the Nightscout setup guide.
    • If you already have a copy of cgm-remote-monitor, you do not need to fork a copy. Use the Update My Fork tool to verify you have the most recent sources for the Master branch and update as necessary.)
  3. From your copy of cgm-remote-monitor on GitHub, click the purple Deploy to Heroku button in the README. Deploy to Heroku

  4. On the Heroku deploy screen, enter an app name for your website. App Name

  5. Enter a 12 character password for the API_SECRET variable. Note: Your API_SECRET value must be at least 12 characters. (You do not need to fill in any of the other variables.) API_SECRET

  6. Scroll down and click the purple Deploy for Free button. Deploy for Free

  7. After your website has deployed, click the View It link at the bottom of the page to verify that you see a Nightscout website with no data (e.g., a site with a black screen that shows the time on the left and dashes on the right).

Deploy a Share to Nightscout bridge

  1. Login to your GitHub account. If you don't have a GitHub account, create one.

  2. Fork a copy of share2nightscout-bridge to your GitHub account.

  3. From your copy of share2nightscout-bridge on GitHub, click on the purple Deploy to Heroku button. Deploy to Heroku

  4. On the Heroku deploy screen, enter an app name for your bridge. Name Bridge App

  5. Enter the API_SECRET used for your Nightscout website. API_SECRET

  6. Enter your Dexcom Sharer username as the DEXCOM_ACCOUNT_NAME variable. Dex Share User

  7. Enter your Dexcom Sharer password as the DEXCOM_PASSWORD variable. Dex Password

  8. Enter your Nightscout website hostname as the WEBSITE_HOSTNAME variable. Do not include http:// or https://. Do not include / at the end. Web Hostname

  9. Scroll down and click the purple Deploy for Free button. Deploy for Free

  10. After your bridge has deployed, click the Make your first edit link at the bottom of the page. (Note: If you do not see a Make your first edit link, but instead see a link to Manage App, click that.)

  11. Click on the Resources tab, then press the Edit button to the right of where it says "Dynos". Dynos Edit

  12. Slide the slider from 0 to 1 dyno, then press Save. Dynos Save

Verify Operation

Nightscout requires at least three value BG readings to display data. If you are deploying a brand new website with your bridge, expect to wait 15 minutes before you see data. If you're re-using an existing website that has recent BG data, you may only need to wait a few minutes. Once you verify that your website is showing current data, you are done.

More information

See the README for details about additional variables you can set to control how your bridge operates.