diff --git a/docs/remote/img/lf-force-ns-profile.svg b/docs/remote/img/lf-force-ns-profile.svg index 377eec9..3741102 100644 --- a/docs/remote/img/lf-force-ns-profile.svg +++ b/docs/remote/img/lf-force-ns-profile.svg @@ -1,8 +1,8 @@ Trio appLoopFollow app + transform="translate(-1697.8127,46.449828)">Trio appLoopFollow app diff --git a/docs/remote/img/lf-lrc-bolus-old.png b/docs/remote/img/lf-lrc-bolus-old.png new file mode 100644 index 0000000..017e9f5 Binary files /dev/null and b/docs/remote/img/lf-lrc-bolus-old.png differ diff --git a/docs/remote/img/lf-lrc-bolus.png b/docs/remote/img/lf-lrc-bolus.png new file mode 100644 index 0000000..a75b992 Binary files /dev/null and b/docs/remote/img/lf-lrc-bolus.png differ diff --git a/docs/remote/img/lf-lrc-credentials.png b/docs/remote/img/lf-lrc-credentials.png new file mode 100644 index 0000000..5756c42 Binary files /dev/null and b/docs/remote/img/lf-lrc-credentials.png differ diff --git a/docs/remote/img/lf-lrc-debug.png b/docs/remote/img/lf-lrc-debug.png new file mode 100644 index 0000000..622b893 Binary files /dev/null and b/docs/remote/img/lf-lrc-debug.png differ diff --git a/docs/remote/img/lf-lrc-error.png b/docs/remote/img/lf-lrc-error.png new file mode 100644 index 0000000..3fcdee1 Binary files /dev/null and b/docs/remote/img/lf-lrc-error.png differ diff --git a/docs/remote/img/lf-lrc-guardrails.png b/docs/remote/img/lf-lrc-guardrails.png new file mode 100644 index 0000000..b4b0fdc Binary files /dev/null and b/docs/remote/img/lf-lrc-guardrails.png differ diff --git a/docs/remote/img/lf-lrc-meal.png b/docs/remote/img/lf-lrc-meal.png new file mode 100644 index 0000000..5845330 Binary files /dev/null and b/docs/remote/img/lf-lrc-meal.png differ diff --git a/docs/remote/img/lf-lrc-override.png b/docs/remote/img/lf-lrc-override.png new file mode 100644 index 0000000..de6daf0 Binary files /dev/null and b/docs/remote/img/lf-lrc-override.png differ diff --git a/docs/remote/img/lf-lrc-selection.png b/docs/remote/img/lf-lrc-selection.png new file mode 100644 index 0000000..e189a0e Binary files /dev/null and b/docs/remote/img/lf-lrc-selection.png differ diff --git a/docs/remote/img/lf-lrc.png b/docs/remote/img/lf-lrc.png new file mode 100644 index 0000000..56a6270 Binary files /dev/null and b/docs/remote/img/lf-lrc.png differ diff --git a/docs/remote/img/lf-remote-options_3.2.svg b/docs/remote/img/lf-remote-options_3.2.svg new file mode 100644 index 0000000..87ec0de --- /dev/null +++ b/docs/remote/img/lf-remote-options_3.2.svg @@ -0,0 +1,2235 @@ + +image/svg+xmlLoop Follow with URL fromLoopTrio diff --git a/docs/remote/img/lf-trc-guardrails.jpg b/docs/remote/img/lf-trc-empty-debug.jpg similarity index 100% rename from docs/remote/img/lf-trc-guardrails.jpg rename to docs/remote/img/lf-trc-empty-debug.jpg diff --git a/docs/remote/img/lf-trc-meal-default.png b/docs/remote/img/lf-trc-meal-default.png new file mode 100644 index 0000000..ce0c5b8 Binary files /dev/null and b/docs/remote/img/lf-trc-meal-default.png differ diff --git a/docs/remote/img/qr-code-example.png b/docs/remote/img/qr-code-example.png new file mode 100644 index 0000000..1f72eb8 Binary files /dev/null and b/docs/remote/img/qr-code-example.png differ diff --git a/docs/remote/remote-control-loop.md b/docs/remote/remote-control-loop.md index 462e224..9d9a8a3 100644 --- a/docs/remote/remote-control-loop.md +++ b/docs/remote/remote-control-loop.md @@ -2,4 +2,279 @@ ## Remote Control of the *Loop* App -đźš§ This option is not yet available, see [LoopFollow PR 434](https://github.com/loopandlearn/LoopFollow/pull/434) đźš§ +This option is available for remote control of a *Loop* phone when you build the `dev` branch of *LoopFollow*. After testing and release, this will replace [Nightscout Remote Control for Loop](remote-control-nightscout.md#loopfollow--careportal-with-the-loop-app). + +* *Loop* Remote Control + * Remote control with *LoopFollow* includes adding remote carbs, enacting remote bolus, and starting and canceling Overrides + * Available with all versions of *Loop* 3 + * Requires *LoopFollow* `dev` branch (once released, the version will be 3.2 or newer) + + +* After you [Configure *LoopFollow* for Remote Control](#configure-loopfollow-for-remote-control) +* You can [Use *LoopFollow* *Loop* Remote Control](#use-loopfollow-loop-remote-control) +* Be sure to read [FAQs for Remote Commands](#faqs-for-remote-commands) + +- - - + +## Use *LoopFollow* *Loop* Remote Control + +Once the *LoopFollow* phone is [configured](#configure-for-remote-control), and while the *Loop* phone is handy, test sending Remote Commands. It is good to also have a browser open with the *Nightscout* URL displayed. + +![loopfollow loop remote control choices](img/lf-lrc.png){width="300"} +{align=center} + +### Remote Sequence Steps + +!!! info "Wait for the Result" + + The remote control sequence requires several steps: + + 1. *LoopFollow* device to *Apple Push Notifications* + * *LoopFollow* provides an immediate success or failure message + 1. *Apple Push Notifications* to *Loop* phone where the message could be: + * handled promptly + * discarded, ignored by *Apple* or the phone + * significantly slowed down due to network connectivity + 1. The *Loop* app processes the remote command and either **enacts** it or **rejects** it + 1. The *Loop* app uploads to *Nightscout* with result shown on *LoopFollow* main screen in a few minutes + * If the remote request was **enacted**, the result is visible on the *LoopFollow* main plot + * If the remote request was **rejected**, a gray dot is visible on the *LoopFollow* main plot - touch it to see the reason why the request was rejected + + > If no result shows up at *LoopFollow* (no gray dot, no response to remote request), then it is most likely step 2 that failed. We have limited control over that. + +### Remote Meal + +***More info coming soon!*** + +![ remote carb entries](img/lf-lrc-meal.png){width="300"} +{align=center} + +### Remote Bolus + +***More info coming soon!*** + + +| Recent Rec Bolus | Last `Loop` > 12 minutes | +|:-:|:-:| +| ![ remote bolus current](img/lf-lrc-bolus.png){width="300"} | ![ remote bolus older than 12 minutes](img/lf-lrc-bolus-old.png){width="300"} | + + +! +{align=center} + +!!! tip "Make sure *Loop* information is up to date" + The insulin amount is filled out with the last recommended bolus that *LoopFollow* downloaded from the *Nightscout* site, which in turn was uploaded from the *Loop* phone. + + Read the warning in the Remote Bolus screen and make sure the Insulin Amount value is recent. + + If the last update was more than 12 minutes ago, that line is not prefilled. + + +### Overrides + +***More info coming soon!*** + +![ remote overrides](img/lf-lrc-override.png){width="300"} +{align=center} + +- - - + +## FAQs for Remote Commands + +1. **If I follow more than one person with *LoopFollow*, do I need multiple APNs Keys?** + **Answer**: No. If you support multiple people, you only need one APNS key. + + * You can follow someone who is using the *Trio* app and another person who is using the *Loop* app. + * You enter the same APNS credentials for each instance of *LoopFollow* that you are using for your multiple loopers. + +1. **How can I tell if it worked?** + **Answer**: You will get an immediate response on *LoopFollow* whether it successfully sent an APNS command. + + * It is still possible that the command won't go through to the *loop* phone - so wait until you see the remote entry on the *LoopFollow* display + * If the command was sent but there was an error, you will see a gray dot on the *LoopFollow* plot instead of the desired remote entry. If you tap on the gray dot, the error message will be displayed. + + > ![apns command failed to complete](img/lf-lrc-error.png){width="300"} + > {align=center} + + +### FAQs on Remote Overrides + +Don't forget to read [*Loopdocs*: Overrides](https://loopkit.github.io/loopdocs/operation/features/overrides/). + +For remote overrides in particular: + +1. **Can I set a different override in *LoopFollow* than I have programmed into _Loop_ app?** + **Answer**: No. You will only be able to enact override presets already programmed into the *Loop* app. + +1. **If I didn't start the override in *LoopFollow* (it was started in _Loop_ itself), can I still use *LoopFollow* to cancel it?** + **Answer**: Yes. You can cancel an override set in _Loop_ with *LoopFollow*. + +1. **Can I replace an override set in _Loop_ with an override set in *LoopFollow*?** + **Answer**: Yes. + +1. **Can I see on *LoopFollow* when a temporary override has been set using the looper’s phone?** + **Answer**: Yes. + + * There will be a green bar on the *LoopFollow* display within a few minutes. + * Once you see the bar, you can tap on Remote, Overrides to view the active override + * If it is a named preset (override), the name is listed at the top of the screen in the Active Override row + * If you want to see the details, you may need to scroll down to find that override in the list + * A custom override (not named) shows up as "Custom Override" in the Active Override row - the details can be observed in the Information Table on the main *LoopFollow* screen + * The values set for the override may take up to 5 minutes to appear in the Information Table Display, at which time the %insulin needs and target are shown. + +1. **Can a looper cancel a remote override**? + **Answer**: Yes. They can tap the heart icon :fontawesome-solid-heart-pulse: in _Loop_ so that it is no longer highlighted. This turns off the override, regardless of where it was initiated. + +1. **I set a remote override in *LoopFollow* but the Looper tapped the heart symbol :fontawesome-solid-heart-pulse: in the *Loop* app, so the override turned off. Will the override get reinstated the next time _Loop_ completes with internet access?** + **Answer**: No. The *APN* is only sent once. You can set the remote override again if need be. + +1. **Can I schedule a remote override ahead of time using Nightscout?** + **Answer**: No. When you set a remote override in *LoopFollow*, it starts immediately and lasts for the duration programmed for that override in the *Loop* app. You can only set an override in advance using the *Loop* app. + +### Warnings on Remote Commands + +!!! danger "**Duplicate Delivery Risk**" + We want to highlight a very important risk before you get started. + + For safety, always assume a previous remote carbs/bolus was delivered. For motivation think of the following example: + + * You send a 5-unit remote bolus. + * The bolus is delivered to the Looper. + * *Nightscout* is having a temporary technical issue and doesn't show the bolus was received. + * The *LoopFollow* display echoes what is shown in the *Nightscout* so you don’t see a delivery and you assume it failed. + * You send another remote 5-unit bolus. + * The second 5-unit bolus is delivered to the Looper (10 Units total). + +You can see the danger of sending duplicate bolus/carbs so be careful. If a remote bolus/carb entry doesn’t show in *Nightscout* or *LoopFollow*, use your own judgment on whether enough time has passed to try again. + +### Remote Bolus, Then Remote Carb + +!!! warning "If sending both, choose Bolus then Carbs" + If you plan to send a carb command remotely and later decide to issue a bolus command - STOP and consider. + + There are 2 scenarios of concern that could lead to too much insulin: + + * Dosing Strategy is **Temp Basal Only** (temporary basal) + * _Loop_ will initiate a max Temp Basal when it receives the carbs remote command + * Your bolus is accepted next and takes place in addition to the high temporary basal + * Dosing Strategy is **Automatic Bolus** + * _Loop_ will initiate a percentage of the recommended dose when it receives the carbs remote command + * Your bolus will be accepted and take place in addition to an automatic boluses or be rejected because a bolus is already in progress + + Typically, sending a remote carb entry alone is sufficient for _Loop_ to know about the carbs and begin to dose for them. + + If you really want to both bolus for carbs and enter carbs, then do it in that order. + + 1. The bolus, when accepted, may start a zero Temp Basal (temporary basal) (which is "safer") + 2. The carbs, when accepted, will cause the app to respond to the carbs + 3. In this case, the prediction includes both carbs and bolus + + ❗️ Remember - you must wait pause at least 30 seconds between remote commands or the One-Time-Password (OTP) will be rejected as having already been used. + + ❗️ *Apple* can decide to limit the number of APNS commands it services. Make your remote requests count. + + +- - - + +## Configure *LoopFollow* for Remote Control + +### *LoopFollow* Remote Setting Type + +The Remote Settings row in the *LoopFollow* Settings screen is used to select the type of remote access you wish to use. + +![LoopFollow remote settings type](img/lf-lrc-selection.png){width="300"} +{align="center"} + +!!! question "The *Loop* Remote Control option is not available" + The `Loop Remote Control` option is only available in *LoopFollow* if you have already entered a [*Nightscout* URL](#add-nightscout) with a default profile recognized as a *Loop* profile. + +### Guardrails + +The maximum allowed entries for Bolus and Carbs are configured in the guardrails section. The default values are shown in the graphic below. Adjust this to what is appropriate for the individual. + +![default guardrails](img/lf-lrc-guardrails.png){width="300"} +{align=center} + +These guardrails are for sending remote commands with *LoopFollow*. There are separate guardrails in the *Loop* app itself. Be sure the *LoopFollow* guardrails are at least as conservative as the *Loop* guardrails. + +!!! warning "Do not exceed *Loop* Guardrails" + Example: + + * *LoopFollow* guardrail is 10 U bolus + * *Loop* guardrail is 8 U bolus + * Send remote bolus amount of 10 U from *LoopFollow* + * *LoopFollow* shows a success message, meaning the APNS request was successfully sent to the *Loop* phone + * The *Loop* phone rejects the request because it exceeds the guardrail + * A gray dot shows up on the *LoopFollow* screen, tapping it shows the message "Exceeds Maximum allowed bolus in settings" + + +### Credentials to Enable Loop Remote Control + +When you select *Loop* Remote Control as the Remote Type in the *LoopFollow* app, you must fill in the (1) [Developer Team ID](#developer-team-id), (2) [APNS Key ID](#apns-key-id) and (3) [APNS Key](#apns-key). + +![remote lrc settings ](img/lf-lrc-credentials.png){width="300"} +{align="center"} + +### Developer Team ID + +This is the *Apple* Developer ID for whoever created the APNS Key. The developer must be the same as the developer who built the *Loop* app. + +Note that the *Nightscout* app and the *LoopFollow* app do not need to be built by this developer. It is only the *Loop* app that has this requirement. + +### APNS Key ID + +If you previously configured remote control with the *Loop* app, you already have an *Apple* Push Notification System (APNS) Key ID and Key. These were added to the config vars in your *Nightscout* site. See [Existing APNS](#existing-apns){: target="_blank" }. The value of the `LOOP_APNS_KEY_ID` goes here. + +If you have never created an APNS (or have lost the credentials), follow the directions in [New APNS](#new-apns){: target="_blank" } and copy the APNS Key ID into *LoopFollow* and save the value in your Secrets Reference file. + +The APNS Key ID and APNS Key only need to be added to *LoopFollow* to enable *Loop* Remote Control. They do not need to be added to the *Nightscout* site if they are not already there. However, if you plan to use *Nightscout* `Careportal` or *LoopCaregiver*, then the APNS `config` vars must be added to *Nightscout*. + +> When creating the APNS, you must be logged in as a developer. The developer ID for the APNS must be the same as the one used for creating your *Loop* app or remote control will not work. + +### APNS Key + +If you previously configured remote control with the *Loop* app, you already have an *Apple* Push Notification System (APNS) Key ID and Key. These were added to the config vars in your *Nightscout* site. See [Existing APNS](#existing-apns){: target="_blank" }. The value of the `LOOP_APNS_KEY` goes here. + +If you have never created an APNS (or have lost the credentials), follow the directions in [New APNS](#new-apns){: target="_blank" } and copy the APNS Key into *LoopFollow* and save the value in your Secrets Reference file. + +### QR Code URL + +This provides the One-Time Password needed for the *Loop* app to accept the APNS input as valid. + +On the _Loop_ phone, *Nightscout* must be included under the `Loop` -> Settings -> Services section. Navigate to Services and select *Nightscout*. Tap on the One-Time Password row to view the QR code. + +When you need to configure your authentication method, you can either use a saved QR screenshot or scan the QR on the _Loop_ phone. + +Options: + +* Have your Looper (or at least their phone) available +* Save a screenshot of their QR code + * Keep this secure + * Do not share the QR screenshot when asking for help + +![example screen for nightscout and qr code](img/qr-code-example.png ){width="650"} +{align="center"} + +While you are on the *Loop* Settings -> Services -> NightScout screen, notice that the 6-digit number on the One-Time Password row updates every 30 seconds. + +### Environment Production + +If the *Loop* app was built with Browser Build, you must enable this row. + +If the *Loop* app was built using Xcode on a Mac, you must disable this row. + +### Debug / Info + +This section indicates if *Loop* has uploaded required information to *Nightscout*. + +The graphic below shows a properly configured *LoopFollow* when the *Loop* app was built using the Browser Build method. + +![shows credentials entered into loopfollow are correct](img/lf-lrc-debug.png){width="300"} +{align=center} + +- - - + +## Troubleshooting + +This section is a placeholder for troubleshooting issues. + diff --git a/docs/remote/remote-control-nightscout.md b/docs/remote/remote-control-nightscout.md index 07988b0..4700a66 100644 --- a/docs/remote/remote-control-nightscout.md +++ b/docs/remote/remote-control-nightscout.md @@ -20,6 +20,8 @@ Please read the appropriate section on this page. ## *LoopFollow* & Careportal with the *Loop* App +> Once *LoopFollow* 3.2.0 is released, this option will no longer be available for Loop URL. It will be replaced with the `Loop Remote Control` feature currently being tested in the `dev` branch. + For *Loop* careportal access, your *Nightscout* site must be configured with Apple Push Notification System (APNS) credentials as fully explained in LoopDocs. * [*LoopDocs*: Remote Overview](https://loopkit.github.io/loopdocs/nightscout/remote-overview/) diff --git a/docs/remote/remote-control-overview.md b/docs/remote/remote-control-overview.md index 228f238..bff79c6 100644 --- a/docs/remote/remote-control-overview.md +++ b/docs/remote/remote-control-overview.md @@ -2,70 +2,104 @@ ## Remote Control Overview -You must configure *LoopFollow* and the *Nightscout* URL to use remote commands. +In the near future, all *LoopFollow* remote commands will be sent directly using the [Apple Push Notification System (APNS)](#apple-push-notifications-system-apns). -* *Nightscout* Remote Command in *LoopFollow* makes the standard Careportal options easily available from inside the *LoopFollow* app +!!! abstract "Remote Control Updates in Development" + The instructions in this section are subject to updates as changes are made to the *Trio* app and the *LoopFollow* app. + + * With *LoopFollow* 3.1 and earlier: + * If you are using *Trio* 0.2.x, remote commands are routed via *Nightscout* + * If you are using *Loop* 3.x or newer, remote commands are routed via *Nightscout* + * Only Overrides can be sent from *LoopFollow* 3.1 and only if *Nightscout* site has the APNS keys embedded + * If you are using *Trio* 0.5.x or newer, remote commands are sent directly through APNS + * Once *LoopFollow* 3.2.0 is released (currently being tested in `dev` branch): + * If you are using *Trio* 0.2.x, remote commands are routed via Nightscout + * If you are using *Loop* 3.x or newer, remote commands are sent directly through APNS + * If you are using *Trio* 0.5.x or newer, remote commands are sent directly through APNS + + > Using APNS directly from *LoopFollow* provides faster feedback about commanding. + + > With *LoopFollow* 3.2, APNS keys will not need to be embedded in the *Nightscout* site which may simplify configuration for those who use a paid service for *Nightscout*. + +In summary, changes for *LoopFollow* sending remote commands to the *Loop* app: + +* With *LoopFollow* 3.1 (released version) and earlier + * *Loop* remote commands are limited to Overrides, require the *Nightscout* site be configured with the APNS credentials and require a token with `careportal` access +* With *LoopFollow* 3.2 (once it is released) and newer + * *Loop* remote commands from *LoopFollow* include Meal, Bolus and Override control + * *LoopFollow* no longer requires the *Nightscout* site be configured with the APNS credentials + * Read access for the *Nightscout* URL is sufficient + +> With *Trio* 0.2.x, *LoopFollow* only supports temp targets and requires a token with `careportal` access. Once updated to *Trio* 0.5.x or newer, the full Trio Remote Control options are available. + +### *LoopFollow* Remote Control + +* *Nightscout* Remote setting in *LoopFollow* makes the standard Careportal options easily available from inside the *LoopFollow* app * With this selection, the *LoopFollow* phone sends commands to *Nightscout* which then sends commands to the *Loop*/*Trio* phone * For that reason, the *Nightscout* display will be updated first * If there is an issue sending the careportal request from *Nightscout*, it might not make it to the *Loop*/*Trio* phone * After the next download from *Nightscout*, the display will update if commands do or do not make it through the full round trip -* *Loop* and *Trio* Remote Command features use the [Apple Push Notification System (APNS)](#apple-push-notifications-system-apns) - * With this selection, successful commands go directly through APNS +* *Loop* Remote Command (for *LoopFollow* dev only) and *Trio* Remote Command features use APNS + * With this selection, successful commands go directly via APNS to the *Loop*/*Trio* phone * The results show up in *Nightscout* after being uploaded from the *Loop*/*Trio* phone * The results are plotted or displayed in *LoopFollow* after being downloaded from the *Nightscout* URL as a new treatment + * APNS keys do not need to be embedded in the *Nightscout* site + * This simplifies configuration of *Nightscout*, especially for those who use a paid service for *Nightscout* - - - ## *LoopFollow* Remote Options -The graphic below shows the top portion of the Remote Settings screen when None, `Nightscout` or `Trio Remote Control` is selected. The choice for `Loop Remote Control` is in development and this graphic will be updated once it is available in the `dev` branch. +### Remote Options: 3.1.0 + +The graphic below shows the top portion of the Remote Settings screen when None, `Nightscout` or `Trio Remote Control` is selected. This graphic is for *LoopFollow* 3.1.0 or earlier. ![LoopFollow remote options - all types](img/lf-remote-options.svg){width="400"} {align="center"} -### Critical Configuration Information +### Remote Options: Under Development -If you plan to use the [*Apple* Push Notifications System (APNS)](#apple-push-notifications-system-apns), follow that link for instructions to find or create your keys. +The graphic below is from the `dev` branch of *LoopFollow*. You must first enter a *Nightscout* URL before any remote options are offered and then only the option suitable for that *Nightscout* site can be selected. -If you are using a *Trio* *Nightscout* URL, be sure to read about [*Trio* Remote Control](#trio-remote-control) on this page. +* When following someone running Loop, the options are None or [Loop Remote Control](remote-control-loop.md){: target="_blank" } +* When following someone running Trio, the options are None or: + * Trio 0.5.x and newer: [Trio Remote Control](remote-control-trio.md){: target="_blank" } + * Trio 0.2.x: [Nightscout Remote Control](remote-control-nightscout.md#loopfollow--careportal-with-the-trio-app){: target="_blank" } -* If the user of the *Trio* app disables Remote Control, then *LoopFollow* remote commands will be issued but not enacted - -Depending on the selection you made, continue to one of these pages for more information on how to configure *LoopFollow* for that remote control option. - -* [*Nightscout*](remote-control-nightscout.md) -* [*Loop* Remote Control](remote-control-loop.md) -* [*Trio* Remote Control](remote-control-trio.md) +![LoopFollow remote options - all types](img/lf-remote-options_3.2.svg){width="600"} +{align="center"} -- - - -## *Trio* Remote Control -> The graphics displayed on this page are associated with *Trio* version 0.5.x or newer. The same setting is available in older version of *Trio* but in a different location in the menu structure. +### Critical Configuration Information -**Default:** _OFF_ +If you plan to use the [*Apple* Push Notifications System (APNS)](#apple-push-notifications-system-apns), follow that link for instructions to find or create your keys. -Remote control must be enabled on the *Trio* phone or no remote information is accepted by the *Trio* phone. +If you are using a *Trio* *Nightscout* URL, be aware: -> You can search for this screen in *Trio* settings or go through the sequence: Trio, Settings, Features, Remote Control. +* If the user of the *Trio* app disables Remote Control and their *Trio* phone, then *LoopFollow* remote commands will be issued but not enacted -Once Remote Control is enabled, a Shared Secret is available. This is only used if you want to use *Trio* Remote Control with *LoopFollow*. +Depending on the selection you made, continue to one of these pages for more information on how to configure *LoopFollow* for that remote control option. -The graphic below is on the *Trio* phone: +* [*Loop* Remote Control](remote-control-loop.md) +* [*Trio* Remote Control](remote-control-trio.md) +* [*Nightscout*](remote-control-nightscout.md) -![Trio remote control settings](img/trio-enable-remote-control.png){width="300"} -{align="center"} +- - - -When Remote Control is enabled on the *Trio* app and the *LoopFollow* phone is properly configured, you can add carbs, send boluses, set or cancel overrides or temporary targets from the *LoopFollow* phone to the *Trio* phone via *Apple* push notifications. +## *Apple* Push Notifications System (APNS) -The `SHARED SECRET` should be copied from the *Trio* phone and added to the [`Shared Secret`](#shared-secret) row of the *LoopFollow* Remote Settings screen as part of the configuration for using *LoopFollow*. +!!! tip "One Set of APNS Credentials" + **Question: If I follow more than one person with *LoopFollow*, do I need multiple APNs Keys?** -!!! warning "Important" - The ability for the *Trio* app to be remotely controlled will be **disabled** when `Enable Remote Control` is turned OFF on the *Trio* phone, even if you have *LoopFollow* configured with the correct shared secret or your *Nightscout* URL has Careportal access. This is for the protection of the *Trio* user, so that they **always** are the primary controller of their insulin dosing app. + **Answer: No.** + + If you support multiple people, you only need one APNS key. -- - - + * You can follow someone who is using the *Trio* app and another person who is using the *Loop* app. + * You enter the same APNS credentials for each instance of *LoopFollow* that you are using for your multiple loopers + * The looper's app (*Loop* or *Trio*) must be built with the Developer ID used to create the APNS key. -## *Apple* Push Notifications System (APNS) ### Existing APNS @@ -84,11 +118,18 @@ When you configured APNS for the *Loop* app and saved information in your *Night | `LOOP_APNS_KEY`|-----BEGIN PRIVATE KEY-----
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA
-----END PRIVATE KEY-----| | `LOOP_DEVELOPER_TEAM_ID`|AAAAAAAAAA| -Note that the `LOOP_DEVELOPER_TEAM_ID` is the Apple Developer ID (TEAMID) used to build the *Loop* app. +Note that the `LOOP_DEVELOPER_TEAM_ID` is the Apple Developer ID used to build the *Loop* app. + +* Once *LoopFollow* 3.2 is released, the addition of those `config` variables in *Nightscout* is only required to support sending remote commands from *Nightscout* `Careportal` and from *LoopCaregiver*. +* *LoopFollow* 3.2 and newer versions only require the APNS credentials to be entered in the *LoopFollow* app for both the *Loop* and *Trio* Remote Control features. + +If you are configuring for *Trio* remote control with *LoopFollow*, you do not need to enter the Apple Developer ID explicitly because it is included in the information *Trio* uploads to *Nightscout*. ### New APNS -When using *Trio*, you do not need to add the config vars to *Nightscout* that are required for *Loop* remote control. If you already have them, it doesn't hurt anything, but you do not need to add them to use remote control with Trio. +When using *Trio*, you do not need to add the config vars to *Nightscout* that are required for *Loop* remote control from *Nightscout* `Careportal` and *LoopCaregiver*. If you already have them, it doesn't hurt anything, but you do not need to add them to use remote control with *Trio*. + +Once *LoopFollow* 3.2 is released, the config vars will not need to be embedded in *Nightscout* for *Loop* Remote Control from *LoopFollow*. If you do not have APNS credentials, you need to create a key and grant it access to the  Apple Push Notification Service (APNS). @@ -138,10 +179,12 @@ If you do not have APNS credentials, you need to create a key and grant it acces > ![APNS KEY ID is highlighted by red rectangle](img/apns-key-id.png) +- - - + ## Next Step Depending on the selection you made, continue to one of these pages for more information on how to configure *LoopFollow* for your desired remote control option. -* [*Nightscout*](remote-control-nightscout.md) -* [*Loop* Remote Control](remote-control-loop.md) +* [*Loop* Remote Control](remote-control-loop.md) (*LoopFollow* dev branch only) * [*Trio* Remote Control](remote-control-trio.md) +* [*Nightscout*](remote-control-nightscout.md) diff --git a/docs/remote/remote-control-trio.md b/docs/remote/remote-control-trio.md index 5cae78e..abde02b 100644 --- a/docs/remote/remote-control-trio.md +++ b/docs/remote/remote-control-trio.md @@ -23,81 +23,126 @@ The most powerful arrangement, for *Trio* 0.5.x (or newer), is to configure the * Those options were replaced by the more secure *Trio* Remote Control for *Trio* 0.5.x (or newer) * **Using announcements to provide remote control of the *Trio* phone is no longer supported** +The bullets below take you to the indicated topics. The configuration steps are listed first but only need to be done once: + +* [Configure *Trio* Phone for Remote Control](#configure-trio-phone-for-remote-control) +* [Configure *LoopFollow* for Remote Control](#configure-loopfollow-for-remote-control) +* [Use *LoopFollow* *Trio* Remote Control](#use-loopfollow-trio-remote-control) +* [Troubleshooting](#troubleshooting) - - - -## *Trio* Remote Control +## Use *LoopFollow* *Trio* Remote Control !!! warning "Important" - The ability for the *Trio* app to be remotely controlled will be **disabled** when `Enable Remote Control` is turned OFF on the *Trio* phone, even if you have *LoopFollow* configured with the correct credential. This is for the protection of the *Trio* user, so that they **always** are the primary controller of their insulin dosing app. + The ability for the *Trio* app to be remotely controlled will be **disabled** when `Enable Remote Control` is turned OFF on the *Trio* phone, even if you have *LoopFollow* configured with the correct credentials. This is for the protection of the *Trio* user, so that they **always** are the primary controller of their insulin dosing app. - For more details, see [*Trio* Remote Control](remote-control-overview.md#trio-remote-control){: target="_blank" }. + The APNS commands will report success on the *LoopFollow* app, but you will see a gray dot on the plot. The message is "Remote command received, but remote control is disabled in settings. Ignoring the command." -- - - +Once the *LoopFollow* app is configured, and while the *Trio* phone is handy, test sending Remote Commands. It is good to also have a browser open with the *Nightscout* URL displayed. -### *LoopFollow* Remote Setting Type +Remember to give the system time to update. -The Remote Settings row in the *LoopFollow* Settings screen is used to select the type of remote access you wish to use. +The sequence is *LoopFollow* to *Apple Push Notifications* to *Trio*, which uploads to *Nightscout* and then is displayed in the *LoopFollow* main screen. -![LoopFollow remote settings type](img/lf-trc-selection.jpg){width="300"} -{align="center"} +![loopfollow trio remote control choices](img/lf-trc.jpg){width="300"} +{align=center} -!!! warning "The *Trio* Remote Control option is not available" - The `Trio Remote Control` option is only available in *LoopFollow* if you have already entered a [*Nightscout* URL](#add-nightscout) with a default profile recognized as a *Trio* profile. Review [Troubleshooting](#troubleshooting) for possible reasons for not seeing the option. +### Remote Sequence Steps -* *Nightscout* option - * Remote control with *LoopFollow* is limited to starting and canceling Temp Targets - * Available with *Trio* 0.2.x and newer -* *Trio* Remote Control option - * Remote control with *LoopFollow* includes adding remote carbs, enacting remote bolus, and starting and canceling Temp Targets and Overrides - * Requires *Trio* 0.5.x (or newer) and *LoopFollow* 2.4.x (or newer) - * Continue with [Configure *LoopFollow* *Trio* Remote Control](#configure-loopfollow-trio-remote-control) to finish the configuration process +!!! info "Wait for the Result" -- - - -## Configure *LoopFollow* *Trio* Remote Control + The remote control sequence requires several steps: -> This is supported for *Trio* 0.5.x (or newer) when using *LoopFollow* 2.4.0 (or newer). + 1. *LoopFollow* device to *Apple Push Notifications* + * *LoopFollow* provides an immediate success or failure message + 1. *Apple Push Notifications* to *Trio* phone where the message could be: + * handled promptly + * discarded, ignored by *Apple* or the phone + * significantly slowed down due to network connectivity + 1. The *Trio* app processes the remote command and either **enacts** it or **rejects** it + 1. The *Trio* app uploads to *Nightscout* with result shown on *LoopFollow* main screen in a few minutes + * If the remote request was **enacted**, the result is visible on the *LoopFollow* main plot + * If the remote request was **rejected**, a gray dot is visible on the *LoopFollow* main plot - touch it to see the reason why the request was rejected -When you select *Trio* Remote Control as the Remote Type in the *LoopFollow* app, you must fill in the (1) [Shared Secret](#shared-secret), (2) [APNS Key ID](#apns-key-id) and (3) [APNS Key](#apns-key). + > If no result shows up at *LoopFollow* (no gray dot, no response to remote request), then it is most likely step 2 that failed. We have limited control over that. -| Default Remote Settings | Configured Remote Settings | -|:-:|:-:| -| ![default remote trc settings ](img/lf-trc-empty-control-settings.jpg){width="300"} | ![LoopFollow settings](img/lf-trc-filled-control-settings.png){width="300"} | +### Remote Meal -### User +***More info coming soon!*** -The person using the *LoopFollow* app should enter the name they want to show up as having entered this entry. +When entering meals and choosing to schedule the meal, any bolus included in the meal is enacted immediately. Only the carb entry is entered according to the schedule. -* At the current time, this is not used by *LoopFollow* for Trio -* It does show up as a notification on a *Loop* phone when *LoopFollow* is used with the *Loop* app - * This feature might be added to *LoopFollow* for *Trio* at a later time +![scheduled meal warning](img/lf-trc-scheduled-meal.png){width="300"} +{align=center} + +### Remote Bolus + +***More info coming soon!*** + +### Temp Target + +***More info coming soon!*** + +### Overrides + +***More info coming soon!*** + +- - - + +## Configure *Trio* Phone for Remote Control + +> The graphics displayed on this page are associated with *Trio* version 0.5.x or newer. The same setting is available in older version of *Trio* but in a different location in the menu structure. + +**Default:** _OFF_ + +Remote control must be enabled on the *Trio* phone or no remote information is accepted by the *Trio* phone. + +> You can search for this screen in *Trio* settings or go through the sequence: Trio, Settings, Features, Remote Control. ### Shared Secret -This is the unique shared secret that can be generated or entered into the *Trio* app in the Remote Control screen. The shared secret in *Trio* and *LoopFollow* must match to provide the ability to remotely send commands to this *Trio* app. +Once Remote Control is enabled, a Shared Secret is available. This is only used if you want to use *Trio* Remote Control with *LoopFollow*. -> Please use a secure secret - the [automatically generated secret](#trio-remote-control) is recommended. +The graphic below is on the *Trio* phone: -### APNS Key ID +![Trio remote control settings](img/trio-enable-remote-control.png){width="300"} +{align="center"} -If you previously configured remote control with the *Loop* app, you already have an *Apple* Push Notification System (APNS) Key ID and Key. These were added to the config vars in your *Nightscout* site. See [Existing APNS](#existing-apns). The value of the `LOOP_APNS_KEY_ID` goes here. Be sure to read the [Configure for OpenAPS](#configure-for-openaps) section about steps to make *Nightscout* and *LoopFollow* work with Trio. +When Remote Control is enabled on the *Trio* app and the *LoopFollow* app is properly configured, you can add carbs, send boluses, set or cancel overrides or temporary targets from the *LoopFollow* app to the *Trio* phone via *Apple* push notifications. -If you have never created an APNS (or have lost the credentials), follow the directions in [New APNS](#new-apns) and copy the APNS Key ID into *LoopFollow* and save the value in your Secrets Reference file. +The `SHARED SECRET` should be copied from the *Trio* phone and added to the [`Shared Secret`](#shared-secret_1) row of the *LoopFollow* Remote Settings screen as part of the configuration for using *LoopFollow*. -> When creating the APNS, you must be logged in as a developer. The developer ID for the APNS must be the same as the one used for creating your *Trio* app or remote control will not work. +!!! warning "Important" + The ability for the *Trio* app to be remotely controlled will be **disabled** when `Enable Remote Control` is turned OFF on the *Trio* phone, even if you have *LoopFollow* configured with the correct shared secret or your *Nightscout* URL has Careportal access. This is for the protection of the *Trio* user, so that they **always** are the primary controller of their insulin dosing app. -### APNS Key +- - - -If you previously configured remote control with the *Loop* app, you already have an *Apple* Push Notification System (APNS) Key ID and Key. These were added to the config vars in your *Nightscout* site. See [Existing APNS](#existing-apns). The value of the `LOOP_APNS_KEY` goes here. +## Configure *LoopFollow* for Remote Control -If you have never created an APNS (or have lost the credentials), follow the directions in [New APNS](#new-apns) and copy the APNS Key into *LoopFollow* and save the value in your Secrets Reference file. +### *LoopFollow* Remote Setting Type -### Guardrails +The Remote Settings row in the *LoopFollow* Settings screen is used to select the type of remote access you wish to use. -The maximum allowed entries for Bolus, Carbs, Protein, and Fat are configured in the guardrails section shown in the graphic below. This example is one in which the Shared Secret and APNS values have not yet been added. +![LoopFollow remote settings type](img/lf-trc-selection.jpg){width="300"} +{align="center"} -![default guardrails](img/lf-trc-guardrails.jpg){width="300"} -{align=center} +!!! question "The *Trio* Remote Control option is not available" + The `Trio Remote Control` option is only available in *LoopFollow* if you have already entered a [*Nightscout* URL](#add-nightscout) with a default profile recognized as a *Trio* profile. Review [Troubleshooting](#troubleshooting) for possible reasons for not seeing the option. + +* *Nightscout* option + * Remote control with *LoopFollow* is limited to starting and canceling Temp Targets + * Available with *Trio* 0.2.x and newer +* *Trio* Remote Control option + * Remote control with *LoopFollow* includes adding remote carbs, enacting remote bolus, and starting and canceling Temp Targets and Overrides + * Requires *Trio* 0.5.x (or newer) and *LoopFollow* 2.4.x (or newer) + * Continue with [Configure *LoopFollow* *Trio* Remote Control](#configure-loopfollow-trio-remote-control) to finish the configuration process + +- - - + +## Configure *LoopFollow* *Trio* Remote Control + +> This is supported for *Trio* 0.5.x (or newer) when using *LoopFollow* 2.4.0 (or newer). ### Meal Settings @@ -108,64 +153,77 @@ The user can decide to enable or disable two features independently. * Meal with Fat/Protein * When enabled, the user is presented with a Protein and Fat row in addition to the Carbs and Bolus Amount rows -Refer to the graphic in the [Guardrails](#guardrails) section. +Refer to the graphic below which shows default settings for meal settings and guardrails rows. The user row is filled in. -### Debug / Info +![default meal settings and guardrails](img/lf-trc-meal-default.png){width="300"} +{align=center} -This section indicates if *Trio* has uploaded required information to *Nightscout*. +### Guardrails -The graphic below shows a properly configured *LoopFollow* when the *Trio* app was built using the Browser Build method. +The maximum allowed entries for Bolus, Carbs, Protein, and Fat are configured in the guardrails section. The default values are shown in the graphic in the [Meal Settings](#meal-settings) section. Adjust this to what is appropriate for the individual. -![shows credentials entered into loopfollow are correct](img/lf-trc-debug-blurred.png){width="300"} -{align=center} +These guardrails are for sending remote commands with *LoopFollow*. There are separate guardrails in the *Trio* app itself. Be sure the *LoopFollow* guardrails are at least as conservative as the *Trio* guardrails. -If you have empty rows in the Debug / Info screen, the most likely problem is the default profile is not coming from Trio. See [Update Profile](#update-profile). -If you took those steps and still have missing rows, return to [Configure *LoopFollow* *Trio* Remote Control](#configure-loopfollow-trio-remote-control) and try again. +!!! warning "Do not exceed *Trio* Guardrails" + Example: -- - - + * *LoopFollow* guardrail is 10 U bolus + * *Trio* guardrail is 8 U bolus + * Send remote bolus amount of 10 U from *LoopFollow* + * *LoopFollow* shows a success message, meaning the APNS request was successfully sent to the *Trio* phone + * The *Trio* phone rejects the request because it exceeds the guardrail + * A gray dot shows up on the *LoopFollow* screen, tapping it shows the message "Command rejected: bolus amount (10 units) exceeds the maximum allowed (8 units)" -## Use *LoopFollow* *Trio* Remote Control -Once the *LoopFollow* phone is configured, and while the *Trio* phone is handy, test sending Remote Commands. It is good to also have a browser open with the *Nightscout* URL displayed. +### User -Remember to give the system time to update. +The person using the *LoopFollow* app should enter the name they want to show up as having entered this entry. -The sequence is *LoopFollow* to *Apple Push Notifications* to *Trio*, which uploads to *Nightscout* and then is displayed in the *LoopFollow* main screen. +* At the current time, this is not used by *LoopFollow* for Trio -![loopfollow trio remote control choices](img/lf-trc.jpg){width="300"} -{align=center} +Refer to the graphic in the [Meal Settings](#meal-settings) section. -### Remote Meal +### Credentials -***More info coming soon!*** +### Shared Secret -When entering meals and choosing to schedule the meal, any bolus included in the meal is enacted immediately. Only the carb entry is entered according to the schedule. +This is the unique shared secret that can be generated or entered into the *Trio* app in the Remote Control screen. The shared secret in *Trio* and *LoopFollow* must match to provide the ability to remotely send commands to this *Trio* app. -![scheduled meal warning](img/lf-trc-scheduled-meal.png){width="300"} -{align=center} +> Please use a secure secret - the [automatically generated secret](#configure-trio-phone-for-remote-control) is recommended. -### Remote Bolus +### APNS Credentials -***More info coming soon!*** +When you select *Trio* Remote Control as the Remote Type in the *LoopFollow* app, you must fill in the (1) [Shared Secret](#shared-secret), (2) [APNS Key ID](#apns-key-id) and (3) [APNS Key](#apns-key). -### Temp Target +| Default Remote Settings | Configured Remote Settings | +|:-:|:-:| +| ![default remote trc settings ](img/lf-trc-empty-control-settings.jpg){width="300"} | ![LoopFollow settings](img/lf-trc-filled-control-settings.png){width="300"} | -***More info coming soon!*** +### APNS Key ID -### Overrides +If you previously configured remote control with the *Loop* app, you already have an *Apple* Push Notification System (APNS) Key ID and Key. These were added to the config vars in your *Nightscout* site. See [Existing APNS](#existing-apns). The value of the `LOOP_APNS_KEY_ID` goes here. Be sure to read the [Configure for OpenAPS](#configure-for-openaps) section about steps to make *Nightscout* and *LoopFollow* work with Trio. -***More info coming soon!*** +If you have never created an APNS (or have lost the credentials), follow the directions in [New APNS](#new-apns) and copy the APNS Key ID into *LoopFollow* and save the value in your Secrets Reference file. -- - - +> When creating the APNS, you must be logged in as a developer. The developer ID for the APNS must be the same as the one used for creating your *Trio* app or remote control will not work. +### APNS Key -### *Trio* Remote Control Stops Working +If you previously configured remote control with the *Loop* app, you already have an *Apple* Push Notification System (APNS) Key ID and Key. These were added to the config vars in your *Nightscout* site. See [Existing APNS](#existing-apns). The value of the `LOOP_APNS_KEY` goes here. -Other signatures that you need to [force the update](#update-profile) are shown in the graphics below - for both these instances, *Trio* Remote Control (TRC) was working with *LoopFollow* and then stopped working: +If you have never created an APNS (or have lost the credentials), follow the directions in [New APNS](#new-apns) and copy the APNS Key into *LoopFollow* and save the value in your Secrets Reference file. -| TRC Option Not Allowed | TRC Error | -|:-:|:-:| -| ![cannot select trio remote control ](img/lf-trc-not-shown.png){width="300"} | ![LoopFollow settings](img/lf-trc-error-wrong-profile.png){width="300"} | +### Debug / Info + +This section indicates if *Trio* has uploaded required information to *Nightscout*. + +The graphic below shows a properly configured *LoopFollow* when the *Trio* app was built using the Browser Build method. + +![shows credentials entered into loopfollow are correct](img/lf-trc-debug-blurred.png){width="300"} +{align=center} + +If you have empty rows in the Debug / Info screen, the most likely problem is the default profile is not coming from Trio. See [Update Profile](#update-profile). +If you took those steps and still have missing rows, return to [Configure *LoopFollow* *Trio* Remote Control](#configure-loopfollow-trio-remote-control) and try again. - - - @@ -194,13 +252,13 @@ In *Nightscout*, you need to modify these config vars: Remember to restart the *Nightscout* server (restart dynos) after updating these variables. -### Stop *Nightscout* access from the *Loop* app and the *iAPS* app +### Stop *Nightscout* uploads from other apps If you were previously running the *Loop* app or the *iAPS* app: * Remove *Nightscout* from *Loop* Services or *iAPS* services -* Add *Nightscout* credentials to Trio - * You need the URL and the API_SECRET. +* Add *Nightscout* as a Service to *Trio* + * You need the *Nightscout* URL and the API_SECRET In addition to this step, you may need to force the profile (from Trio) to upload to *Nightscout* and overwrite the one stored as the default profile in *Nightscout*. @@ -209,7 +267,7 @@ In addition to this step, you may need to force the profile (from Trio) to uploa !!! warning "Must on *Trio* 0.5.x (or newer)" If you are on *Trio* 0.2.x, you might see the option for *Trio* Remote Control in *LoopFollow* Remote Settings, but you can't use it. See [Use *LoopFollow* *Nightscout* Remote Control](#use-loopfollow-nightscout-remote-control). -If you were previously running the *Loop* app, take the actions in the [previous section](#stop-nightscout-access-from-the-loop-app) and then force the profile to update. +If you were previously running the *Loop* app or the *iAPS* app, [Stop *Nightscout* upload](#stop-nightscout-uploads-from-other-apps) from those apps and then force the profile to update. To force a profile to update to *Nightscout*, go to the *Trio* app and toggle Allow Uploading to Nightscout off (disable) and then enable it again. @@ -219,3 +277,14 @@ If the Debug Info in *LoopFollow* is missing a Device Token or a Bundle ID, as s ![LoopFollow debug info indicates a problem](img/lf-force-ns-profile.svg){width=600} {align=center} + +### *Trio* Remote Control Stops Working + +Other signatures that you need to [force the update](#update-profile) are shown in the graphics below - for both these instances, *Trio* Remote Control (TRC) was working with *LoopFollow* and then stopped working: + +| TRC Option Not Allowed | TRC Error | +|:-:|:-:| +| ![cannot select trio remote control ](img/lf-trc-not-shown.png){width="300"} | ![LoopFollow settings](img/lf-trc-error-wrong-profile.png){width="300"} | + + +- - - diff --git a/mkdocs.yml b/mkdocs.yml index e85b30e..49a78cb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -190,9 +190,9 @@ nav: - Features: 'setup/lf-features.md' - Remote Control: - 'Remote Control Overview': 'remote/remote-control-overview.md' - - 'Nightscout Remote Control': 'remote/remote-control-nightscout.md' - 'Loop Remote Control': 'remote/remote-control-loop.md' - 'Trio Remote Control': 'remote/remote-control-trio.md' + - 'Nightscout Remote Control': 'remote/remote-control-nightscout.md' - Build: - 'LoopFollow Build': 'build/build-options.md' - FAQs: