OpenAPS
reapply-cleanup

Overview

  • How OpenAPS works
    • How does the closed loop gather data?
    • How does it control the pump based on its decisions?
  • Overview of steps
  • Using this documentation
    • Formatting in this guide
    • The docs have their own search function!
    • Tips for navigating the documentation
  • Where to go for help
    • Slack
    • Gitter
    • Facebook
    • Issues on GitHub
    • Other online forums
    • Google Group

Hardware

  • Overview
  • Compatible Pumps
    • How to check pump firmware (check for absence of PC Connect)
    • Why do I need a certain pump firmware?
    • Can I downgrade my pump firmware?
    • Tips for finding a compatible pump
    • Word of warning: Pump repairs rendering pumps useless for looping
    • Tips for longer battery life
  • Compatible CGMs
    • Using a Dexcom CGM
    • Using the Medtronic CGM
    • Pulling CGM data from the cloud
    • Offline looping options
  • Your rig hardware options
    • What happens if you have multiple rigs?
  • Edison rigs
    • Parts you’ll need
      • Explorer Board Block
      • Edison
      • Lithium-ion polymer (LiPo) battery or other battery supply
      • Radio stick (only if not using Explorer board)
      • USB Cables
      • Optional: Micro USB to Micro USB OTG Cable for offline looping
      • Optional: antenna to increase pump - rig range
      • Nuts and Bolts
      • Cases
    • Building and understanding your Edison-based rig
      • Putting the Edison and Explorer Board together
      • Attach your battery into the explorer board plug
      • Optional: adding an antenna
      • Where is the power button?
      • Where is the radio?
      • What the lights mean and where they are
      • Charging the LiPo Battery
      • Optional: increasing range for North American pumps by cutting radio trace
  • Raspberry Pi rigs
    • Parts you’ll need
      • HAT:
      • PI
      • Battery
      • SD card
    • Hardware information for Pi-based setups with RFM69HCW (experimental)
      • Summary of what you need:
      • The Raspberry Pi Zero
      • RFM69HCW
      • Breadboard
      • Soldering
    • Hardware information for Pi-based setups with the Adafruit RHM69HCW Bonnet
      • Bonnet:
      • PI
      • Antenna
      • SD card
      • Optional - case for the bonnet
    • Hardware information for Pi-based setups with rewired TI-stick
    • Building and using your Pi/HAT rig
      • Buttons and Menu System
      • Button Navigation
      • Charging and power
      • LEDs
    • Pi-based setups with RFM69HCW (experimental)
      • Summary of what you need:
      • The Raspberry Pi Zero
      • RFM69HCW
      • Breadboard
      • Soldering

Getting ready

  • Set up Nightscout
    • Nightscout Introduction
    • How Nightscout and OpenAPS work together
      • What information is passed from rig to NS?
      • What information is passed from NS to rig?
    • Troubleshooting Nightscout issues
    • Nightscout Setup with Heroku
      • Battery monitoring
    • Nightscout Migrations
      • Switching from API_SECRET to token based authentication for your rig
      • Switching from Azure to Heroku
    • Using your Nightscout site
      • Understanding the OpenAPS pill
      • A note about Nightscout’s COB Pill
      • The IOB pill
      • The Basal pill
      • How to display basal changes (“render basal”)
      • How to automatically sync your profile from Autotune
      • How to display OpenAPS purple prediction/forecast lines
      • Understanding OpenAPS purple predictions/forecast lines
  • Collect your data & prepare
    • Store data - CGM, and ideally carbs and insulin
    • Practice good CGM habits
    • Optimize your settings with Autotune
    • Use your gear
      • Starting Medtronic pump
  • Make your first PR
  • Do some reading

