Skip to content
oamyoamy edited this page Apr 2, 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. You should be able to run a Nightscout website and bridge app for free on Heroku.

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.
  4. On the Heroku deploy screen, enter an app name for your website.
  5. Enter a 12 character password for the API_SECRET variable. Note: Your API_SECRET value must be exactly 12 characters. (You do not need to fill in any of the other variables.)
  6. Scroll down and click the purple Deploy for Free button.
  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.

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.
  4. On the Heroku deploy screen, enter an app name for your bridge.
  5. Enter the API_SECRET used for your Nightscout website.
  6. Enter your Dexcom Sharer username as the DEXCOM_ACCOUNT_NAME variable.
  7. Enter your Dexcom Sharer password as the DEXCOM_PASSWORD variable.
  8. Enter your Nightscout website hostname as the WEBSITE_HOSTNAME variable. Do not include http:// or https://. Do not include / at the end.
  9. Scroll down and click the purple Deploy for Free button.
  10. After your bridge has deployed, click the Make your first edit link at the bottom of the page.
  11. Click on the Resources tab, then press the Edit button to the right of where it says "Dynos".
  12. Slide the slider from 0 to 1 dyno, then press 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.

Clone this wiki locally