* Change incompatible module and fix a memory leak in the process * Fix fonts, allow websocket * Oops fix a brainfart with using the hostname * Don't inlude null hostname * Update the shrinkwrap * Instantiate new cache if new instance of profile code is created. Calculate IOB with three digit precision to keep tests happy (and this is roughly the precision we're operating at anyway). * - implement @jweismann suggestions https://github.com/nightscout/cgm-remote-monitor/pull/4449#issuecomment-469868508 - add frameAncestors, baseUri and formAction protection * update README and run doctoc * fix reportOnly * add objectSrc * Use modern CSS loading * Change CSS to use the "official" async loading across the board (which hopefully plays nicer with CSP) * first release candiate for 0.11.2 with Minimed EU Server and Guardian Connect integration - integrates https://github.com/mddub/minimed-connect-to-nightscout/pull/11 into Nightscout * bump node 10 LTS version * increase logging, fix /swagger.yaml * fix typo * set version to rc2, update mongodb to 3.2.2 * add SECURE_CSP_REPORT_ONLY (default false). * npm update and revert to requiring Node versions without security issues.
7.2 KiB
Table of Contents generated with DocToc
Table of Contents
Nightscout/IFTTT Maker
Overview
In addition to Nightscout's web-based alarms, your site can also trigger push notifications (or other actions) through the IFTTT Maker service. With Maker you are able to integrate with all the other IFTTT Services. For example, you can send a tweet when there is an alarm, change the color of a smart light, send an email, send a text, and much more.
Note: There have been some recent reports of the IFTTT service delaying Nightscout alarms. Be sure to test your implementation before relying solely on its alerts. Pushover is an alternate push notification service that might be worth considering as well.
Events
Plugins can create custom events, but all events sent to Maker will be prefixed with ns-. The core events are:
ns-event- This event is sent on all alarms and notifications. This is good catch-all event for general logging.ns-allclear- This event is sent when an alarm has been acknowledged or when the server starts up without triggering any alarms. (For example, you could use this event to turn a light to green.)ns-info- All notifications at theinfolevel will cause this event to be triggered.ns-warning- All notifications at thewarninglevel will cause this event to be triggered.ns-urgent- All notifications at theurgentlevel will cause this event to be triggered.ns-warning-high- This event is triggered when crossing theBG_TARGET_TOPthreshold.ns-urgent-high- This event is triggered when crossing theBG_HIGHthreshold.ns-warning-low- This event is triggered when crossing theBG_TARGET_BOTTOMthreshold.ns-urgent-low- This event is triggered when crossing theBG_LOWthreshold.ns-info-treatmentnotify- This event is triggered when a treatment is entered into thecareportal.ns-warning-bwp- This event is triggered when thebwpplugin generates a warning alarm.ns-urgent-bwp- This event is triggered when thebwpplugin generates an urgent alarm.
Creating an Applet
Set up an IFTTT account, and log into it.
1. Choose a Service
On the "My Applets" page, click "New Applet", then click the blue +this. Search for "webhooks" among the services, and click it.
2. Choose a Trigger
Click on the "Receive a web request" box.
3. Complete the Trigger field
Enter one of the Nightscout events listed above (like ns-urgent-low), and click "Create Trigger".
4. Create an Action
Click on the blue +that.
Search for the action you'd like this event to trigger. In this example, we'll choose the Notifications action to send a push notification.
Choose the "Send a notification from the IFTTT app" action type for a basic push alert. You can experiment with the "rich" notifications later.
5. Complete Action Fields
Enter the message that will display in this push notification. In this example, it was triggered on an ns-urgent-low, so we'll write something like "Urgent Low!". We can also display the current BG by including the Value2 ingredient (via the "Add ingredient" button).
Click the "Create action" button when you're done.
6. Review and Finish
Click the "Finish" button if your applet looks good.
7. Get your Maker Key
Click on "My Applets" in the main menu, then click the "Services" tab, then search for "Webhooks" and select it.
Go to the Settings for this service, in the upper right.
The string of characters at the end of the URL here is your MAKER_KEY. Copy it from there, so we can paste it into your Config Vars.
8. Configure your Nightscout site
From your Heroku dashboard, go to your app's Settings page, then click the "Reveal Config Vars" button. Find the MAKER_KEY entry, and edit its value, pasting in your Maker Key. If you don't already have a MAKER_KEY line, add it to the bottom of the list.
Find your ENABLE line, and add maker to the list of enabled plugins.
9. Configure the IFTTT mobile app
That's all of the services complete. In order to receive push notifications on a mobile device, you'll need to have the IFTTT app installed and logged into the same account you set up the actions in.
To add more alerts for different events, just create a new applet for each trigger.