Installing OpenAPS

  • Overview
  • Step 1: Flashing
    • What is flashing?
    • 1. Prerequisites
      • If you’re using a Raspberry Pi:
      • Windows PCs with under 6 GB of RAM
      • If you’re using a Mac:
    • 2. Downloading Jubilinux image
    • 3. Connecting cables to the Explorer Board and starting console
    • 4. Flashing image onto the Edison
      • If you’re using a Raspberry Pi - starting flash:
      • If you’re using a Mac - starting flash:
      • If you’re using a Windows PC - starting flash:
      • All platforms:
    • Troubleshooting
      • Troubleshooting the flash process
      • Troubleshooting rescue mode
      • Override DNS resolvers
      • IP address conflicts (able to ping external but not LAN addresses)
      • Interrupting Kernel Messages in Console/Screen Mode
  • Step 2: Wifi and dependencies
    • Intel Edison instructions
      • Prep Computer and Login to rig
      • Bootstrap script
      • Manual instructions for Intel Edison
    • Raspberry Pi instructions
      • Option A - Use Pi Bakery
      • Finish installation
      • Option B
  • Step 3: Setup script
    • Be prepared to enter the following information into the setup script:
    • Log rotate fix for versions < 0.6.1
    • 512 and 712 Pump users only - important extra setup steps
      • Most important step - make sure you said yes (y) in oref0-setup.sh
      • Edit the three (3) necessary files: basal, settings, and targets
  • Step 4: Watching logs
    • What you’ll see while waiting for your first loop (common non-error messages)
    • What you’ll see when you are looping successfully ~20+ minutes later!
    • Temp basals > 6.3, ISF > 255 or carb ratio > 25 with a x23 or x54?
    • Rig Logs and Shortcut commands - bookmark this section!
  • Step 5: Finishing setup
    • So you think you’re looping? Now keep up to date!
      • After you have looped for three consecutive nights:
    • Optional step: improving the battery life of your Raspberry Pi
    • Customizing your closed loop
  • Logging into the rig using a serial connection
    • Prerequisites for Windows users
    • Plugging in cables and starting console
    • If you’re using a Raspberry Pi or Mac for console:
    • If you’re using a Windows PC for console:
    • All platforms:
      • Not sure of your password?

How OpenAPS works

  • How OpenAPS makes decisions
    • Basic diabetes math
    • OpenAPS decision inputs
    • OpenAPS decision outputs
    • Understanding the purple prediction lines
    • Understanding the basic logic (written version)
      • eventualBG
      • IOBpredBGs
      • ZTpredBGs
      • COBpredBGs
      • UAMpredBGs
      • Blending relevant predictions
    • OpenAPS algorithm examples
      • Scenario 1 - Zero Temp for safety
      • Scenario 2 - Zero temp for safety
      • Scenario 3 - More insulin needed
      • Scenario 4 - Low temping for safety
    • Exploring further
  • Insulin on board calculations
    • First, some definitions:
    • Insulin Activity
    • What The Insulin Activity Assumptions Look Like
    • Cumulative Insulin Activity
    • Insulin on Board
    • Understanding the New IOB Curves Based on Exponential Activity Curves
    • What Do The Exponential Curves Look Like?
    • How Do The Exponential Curves Compare To The Bilinear Curves?
    • Technical Details
  • Understanding Autotune
    • The difference between autotune and autosens
    • How Autotune works
      • 1. oref0-autotune-prep:
      • 2. oref0-autotune-core
    • Understanding autotune output
      • Safety reminders
      • Example output from autotune
      • What you’ll see in autotune inputs and outputs
      • If you are DIY closed looping and looking at autotune:
      • If you are not DIY closed looping and are looking at autotune:
  • Understanding Autosens
    • The difference between autotune and autosens:
    • Understanding autosens logs
    • Reviewing autosens adjustments
    • Notes about autosensitivity

