Pushover in Funnel Cake (or newer)

18 Sep
Guides > Labs > Pushover in Funnel Cake (or newer)

With the 0.8.1 release of Funnel Cake, Nightscout users have new options for controlling Pushover notifications.

These notes assume you already:

  1. Have set up a Pushover account.
  2. Know your Pushover user key (generated after you create your Pushover account).
  3. Have created a Pushover application for Nightscout. (You only need to set the Application name; You can ignore all the other settings. If you want a custom Nightscout icon associated with your Pushover notifications, you can use the one located here.)
  4. Have updated your site to Funnel Cake 0.8.1.

Setting Up and Installing Pushover

You will need to register for a Pushover account on the Pushover website and also install the app on your device. The Pushover app comes with a 7-day free trial. Using it after the free trial requires a nominal one-time licensing fee, per user. The Pushover free service includes up to 7,500 notifications per application.

Enabling Pushover

Like other site features, if you wish to use Pushover, you must enter “pushover” in the box next to ENABLE.

fc-enable-pushover

(Reminder: Only one ENABLE variable can be set. If you already have ENABLE, just add “pushover” to the value box, with a space between it and any other values that are already configured. ENABLE should be set in the App Settings area for Azure.)

Configuring Pushover Notifications from Nightscout

It is often recommended to put variables that contain private or password information in the Connection Strings area of Azure with the type set to “Custom.” Other variables described in this document should go in the App Settings area. Note: These variables will all work in App Settings.

The following variables are used to configure Nightscout to use Pushover and allow you to specify the type(s) of information you want to receive from Pushover.

  • PUSHOVER_API_TOKEN: (required) Enter the API_TOKEN for the application you created. (After creating your application, you can find your key by clicking the name of your application on the Pushover site. Your API_TOKEN will be shown on the screen that loads.)

    pushover-api

    pushover-sample-apikey

    (The API_TOKEN shown above is a sample only. Your key will be unique.)

  • PUSHOVER_USER_KEY: (optional) Enter your Pushover user key, found in the top left of the Pushover site when you are logged in. This variable can hold a space-delimited list of keys (for multiple Pushover account holders or Pushover “groups”). Configuring this Pushover variable sends “info”-level notifications, including treatment notifications. To disable info-level notifications, enter “off” as the value (instead of a user key).
  • PUSHOVER_ALARM_KEY: (optional) Enter your Pushover user key (or space-delimited list of keys) to receive system-wide alarms (e.g., warning- or urgent-level alerts). If you do not set a user key for this variable or disable it (by setting it to “off”), alarm-level notifications will be sent to the same user keys specified in the general PUSHOVER_USER_KEY setting (described above).
  • PUSHOVER_ANNOUNCEMENT_KEY (optional) Enter your Pushover user key (or space-delimited list of keys) to receive notifications of user-generated announcements (created using Care Portal). If you do not set a user key for this variable or disable it (by setting it to “off”), announcements will default to the PUSHOVER_USER_KEY or PUSHOVER_ALARM_KEY recipients.
  • BASE_URL: (recommended) The BASE_URL is used to enable Pushover callbacks. Setting the BASE_URL allows you to “acknowledge” an alarm from Pushover and, by doing so, snooze it. The BASE_URL is typically your site url: https://YOURSITE.azurewebsites.net.
  • API_SECRET: (required) An API_SECRET must be set for the site to sign the Pushover callback request for acknowledgments. (If you use Care Portal, you already have an API_SECRET set. It can only be specified one time.)

Usage Examples

The following examples show possible configurations of Pushover notifications from Nightscout:

  • If you want to receive everything, set:

    PUSHOVER_USER_KEY = youRuSerKeygoesHere

  • If you want to only receive treatment notifications (and info-level information), set:

    PUSHOVER_USER_KEY = youRuSerKeygoesHere
    PUSHOVER_ALARM_KEY = off
    PUSHOVER_ANNOUNCEMENT_KEY = off

  • If you don’t want to receive treatment notifications, but you want alarm notifications, set:

    PUSHOVER_USER_KEY = off
    PUSHOVER_ALARM_KEY = youRuSerKeygoesHere
    PUSHOVER_ANNOUNCEMENT_KEY = off

  • If you want to receive treatment notifications (yourself) but want a different user or user group to also receive announcements and alarms, set:

    PUSHOVER_USER_KEY = youRuSerKeygoesHere
    PUSHOVER_ALARM_KEY = youRuSerKeygoesHere SeconduSerKeygoesHere
    PUSHOVER_ANNOUNCEMENT_KEY = youRuSerKeygoesHere SeconduSerKeygoesHere

  • If you want to receive treatment notifications (yourself) but want a specific user (e.g., the T1D) or group to receive announcements but not alarms, set:

    PUSHOVER_USER_KEY = youRuSerKeygoesHere
    PUSHOVER_ALARM_KEY = youRuSerKeygoesHere
    PUSHOVER_ANNOUNCEMENT_KEY = youRuSerKeygoesHere SeconduSerKeygoesHere

Using the above examples as a guide, you can configure Pushover notification settings to match your own needs. Keep in mind that to get an individual USER_KEY, each user needs to have a Pushover account and the Pushover app on his/her phone.

