Omnicore and AAPS setup - winemug/OmniCore GitHub Wiki

Prerequisites for installing Omnicore and AAPS

  1. Install Dexcom G6 patched or xDrip+ for CGM Data import 

    a. https://github.com/dexcomapp/dexcomapp

    b. https://jamorham.github.io/#xdrip-plus

  2. Setup and Configure Nightscout (not strictly necessary but sensible)

    a. http://www.nightscout.info/wiki/welcome

    b. Link xDrip+ or Dexcom patched app to send data to NightScout

Installing Omnicore

  1. Get latest Omnicore apk from appcentre (currently 6 July 2019 version). Install on your phone. This will work with android versions 7+, although check phone compatibility list first.

  2. Battery whitelist Omnicore. This is very important and normally needs doing in multiple places:

a) On Samsung S7 settings: device maintenance / battery / unmonitored apps (add omnicore to list) AND device maintenance / battery usage (small button toward top) / 3 dots at top r / optimise battery usage / all apps / turn off omnicore so not optimised.

b) On Samsung S9, need to search for battery monitoring AND also search for 'Optimizing Battery Usage'.

c) On Unihertz Atom whitelist in Duraspeed AND set them to not optimized in system/apps/battery.

Installing (special version of) Android APS

  1. Setup AndroidAPS is a similar procedure as for normal AndroidAPS – essentially you need to follow the ‘standard’ AAPS setup steps at https://androidaps.readthedocs.io/en/latest/EN/Installing-AndroidAPS/Building-APK.html but use the specific repository in the next step, and make the necessary edits before compiling. Detail follows:

  2. Open up Android Studio leveraging the GIT Project Control https://imgur.com/I3PKBnu

  3. Select the specific repo for an AAPS version of omnicore. There are a few choices here:

a) The latest (at 1/11/19) AAPS version 2.5.1, which includes an omnicore button on the AAPS home screen and includes tempoary basal rate fix (see below for what this means). Repo for this is https://github.com/jhaydraude/AndroidAPS/ with branch AAPS_Omnicore_JHD.

b) The older AAPS version 2.3, which excludes the omnicore button, and excludes the tempoary basal rate fix. Repo for this is https://github.com/winemug/AndroidAPS with branch omnicore_dev, and this commit: babca6e5b64897a3e2de5d95785811759476936b

c) As (b) but with the omnicore button. Repo for this is https://github.com/winemug/AndroidAPS with branch omnicore_dev, and this commit: b7e62807e34db19ceed35e52bfd73ed36eb71d61.

In general, (a) is the recommended choice. (b) and (c) have been kept for those that wish to use earlier versions, although note that these will 'time out' with AAPS functionality reducing after 30/60/90 days from the 2.5 release (late Oct 2019). Some have found (c) less stable than (b).

  1. Once you have chosen your repo, go to Android Studio, first open the correct repo

See https://imgur.com/KRmbYhv and https://imgur.com/BcokOJg

Then go to the git link at the bottom right, and check you see the correct branch.

In cases (b) or (c) (where you are selecting a specific commit hash) go to version control, and log. Search for the specific commit hash above. Then right click the correct commit, and select "Checkout Tag or Revision". See https://imgur.com/oMmD1fs and https://imgur.com/n4mDNCj

  1. If you chose repos (b) or (c), these have a bug that must be fixed, or it will likely deliver the wrong temp basal rates. Without this fix, temp basals will not be accounted for correctly in loop calculations and will not show correctly on the AAPS home screen.

To do this, edit the file: app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPdm.java in AndroidAPS (omnicore_dev branch) at lines 473, 484, 502, 521 (or somewhere close to it depending on the version of AAPS you're compiling) you'll see the line " .source(Source.PUMP);" Change that to ".source(Source.USER);" (there should be 4 changes).

Note that this step is not necessary if you chose repo (a).

  1. Then build your APK as per the standard AAPS instructions (linked above) and install it on phone.

  2. Run AAPS and in the Conf tab, select Omnicore as the pump.

Other Omnicore wiki pages

Omnicore Introduction

Omnicore use and troubleshooting

Omnicore DIY hardware