Usage and maintenance

  • How to enter carbs and boluses
    • Doing boluses
    • Entering carbs into OpenAPS
      • Offline carb entry
      • Online carb entry
  • Preferences and safety settings
    • Editing your preferences.json
    • Commonly-adjusted preferences:
      • max_iob:
      • max_daily_safety_multiplier:
      • current_basal_safety_multiplier:
      • Important Note About Safety Multipliers:
    • oref1-related preferences:
      • enableSMB_with_COB
      • enableSMB_with_temptarget
      • enableUAM
      • enableSMB_always
      • enableSMB_after_carbs
      • allowSMB_with_high_temptarget
      • maxSMBBasalMinutes
      • maxUAMSMBBasalMinutes
    • Exercise-mode related preferences:
      • exercise_mode
      • high_temptarget_raises_sensitivity
      • low_temptarget_lowers_sensitivity
      • sensitivity_raises_target
      • resistance_lowers_target:
      • half_basal_exercise_target
      • Pushover related preferences
      • Other preferences:
  • Monitoring OpenAPS
    • The main ways of monitoring your rig ONLINE include:
    • The main ways of monitoring your rig OFFLINE include:
    • Accessing your online rig via SSH
      • If your computer and rig are on the same wifi network
      • autossh Reverse Tunnel
    • Papertrail remote monitoring of OpenAPS logs (RECOMMENDED)
      • Get an account at Papertrail
    • System logging
      • Aggregating logs
      • Install auto restart at reboot
      • Optimize Papertrail use
      • Troubleshooting using Papertrail
    • Apache-chainsaw
      • To setup apache chainsaw on your computer, follow the following instructons:
    • Accessing your offline rig
      • Pancreabble - offline connection to Pebble watch
      • Hot Button - for Android users
      • Accessing your offline rig via SSH over Bluetooth
      • Accessing your offline rig via SSH when your phone and rig are connected to the same network
      • Offline web page from rig - for any phone user
      • Old instructions for an offline webpage. It is HIGHLY recommended that you use the method above for oref0 0.6.0 or greater.
  • Using your loop: common situations
    • How can you make adjustments to insulin delivery while on the go? - Optimizing with Temporary Targets
    • What do you do with the loop in airport security when you travel
    • What do you do with your loop when you travel across timezones? How do you update devices for a time zone change?
    • What do you do with the loop when you shower?
    • What do you do when you change sites?
    • What do you do when you exercise?
    • What do you do if you want to be off the pump for long periods during a day when you’re really active? Like for the beach or water park or sporting activity or similar?
    • What if I want to turn off the loop for a while?
    • How do I open loop?
    • How do I switch between insulin types, or switch to Fiasp? What should I change?
    • How do I switch to a different Medtronic pump?
  • Optimizing your settings
    • Using Nightscout reports
    • Using Autotune
    • Frequent negative IOB at the same time every day
    • Hills and valleys / Peaks and troughs / Up and down patterns
    • How to change your settings
  • Running Autotune
    • AutotuneWeb: the easiest way to run Autotune
      • What to expect when using AutotuneWeb
      • If it’s your first time using AutotuneWeb:
    • Running Autotune manually in OpenAPS
      • Running manually in your myopenaps directory to use recommendations
      • Running manually in a different directory to not use the results automatically
    • Running Autotune automatically in OpenAPS (default OpenAPS behavior)
      • How to copy over autotune files from another rig:
    • Running Autotune for suggested adjustments without an OpenAPS rig
      • Step 0: Decide where to run Autotune
      • Step 1: Install dependencies (instructions vary by setup)
      • Step 2: Install oref0
      • Step 3: Create a profile.json with your settings
      • Step 4: Run autotune on retrospective data from Nightscout
      • Step 5: Upload resulting profile to Nightscout
      • Alternate Step 5A: Upload resulting profile to Nightscout and switch to it
      • Optional configurations
      • Re-Running Autotune
      • Why Isn’t It Working At All?
    • What does this output from autotune mean?
    • Feedback, issues, and contributing
  • How to run oref0-setup.sh again
  • Update your rig in the future
    • Step 1 (Master): Install the new version
      • Alternative Step 1a (Dev): To get on “dev” branch to test even more recently added new stuff
      • Alternative Step 1b (Test a feature branch): Not recommended for initial setup
    • Step 2: Re-run oref0-setup
    • Step 3: Remember to set your preferences!
    • How to update Linux on your OpenAPS rig in the future
  • Wifi overview
    • Home Wifi
    • Home router
    • School wifi networks
    • Mifi device
    • Known wifi networks
    • Unknown wifi networks
  • Adding wifi networks to your rig
  • Bluetooth tethering
    • Benefit of Using BT Tethering to Your Phone’s Hotspot
    • Phone selection for BT Tethering
    • Configure Bluetooth tethering on Edison running Jubilinux [optional]
      • Install dependencies
      • Bluetooth setupUsage and maintenance/optimize-your-settings
      • Testing to make sure it works after you successfully did the above
      • Additional App requirement on Android to enable automatic BT Tethering reconnects
      • Additional Troubleshooting Steps for Some Carriers