Be Careful Acknowledging from Pushover

If you don’t acknowledge an alarm from Pushover, it will continue to alarm in Pushover as well as on other devices (and in open browsers). The way Pushover integration with Nightscout has been designed, any user receiving a Pushover alarm can acknowledge it and thus snooze the alarm for all other devices. Be very careful. If you need, for example, a caregiver to notice and acknowledge an alarm, you may not want to snooze it yourself.

Customizing Snooze Levels

The following variables can be used to change the available snooze options. These are related to Pushover notifications because the first value entered for each of these variables is the duration that Pushover will use if you snooze an alarm by “acknowledging” it from Pushover. To configure these variables, enter each variable name (shown in bold) as a separate variable with your chosen setting(s) as the value(s) for the variable. These should be configured in App Settings in Azure. The default settings for each alarm are shown in () marks:

  • ALARM_URGENT_HIGH_MINS (30 60 90 120) This variable specifies the number of minutes to snooze urgent high alarms. All values in the space-separated list are shown as options in a browser. The first value is used for a Pushover-generated snooze.
  • ALARM_HIGH_MINS (30 60 90 120) This variable specifies the number of minutes to snooze high alarms. All values in the space-separated list are shown as options in a browser. The first value is used for a Pushover-generated snooze.
  • ALARM_LOW_MINS (15 30 45 60) This variable specifies the number of minutes to snooze low alarms. All values in the space-separated list are shown as options in a browser. The first value is used for a Pushover-generated snooze.
  • ALARM_URGENT_LOW_MINS (15 30 45) This variable specifies the number of minutes to snooze urgent low alarms. All values in the space-separated list are shown as options in a browser. The first value is used for a Pushover-generated snooze.
  • ALARM_URGENT_MINS (30 60 90 120)This variable specifies the number of minutes to snooze urgent alarms (that aren’t tagged as high or low). All values in the space-separated list are shown as options in a browser. The first value is used for a Pushover-generated snooze.
  • ALARM_WARN_MINS (30 60 90 120) This variable specifies the number of minutes to snooze warning alarms (that aren’t tagged as high or low). All values in the space-separated list are shown as options in a browser. The first value is used for a Pushover-generated snooze.

Be careful setting snooze duration values and the Pushover snooze duration. It may be tempting to set a very long default snooze duration, but be very careful so that you don’t miss important site information because alarms have been configured to snooze for extended periods of time.

Note that the snooze levels above correspond (by name) to the following alarm types, which you can also configure in your site (Azure or Heroku) settings. All of these alarms are “on” by default and are related to your custom high and low settings and alarm types:

  • ALARM_URGENT_HIGH (on) – possible values on or off
  • ALARM_HIGH (on) – possible values on or off
  • ALARM_LOW (on) – possible values on or off
  • ALARM_URGENT_LOW (on) – possible values on or off

Additional Alarm and Alert Variables

Depending on your configuration, info-, warning-, and urgent-level alarms and alerts may be sent using Pushover. The following alarm and alert variables can also be customized:

  • ERRORCODES_INFO (For Dexcom error codes. By default the “needs calibration” (blood drop) and other codes below 9 generate an info-level notification. Enter a space-separated list of numbers (error codes) to specify the errors for which you want an info-level notification or set the value as “off” to disable.
    The list of Dexcom error codes, by number:

    1: ‘SENSOR_NOT_ACTIVE’,
    2: ‘MINIMAL_DEVIATION’,
    3: ‘NO_ANTENNA’,
    5: ‘SENSOR_NOT_CALIBRATED’,
    6: ‘COUNTS_DEVIATION’,
    9: ‘ABSOLUTE_DEVIATION’,
    10: ‘POWER_DEVIATION’,
    12: ‘BAD_RF’

  • ERRORCODES_WARN (off) By default there are no warnings configured for Dexcom error codes. Enter a space-separated list of numbers (error codes) to specify the errors for which you want a warning-level notification or set the value as “off” to disable.
  • ERRORCODES_URGENT (9 10) By default the hourglass (9) and ??? (10) generate an urgent alarm. Enter a space-separated list of numbers (error codes) to specify the errors for which you want an urgent-level notification or set the value as “off” to disable.
  • CAGE_INFO (See CAGE)
  • CAGE_WARN (See CAGE)
  • CAGE_URGENT (See CAGE)
  • ALARM_TIMEAGO_WARN (on) possible values on or off (may not yet be integrated with Pushover)
  • ALARM_TIMEAGO_WARN_MINS (15) When the number of minutes since the last reading hits this value, a warning is triggered.
  • ALARM_TIMEAGO_URGENT (on) – possible values on or off (may not yet be integrated with Pushover)
  • ALARM_TIMEAGO_URGENT_MINS (30) When the number of minutes since the last reading hits this value, an urgent alarm is triggered.
  • BWP-related alarms and warnings. (See BWP)

Note: There are many layers of alarms and warnings at work on a Funnel Cake site, including BWP-generated alarms. Integration and/or customized control of some alarms with Pushover may still be under development. You may also find that alarms do not always behave as you expect. Alarms and notifications may be very helpful, but you should also be aware of your site data even in the absence of alarms.

If you encounter problems with alarms, please report them.

Older information regarding setting up Pushover can be found here.