Migrating from Azure to Heroku

If you are a current Azure user who wants to move to Heroku, but not lose all your old NS data, you will need do the following steps:

Updating your repository in GitHub

for master branch deployments:

https://github.com/yourgithubname/cgm-remote-monitor/compare/master...nightscout:master

For dev branch deployments:

https://github.com/yourgithubname/cgm-remote-monitor/compare/dev...nightscout:dev





Heroku Nightscout Site Setup

KEY VALUE
API_SECRET Create your own API_SECRET…this is like the password to your NS site. Please write it down somewhere safe or commit it to memory, you will be using it in the future. It needs to be at least 12 characters long and should NOT use the `@` symbol.
DISPLAY_UNITS enter either mg/dl or mmol
ENABLE bridge loop pump iob cob basal careportal sage cage

(Enter all of the words without commas. Just a single space between each word. Make sure autocorrect does not add space between careportal)
DISABLE Leave blank
ALARM_TYPES simple
BG_HIGH Enter the numeric value of BG you’d like as an urgent high alarm.
BG_TARGET_TOP Enter the numeric value of the top of your target BG.
BG_TARGET_BOTTOM Enter the numeric value of the bottom of your target BG.
BG_LOW Enter the numeric value of the BG you’d like as an urgent low alarm.
PUSHOVER lines Can be left blank for now. See PUSHOVER section if you want to integrate PUSHOVER notifications with NS later.
CUSTOM_TITLE This will be the text displayed in the upper left part of the NS website.
THEME change from default to colors
BRIDGE_USER_NAME Enter your Dexcom Share Account login name. This should be the same account name used in the Share2 or G5 Mobile app.
BRIDGE_PASSWORD Enter your Dexcom Share Account password.
BG_TARGET TOP Enter the numeric value of the top of your target BG.
BG_TARGET_BOTTOM Enter the numeric value of the bottom of your target BG.

The remaining variables can be left at their default values.

You do not have to enter all the information in the profile if you are using Loop (since Loop will be providing the information for IOB and COB rather than letting NS calculate them), but you do have to fill out the Basal Profile and TimeZone at a minimum in order to have your temp basals properly display. Click Save when you have entered the information. You will be prompted to authenticate, if it is the first time you’ve used the device to make changes in your profile. Click on the Authenticate link at the bottom of the site, and enter your API_SECRET to complete the authentication.

KEY VALUE
DEVICESTATUS_ADVANCED true
PUMP_FIELDS battery reservoir clock status
PUMP_RETRO_FIELDS battery reservoir clock status
SHOW_FORECAST loop
SHOW_PLUGINS loop pump cob iob sage cage careportal
PUMP_ENABLE_ALERTS true
PUMP_URGENT_BATT_U 30

(This is the pump battery percentage that will trigger a red, urgent alert in NS.)
PUMP_URGENT_BATT_V 1.25

(This is the pump battery voltage that will trigger a red, urgent alert in NS.)
PUMP_URGENT_RES 10

(This is the reservoir volume that will trigger a red, urgent alert in NS.)
PUMP_URGENT_CLOCK 30
LOOP_ENABLE_ALERTS true
LOOP_WARN 20

(This is the minutes since Loop last successfully looped, the t1d will have a similar notification at this time through the Loop app. This will be a yellow alert in NS.)
LOOP_URGENT 60

(Same as the alert above, but will be red in color and have a shorter snooze option.)

The remaining variables can be left at their default values.

Migrate mLab database

If you’d like to seamlessly keep all your old Azure NS data showing in your new Heroku NS site, you’ll need to copy and paste your old MONGODB string from your Azure site. Find it in either Application Settings or Connection strings in your Azure control panel and then go to Heroku’s MONGODB_URI line. Replace the content with your copied string from Azure. Double check that your Azure collection used the “entries” name…if it doesn’t, then you will need to update that variable in Heroku to match as well.

EVENT HISTORY

Don't forget to keep you Loop App's Preferred Source set to Event History if you want your NS site to smoothly integrate. Preferred Source set to Reservoir will result in carbs not being uploaded and temp basals not being displayed.