Customizing and extra features

  • oref1: SMB and UAM
    • Understanding Super Micro Bolus (SMB)
    • Understanding Unannounced Meals (UAM)
    • Getting ready to enable oref1
    • Getting started
    • How to turn on Super Micro Bolus (SMB)
    • Troubleshooting
    • Pushover, Super Micro Bolus (SMB), and OpenAPS
      • If you are new to Pushover:
  • Useful apps for accessing your rig
    • IP address of rig
      • iNet or NetAnalyzer (iPhone)
    • Logging into Rig
      • Termius app (iPhone AND Android)
      • SimpleSSH
    • SerialBot (Android)
    • Nightscout Apps
      • Nightscout app (iPhone)
      • Glimpse Webpages (Apple Watch)
      • LePhant for Heroku (iPhone)
    • Review Logs
      • Frontail
  • IFTTT and Pebble buttons
    • IFTTT Setup for phones
      • Example IFTTT trigger content
      • Understanding the JSON in the Body:
    • Enable IFTTT in your Nightscout site
    • Install IFTTT app on your Android
    • ThisButton for the Pebble Watch - pictured at the very top of this page
    • Alexa integration
    • Google Assistant integration
    • Google Calendar integration
    • HTTP Request Shortcuts Integration
  • Offline Looping
    • Overview
    • Medtronic CGM users
      • Note about recovery from Camping Mode/Offline mode for Medtronic CGM users:
    • Dexcom CGM users
      • A. xDrip+ for Android users
      • B. Plug CGM into rig (easiest for G4/G5)
      • C. Send G5 or G6 BGs direct to rig (xdrip-js, Lookout/Logger)
      • Entering carbs while offline
      • Setting temporary targets offline
      • xDripAPS - offline looping for users of the xDrip+ Android app
  • iPhone Shortcuts
    • Get your “hashed API Secret”
      • Get your “hashed API Secret” ... while logged into your rig
      • Get your “hashed API Secret” ... while logged into your Nightscout site
    • Install “Shortcuts” in your iPhone
    • Create your first shortcut “Cancel Temp Target”
      • Text
      • Get Contents of URL
      • If
    • Customise your first shortcut “Cancel Temp Target”
    • Test your shortcut
      • Test with a bad URL
      • Test with a bad apisecrethash
    • Create more Shortcuts
      • Examples
      • Understanding the fields in these instructions:
    • A short note on entering a value

