controlX2
controlX2 copied to clipboard
Android + Wear OS application for Tandem insulin pumps
ControlX2
Android app for phones and Wear OS watches which controls a Tandem t:slim X2 pump with PumpX2.
Warning
This application is for EXPERIMENTAL USE ONLY and can be used to MODIFY ACTIVE INSULIN DELIVERY ON YOUR INSULIN PUMP.
There is NO WARRANTY IMPLIED OR EXPRESSED DUE TO USE OF THIS SOFTWARE.
YOU ASSUME ALL RISK FOR ANY MALFUNCTIONS, BUGS, OR INSULIN DELIVERY ACTIONS.
It is NOT AFFILIATED WITH OR SUPPORTED by Tandem, Dexcom, or any other manufacturer.
It has not been officially approved for use and is provided as a RESEARCH TOOL ONLY.
![Bolus from phone Bolus from phone](https://user-images.githubusercontent.com/192620/213893870-9a3954db-7482-458f-955a-16e2f13a99d1.png)
![Bolus delivery from phone Bolus delivery from phone](https://user-images.githubusercontent.com/192620/213893894-a2e63958-3934-47cc-86f2-6eaa6d1212c9.png)
![Bolus from watch Bolus from watch](https://user-images.githubusercontent.com/192620/213893946-4aba8e56-cfa5-4166-9e7b-2cd570bd6e2a.png)
![Bolus delivery from watch Bolus delivery from watch](https://user-images.githubusercontent.com/192620/206879740-0f0b2a03-8b9d-4c63-b806-a19b23c44675.png)
Supported features:
- Viewing pump status information (IOB, cartridge amount, battery, basal rate)
- Viewing connected CGM information (current reading, arrow trend, sensor and transmitter status)
- Delivering a bolus (with units, carbs, and BG amounts) from wearable
- Delivering a bolus (with units, carbs, and BG amounts) from phone
- Accepting/rejecting insulin corrections
- Bolus calculator (to compute units based on entered carbs and BG)
- Bolus cancellation
Work in progress features:
- Watch face complications
- App background service stability
- Mobile UI
Planned features:
- Watch tile
- Show CGM history graph
- Send pump alerts/alarms as notifications
- Upload data to Nightscout
Demo video from phone:
![]() |
Demo video from watch:
![]() |
Phone Screenshots
![App home screen App home screen](https://user-images.githubusercontent.com/192620/213893772-d1fcd8e7-7e7f-41d3-ad47-3e856dfdeb93.png)
![Bolus window Bolus window](https://user-images.githubusercontent.com/192620/213893867-2e08401f-ca06-4cdc-8a32-9ac2a0cc1d3b.png)
![Bolus correction Bolus correction](https://user-images.githubusercontent.com/192620/213893870-9a3954db-7482-458f-955a-16e2f13a99d1.png)
![Bolus delivery Bolus delivery](https://user-images.githubusercontent.com/192620/213893894-a2e63958-3934-47cc-86f2-6eaa6d1212c9.png)
![Bolus notification Bolus notification](https://user-images.githubusercontent.com/192620/213893904-13b715cf-2bfa-46fb-b527-b641a4691ffa.png)
![Bolus cancellation Bolus cancellation](https://user-images.githubusercontent.com/192620/213893911-fac52b14-50f3-40ab-96ea-aacd9fedd63f.png)
![Bolus cancelled Bolus cancelled](https://user-images.githubusercontent.com/192620/213893923-152b07c7-3de3-45c0-b9d5-0c0d83a8af8b.png)
Wear OS Screenshots
Setup
Installing APK via GitHub Releases
This is the recommended installation option.
- On the right-hand side of the GitHub page for ControlX2, select "Releases"
- Under the most recent release, download the
mobile-release.apk
file for the phone application, and optionalwear-release.apk
file for the Wear OS application. - Install the APK file on your device(s).
Installing APK via GitHub Actions
-
Open this link to view the most recent GitHub Actions runs to the
main
branch. - Select the most recent entry from the list.
- Download the
mobile-release.apk
file for the phone application, and optionalwear-release.apk
file for the Wear OS application. - Install the APK file on your device(s).
Building from source
Clone the repo, open in Android Studio, and build the module for:
-
mobile
- Android phone application -
wear
- Android Wear OS application
Enable ADB debugging on your phone or watch and then select "Run" using the correct module:
Building with local PumpX2
Clone the PumpX2 repository and publish it to the local Maven repository. You can do this with:
$ git clone https://github.com/jwoglom/pumpx2
$ cd pumpx2
$ ./gradlew build
$ ./gradlew publishToMavenLocal
The PumpX2 library files will be published to $HOME/.m2/repository/com/jwoglom/pumpx2/
.
Then, set the use_local_pumpx2
Gradle property true
in either your command-line execution with ./gradlew build -Duse_local_pumpx2=true
,
or edit your local.properties
file for it to be reflected in Android Studio.
If the PumpX2 libraries are rebuilt, either bump the version number in both PumpX2 and ControlX2's gradle
configurations or run ./gradlew build --refresh-dependencies
in ControlX2. Otherwise, if the version
number was not bumped, rebuilding ControlX2 may still use a cached version of the old code from that version.