diff --git a/README-Combo.md b/README-Combo.md index 5b2308d672..9861f2ad77 100644 --- a/README-Combo.md +++ b/README-Combo.md @@ -15,65 +15,83 @@ Hardware requirements: loop phone using these instructions: http://github.com/gregorybel/combo-pairing/ -Setup v2 -- Configure pump using 360 config software -- ruffy https://github.com/jotomo/ruffy (Branch `combo-scripter-v2`) - Pairing should work, if not, switch to the `pairing` branch, pair, - then switch back -- AndroidAPS from https://gitlab.com/jotomo/KEF (Branch `combo-scripter-v2`) - -TODO clean up stuff below - -How to use v1: -- Note: Documentation on how to use AndroidAPS is available at https://github.com/MilosKozak/AndroidAPS/wiki -- Configure the pumps settings as described here: https://gitlab.com/jotomo/AndroidAPS/wikis/pump-configuration -- On the pump, go to the _Menu settings_ menu and select _Standard_. This disables extended and multiwave and all but one basal rate. Those aren't supported by AAPS-Combo. -- Clone ruffy from git@gitlab.com:jotomo/ruffy.git and build from the `develop` branch. -- If ruffy crashes during pairing, check out the `pairing` branch, build it, pair the pump and then switch back to `develop` and build and install. - After that, it's not required to open ruffy, as Android will start ruffy automatically when its services are required. - Ruffy enables bluetooth discovery for 60s, if that's an issue, start the pairing process in ruffy and on the pump and switch to the bluetooth settings of your phone - and keep it open. This leaves the bluetoth in discovery mode as long as the screen is on. When pump shows the pairing code switch back - to ruffy and enter the displayed code. -- Clone AndroidAPS from git@gitlab.com:jotomo/AndroidAPS.git and build from the `develop` branch (see the AndroidAPS wiki for building options. -- Enter all treatments via AndroidAPS, since AAPS will be oblivious to boluses entered on the pump, as the pump history is not read yet -- There are no warnings regarding low cartridge/battery since we're not reading that data from the pump just yet (next version) -- Ensure you set the basal rate on the pump to the values of the profile used in AAPS, the profile isn't synced to the pump yet! Also don't forget to set/create a profile in AAPS **and** trigger a profile switch afterwards to activate it. -- Don't press any buttons while commands are running (BT logo is displayed on pump display), or the command will fail -- Let the ruffy app run in the background, don't interact with it, esp. not while AAPS is issuing commands to the pump. -- To change cartridge: stop the loop, wait for AAPS to cancel any running TBR (check Combo tab), suspend/stop the pump, change cartridge, start the pump again and re-enable the loop. To enable/disable the loop, long press on the "Closed loop" label on the home screen (try long pressing all items next to it too ...). -- AAPS guides first time users through objectives (tab must be set visible in config first, it's enabled irregardless of visibility). This ensures users learn to use AndroidAPS step by step as more and more advanced options are enabled. -- If a running TBR was cancelled on the pump or through the pump: press _Cancel TBR_ in in AAPS, so AAPS knows about this as well. AAPS will issue a _cancel TBR command_ to the pump, which the pump will ignore. AAPS will set a new TBR the next time the loop runs or is manually triggered. -- While all errors are reported, dealing with errors does not yet cover all cases. So after an error, the pump might be running a different TBR than what AAPS thinks the pump does. - Issue a TBR Cancel in AAPS to get them lined up. In case of boluses, check the pump to be sure (press check twice to enter the bolus history menu). -- Update this page if something is unclear or missing - -Testing v1: -- When there's an error, check the Combo tab, there should be a clue. -- Try to reproduce and open a ticket, add tag if any, otherwise add the hash of the commit used (right-click on the branch name select - _Copy revision number_ or use _git show_ on the command-line) the branch name. Attach the log to the issue and label it as a bug. - The logs can be found in _/storage/emulated/0/Android/data/info.nightscout.androidaps/_ - -v2 -Limitations +Limitations: - Extended bolus and multiwave bolus are not supported. +- Only one basal profile is supported. +- Setting a basal profile other than 1 on the pump, or delivering extended boluses or multiwave + boluses from the pump will disable the loop functionality for 6h as the the loop can't run + safely under those conditions. - If multiple boluses are given within a single minute, only one might be recognized. This is due to the Combo saving history records with minute-precision only. However, this case is only possible for very small boluses and is unlikely to occur in non-testing scenarios (e.g. bolusing from the pump and then immediately bolusing from AAPS). +- If a TBR is set on the pump, AAPS will cancel it. This is because it's not possible to determine + the start point of a TBR until it is finished or was cancelled at which point a record in the + pumps history is created. Before that, there is none and it's simply not possible to determine + the TBRs influence on IOB. Set TBR using AAPS instead. +- It's currently not possible to set the time and date on the pump (only reading the time - but + not the date - is supported raises a warning in AAPS to update the pump clock manually). + Thus, the pump's clock must be updated manually when the clocks are turned forward/backward + for daylight saving time. -Usage -- This is not a product, esp. in the beginning the user needs to monitor and understand the system, its limitations and how it - can fail. It is strongly advised NOT to use this system when the person using is not able to fully understand the system. -- The integration of the Combo with AndroidAPS is designed with the assumption that all inputs are made via AndroidAPS. - While there are checks that will detected boluses entered directly on the pump, which will be added to the history and be - included in IOB calulations, there are delays until AAPS becomes aware of those bolusus. It is therefore strongly adviced - to only bolus via AndroidAPS (it's also only possible to enter carbs via AndroidAPS, required for advanced loop functionality). -- It's recommended to enable key lock on the pump to prevent bolusing, esp. when the pump was used before and quick bolusing was a habit. -- When a BOLUS/TBR CANCELLED alert starts on the pump during bolusing or setting a TBR, this is caused by disconnect - between pump and phone. The app will try to reconnect and confirm the alert and then retry the last action. Therefore, - such an alarm shall be ignored (cancelling it is not a big issue, but will lead to the currently active action to - have to wait till the pump's display turns off before it can reconnect to the pump). - If the pump's alarm continues, the last action might have failed, in which case the user needs to confirm the alarm -- If AAPS crashes (or is stopped from the debugger) while pump comms where happening, it might be necessary to force close ruffy. - Restarting AAPS will also start ruffy again. \ No newline at end of file +Setup v2: +- Configure pump using 360 config software. + - Set/leave the menu configuration as "Standard" + - Set maximum TBR to 500% + - Disable end of TBR alert + - Set low cartridge alarm to your licking +- Get ruffy from https://github.com/jotomo/ruffy (branch `combo-scripter-v2`) +- Pair the pump, if it doesn't work, switch to the `pairing` branch, pair, + then switch back the original branch +- Get AndroidAPS from https://gitlab.com/jotomo/KEF (Branch `combo-scripter-v2`) +- Make sure you're basal rate is properly set on the pump + +Usage: +- This is not a product, esp. in the beginning the user needs to monitor and understand the system, + its limitations and how it can fail. It is strongly advised NOT to use this system when the person + using is not able to fully understand the system. +- The integration of the Combo with AndroidAPS is designed with the assumption that all inputs are + made via AndroidAPS. While there are checks that will detected boluses entered directly on the + pump, which will be added to the history and be included in IOB calulations, there are delays + until AAPS becomes aware of those bolusus (up to 15m). It is therefore strongly adviced + to only bolus via AndroidAPS (it's also only possible to enter carbs via AndroidAPS, required for + advanced loop functionality). +- It's recommended to enable key lock on the pump to prevent bolusing from the pump, esp. when the + pump was used before and quick bolusing was a habit. +- When a BOLUS/TBR CANCELLED alert starts on the pump during bolusing or setting a TBR, this is + caused by a disconnect between pump and phone. The app will try to reconnect and confirm the alert + and then retry the last action (boluses are NOT retried for safety reasons). Therefore, + such an alarm shall be ignored (cancelling it is not a big issue, but will lead to the currently + active action to have to wait till the pump's display turns off before it can reconnect to the + pump). If the pump's alarm continues, the last action might have failed, in which case the user + needs to confirm the alarm. +- When a low cartridge or low battery alarm is raised during a bolus, they are confirmed and shown + as a notification in AAPS. If they occur while no connection is open to the pump, going to the + combo tab and hitting the Refresh button will take over those alerts by confirming them and + showing a notification in AAPS. +- For all other alerts raised by the pump: connecting to the pump will show the alert message in + the Combo tab, e.g. "State: E4: Occlusion" as well as showing a notification on the main screen. + An error will raise an urgent notification. +- After pairing, ruffy should not be used directly (AAPS will start in the background as needed), + since using ruffy at AAPS at the same time is not supported. +- If AAPS crashes (or is stopped from the debugger) while AAPS and the pump were comunicating (using + ruffy), it might be necessary to force close ruffy. Restarting AAPS will start ruffy again. +- Read the documentation on the wiki as well as the docs at https://openaps.org +- Don't press any buttons on the pump while AAPS communicates with the pump (Bluetooth logo is + shown on the pump). + +Reporting bugs: +- Note the precise time the problem occurred and describe the circumstances and steps that caused + the problem +- Note the Build version (found in the About dialog in the app, when pressing the three dots in the + upper-right corner). +- Attach the app's log files, which can be found on the phone in + _/storage/emulated/0/Android/data/info.nightscout.androidaps/_ + +Components/Layers (developers): +- AndroidAPS +- ComboPlugin +- ruffy-spi (RuffyCommands interface to plug in lower layer) +- Scripting layer (ruffyscripter) / Command layer +- Driver layer (ruffy) \ No newline at end of file diff --git a/Testing-Combo.md b/Testing-Combo.md index 55c3329e3c..5b23ecc7b6 100644 --- a/Testing-Combo.md +++ b/Testing-Combo.md @@ -43,18 +43,13 @@ - [ ] Alerts - [ ] TDDs - [ ] Date/Time - - [ ] Time must be set properly upon app start if pump time is off - - [ ] Daylight saving time changes must be detected and pump time updated. - Basically any time change greater than a minute on the phone must be picked up - by AAPS and result in the pump's time being updated the next time communication - with the pump takes place, so disabling automatic time updates on the phone and - changing the phone clock manually should allow testing this - - [ ] XXX test year change, reading history - Set phone time to 31.12, 23:55, press Refresh in Combo tab to sync time to pump, - enter bolus - - [ ] XXX daylight saving time changes (2am twice) -- [ ] Disconnected pump - ... + - [ ] If time is off by more than 2m, a warning must be shown on the main screen whenever + a connection to the pump is established + - [ ] Since history records store the year, it must be inferred. Set phone and pump to something + like 31.21.17, 23:00, cause an alert, deliver a bolus, set a TBR, let the new year arrive + trigger the above events again and verify AAPS has correctly read them. +- [ ] Disconnected pump (pump unreachable) + - [ ] ... - [ ] Refilling cartridge - [ ] If TBR was cancelled by refilling, AAPS must detect this and update the TBR treatment accordingly