Troubleshooting

  • Overview and Linux reference
    • Introduction to using Linux
    • Directories on your rig
    • Generally useful linux commands
  • oref0-setup Troubleshooting
    • Re-run the script again
    • Should I enact cron?
    • How do I know if it is working?
    • It’s not working yet:
    • Running commands manually to see what’s not working from an oref0-setup.sh setup process
  • Common error messages
    • Permission not allowed
    • ValueError: need more than 0 values to unpack
    • Unable to upload to Nightscout
    • No JSON object could be decoded
    • json: error: input is not JSON
    • TypeError: Cannot read property ‘zzzz’ of undefined
    • Could not parse carbratio date when invoking profile report
    • Could not get subg rfspy state or version ccprog or cannot connect to CC111x radio
      • Using an Intel Edision + Explorer Block:
      • Using a Raspberry Pi + Explorer HAT:
    • Dealing with npm run global-install errors
    • Dealing with a corrupted git repository
    • Memory or disk space errors
    • Errors during openaps report invoke monitor/ns-glucose.json or ns-upload.sh
  • Wifi and hotspot issues
    • My wifi connection keeps dropping or I keep getting kicked out of ssh
    • I forget to switch back to home wifi and it runs up my data plan
    • I am having trouble consistently connecting to my wifi hotspot when I leave the house
    • I am not able to connect to my wireless access point on my iPhone
  • Pump-rig communications troubleshooting
    • Basics of communications
      • How can you see the results of your pump tuning?
      • What causes poor tuning results?
      • How often does the rig tune?
  • CGM-rig communications troubleshooting
    • First, know how you get data from BG to your rig
    • Second, troubleshoot the specific components of that setup
      • Medtronic CGM users
      • If you’re using Nightscout:
      • If you’re using xdrip+ or xdripAPS
      • If you’re plugging a CGM into the rig
  • Nightscout troubleshooting
    • Setting up your NS hosting site
    • mLab maintenance
      • Compact data
      • Cleanout data
    • Future data: all of a sudden, Nightscout is no longer showing treatments (bolus, carbs, finger BGs) on the graph or rendering my basals.
    • No data is being displayed, or no Nightscout pills are displayed
    • Nightscout pill info is incorrect
  • Medtronic button errors
  • Carelink troubleshooting

Give Back-Pay It Forward

  • Donate your data
    • About the OpenAPS Data Commons and OpenHumans
    • How to upload your data to the OpenAPS Data Commons
    • Notes about OpenHumans and other data
    • Frequently Asked Questions
  • Ways to Contribute to OpenAPS
  • Pay it forward to those less fortunate

Resources/Reference

  • For Clinicians
    • The steps for building a DIY Closed Loop:
    • How A DIY Closed Loop Works
    • How data is gathered:
    • How does it know what to do?
    • Examples of OpenAPS algorithm decision making:
      • Here are examples of the purple prediction lines, and how they might differ:
      • Here are examples of different time frames that influence the needed adjustments to insulin delivery:
      • Scenario 1 - Zero Temp for safety
      • Scenario 2 - Zero temp for safety
      • Scenario 3 - More insulin needed
      • Scenario 4 - Low temping for safety
    • Optimizing settings and making changes
    • Summary
  • History
  • Glossary
    • AP and OpenAPS high-level terminology
    • OpenAPS-specific terminology
  • Making a PR
    • Advanced tips for adding multiple images to documentation
  • Technical resources
    • Raspberry Pi
    • Git and GitHub
    • Linux Shell / Terminal
    • Python
    • Useful Apps
    • Markdown syntax
  • Switching between DIY systems
    • Other things you should know before starting:
    • Main Hardware Differences:
    • Assumptions for this Cheat Sheet Guide
    • High Level Recommended Rig parts list
    • Getting started on OpenAPS - the setup links
      • Installing OpenAPS on your rig
      • Nightscout
    • The big differences between Loop and OpenAPS:
      • Targets and algorithm differences
      • “MaxIOB” and other safety settings
      • Parents in particular may want to review the optional settings
      • Connectivity
      • Carbs
      • Boluses and how OpenAPS gets pump history
      • Multiple rigs
      • Troubleshooting
    • Running multiple kinds of DIY systems
      • Ready to get started with OpenAPS?
      • Where to get help with OpenAPS setup and maintenance:
OpenAPS
  • Docs »
  • Search
  • Edit on GitHub


© Copyright 2017, the #OpenAPS community Revision e12e3bf3.

Built with Sphinx using a theme provided by Read the Docs.