Skip to content

Commit 2b9ed0e

Browse files
authored
Merge branch 'master' into patch-1
2 parents 63cf992 + 25e7856 commit 2b9ed0e

File tree

9 files changed

+94
-62
lines changed

9 files changed

+94
-62
lines changed

README.md

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,27 @@
11
# Introduction
22

3-
* Easily navigable version of the [latest production docs are here.](https://openaps.readthedocs.org/en/latest/index.html)
4-
* Easily navigable version of the [in-development or "dev" docs can be found here.](https://openaps.readthedocs.org/en/dev/index.html)
5-
6-
## Welcome
7-
83
Welcome to the [openaps](https://github.com/openaps/) documentation!
94

10-
This documentation support a self-driven Do-It-Yourself (DIY) implementation of an artificial pancreas based on the [OpenAPS reference design](http://openaps.org/open-artificial-pancreas-system-openaps-reference-design/). By proceeding to use these tools or any piece within, you agree to the copyright (see [LICENSE.txt](/license.txt) for more information) and release any contributors from liability, and assume full responsibility for all of your actions and outcomes related to usage of these tools or ideas.
5+
This documentation supports implementing a self driven, Do It Yourself (DIY) artificial pancreas, based on the [OpenAPS Reference Design](http://openaps.org/open-artificial-pancreas-system-openaps-reference-design/). By proceeding to use these tools or any [openaps](https://github.com/openaps/) repositories, you agree to abide by the copyright agreement and release any contributors from any liability. You assume full responsibility for all actions and outcomes related to use of these tools or ideas. [Please read the copyright agreement before proceeding](https://github.com/openaps/docs/blob/master/license.txt).
6+
7+
* [Latest verified docs](https://openaps.readthedocs.org/en/latest/index.html)
8+
* [In-development or "dev" docs](https://openaps.readthedocs.org/en/dev/index.html)
119

1210
----------
13-
### A Note on DIY and the "Open" Part of OpenAPS
14-
This is a set of development tools to support a self-driven DIY implementation.
15-
Any person choosing to use these tools is solely responsible for testing and
16-
implementing these tools independently or together as a system.
17-
18-
The [DIY part of OpenAPS is important](http://bit.ly/1NBbZtO). While formal training
19-
or experience as an engineer or a developer is not a prerequisite, a growth
20-
mindset is required to learn to work with the "building blocks" that will help
21-
you develop your OpenAPS instance. Remember as you consider this project that
22-
this is not a "set and forget" system; an OpenAPS implementation requires
23-
diligent and consistent testing and monitoring to ensure each piece of the
24-
system is monitoring, predicting, and controlling as desired. The performance
25-
and quality of your system lies solely with you.
26-
27-
This community of contributors believes in "paying it forward," and individuals
28-
who are implementing these tools are asked to contribute by asking questions,
29-
[helping improve documentation](docs/docs/Resources/my-first-pr.md), and
30-
contributing in other ways.
11+
## A Note on DIY and the Open Part of OpenAPS
12+
13+
This is a set of development tools to support a self driven DIY implementation of an open source artificial pancreas, OpenAPS. Any individual choosing to use these tools is solely responsible for testing, verifying, and implementing each of these tools independently or together as a system.
14+
15+
The [DIY part of OpenAPS is important](http://bit.ly/1NBbZtO). A growth and learning mindset is required to work with the "building blocks" that will help develop your OpenAPS system. **This is not a set and forget system**; an OpenAPS system requires persistent attention. Users must do blood glucose tests frequently and watch continuous glucose monitors vigilantly, in order to ensure each piece of the system is monitoring, predicting, and controlling blood glucose safely, given user defined constraints. The performance and quality of your OpenAPS system relies solely on you.
16+
17+
This community of contributors believes in paying it forward, and individuals who are implementing these tools are asked to contribute by asking questions, [helping improve this documentation](docs/docs/Resources/my-first-pr.md), and contributing in other ways.
3118

3219

3320
----------
34-
### OpenAPS System Development Phases
21+
## OpenAPS System Development Phases
22+
23+
This documentation is organized into a series of phases that progressively build upon the openaps development tools towards a working OpenAPS system.
3524

36-
This documentation is organized into a series of phases that progressively
37-
build upon the openaps development tools towards a working OpenAPS system.
3825
The phases are as follows:
3926

4027
* **Phase 0: General Setup**<br>
@@ -43,17 +30,22 @@ Get the equipment you need; record baseline data, configure your hardware, insta
4330
* **Phase 1: Monitoring and Visualization Setup**<br>
4431
Prepare Nightscout or other visualization tools that are key for monitoring a closed loop.
4532

46-
* **Phase 2: Creating a a PLGM or open loop**<br>
33+
* **Phase 2: Creating a PLGM or open loop**<br>
4734
Use the setup script to build a basic loop; you can choose to run the loop manually ("open loop" mode), or automate your loop. At this stage, you should review and refine algorithms, test different scenarios for safety, etc.
4835

4936
* **Phase 3: Understanding Your Loop and Tweaking Settings**<br>
5037
Analyze the basal recommendations that are outputted from your system; run in a test environment for multiple days to configure safety settings that are right for you before moving forward.
5138

5239
* **Phase 4: Iterate and Improve the Closed Loop**<br>
53-
At the end of the previous stages and after 3 consecutive nights with no hardware failures and at least 1 night without low alarms, you can move into advanced features like meal-assist and auto-sensitivity tuning. Also improve the functionality of the system with additional software or hardware development
40+
At the end of the previous stages and after 3 consecutive nights with no hardware failures and at least 1 night without low alarms, you can move into advanced features like meal-assist and auto-sensitivity tuning, and improve the functionality of the system with additional software or hardware development.
5441

5542
----------
56-
You may be looking for:
57-
* How to [get help with your implementation](http://openaps.readthedocs.io/en/latest/docs/introduction/communication-support-channels.html) (hint: [go to Gitter here](https://gitter.im/nightscout/intend-to-bolus))
58-
* The ["old" directions](http://openaps.readthedocs.io/en/latest/docs/walkthrough/manual/index.html)
59-
* The [OpenAPS Reference Design](https://openaps.org/reference-design/)
43+
**You may be looking for:**
44+
45+
* [Live help with your implementation](http://openaps.readthedocs.io/en/latest/docs/introduction/communication-support-channels.html) (Hint: [Check out this Gitter channel](https://gitter.im/nightscout/intend-to-bolus))
46+
47+
* ["Old" setup directions](http://openaps.readthedocs.io/en/latest/docs/walkthrough/manual/index.html)
48+
49+
* [OpenAPS Reference Design](https://openaps.org/reference-design/)
50+
51+

docs/docs/Resources/switching-between-DIY-systems.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ See [this short list for what to buy for an Edison/Explorer Board OpenAPS rig.](
134134
### Troubleshooting
135135
* Loop - depending on environment and t1d's habits, RileyLink may require retuning to get Loop running again (automatically scheduled to retune at 14 minute intervals, but sometimes manual tunes are required).
136136
* OpenAPS - once setup and network connected, there is little required troubleshooting of rig. Most problems should self-resolve in <10 minutes, and if not a power button push usually solves the issue. Also, parents can login to rig remotely to troubleshoot, reboot, etc. (when using the same wifi network as the rig) using an iPhone app.
137-
* Is it looping? (Check on pump to see if temp basal has been set)
138-
* What do the logs say? (Check the OpenAPS logs and/or the OpenAPS pill; it will probably say why it is stuck)
139-
* Reboot the rig (either via logging in, or using the power button on the rig)
140-
* Make sure it’s connected to wifi
141-
* Make sure you’re in range of the rig; CGM data is flowing; etc.
137+
* Is it looping? (Check on pump to see if temp basal has been set)
138+
* What do the logs say? (Check the OpenAPS logs and/or the OpenAPS pill; it will probably say why it is stuck)
139+
* Reboot the rig (either via logging in, or using the power button on the rig)
140+
* Make sure it’s connected to wifi
141+
* Make sure you’re in range of the rig; CGM data is flowing; etc.
142142

143143
## Running multiple kinds of DIY systems
144144
* You can run different DIY systems (like Loop and OpenAPS) side-by-side, if you want to compare algorithms and how they behave.

docs/docs/walkthrough/phase-0/edison-explorer-board-Mac.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,16 +262,18 @@ These are the wifi networks that your rig will be able to use to stay connected
262262

263263
#### **1-10. Installing packages, SSH keys, and other settings**
264264

265-
ALRIGHTY...Your Edison is coming along. Now we are going to logout of the Edison “console” window, reboot, and login using an “ssh” command.
265+
ALRIGHTY...Your Edison is coming along. Now we are going to set aside the Edison “console” window (in case we can't get in via ssh), reboot, and login using an “ssh” command from a new Terminal window.
266266

267267
* Type `reboot`
268-
* Wait as many lines of action go by in the Terminal window...eventually you will get to a prompt. When you get that prompt. Go ahead and close out the window. Confirm that you want to “terminate”
268+
* Wait as many lines of action go by in the Terminal window...eventually you will get to a prompt.
269269
* Open a new Terminal window by pressing Command-N
270-
* Login to your Edison by entering `ssh [email protected]`
270+
* Login to your Edison by entering `ssh [email protected]` (changing edisonhost to the hostname you selected above)
271271
* Enter your password that you set earlier
272272

273273
![Login to your rig](../../Images/Edison/Rig_login_time.png)
274274

275+
* Run `ping google.com` to make sure your rig is online. If not, go back and check your /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf files above: you probably either missed a step or made a typo.
276+
275277
* Enter these three lines, one-at-a-time (the first line will run fast, and the second and third lines may take several minutes to complete)
276278

277279
`dpkg -P nodejs nodejs-dev`

docs/docs/walkthrough/phase-0/loops-in-progress.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,5 @@ List of people who are working on closed loops:
126126
- Rebecca Jervey (Philadelphia, PA)
127127
- Ivica Suran (Pazin, Croatia)
128128
- David Rimmer (Melbourne, Australia)
129+
- Kyle King (Opelika, AL)
129130
- Sonya Neufer

docs/docs/walkthrough/phase-2/accessing-your-rig.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,7 @@ Private IP addresses are assigned for devices and are unique to the connection.
6767
![ifconfig example](../../Images/ifconfig_example.png)
6868

6969
OR login to your router to see the list of connected devices and find your edison rig. Google your router’s brand name and “router login” (e.g., Netgear router login) to find out how to access your router’s administrative area.
70+
71+
## Shortcut to see IP and wifi network name that your rig is on
72+
73+
**Tip**: for rigs updated ([here is how](http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-2/update-your-rig.html) after 2/7/17, you can also now type `wifi` hit enter; it will bring up the last 100 lines of the network log so you can see your IP address AND the network name of the wifi that your rig is on.

docs/docs/walkthrough/phase-2/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Phase 2: Creating a PLGM Loop
1111
troubleshoot-oref0-setup
1212
accessing-your-rig
1313
on-the-go-wifi-adding
14+
update-your-rig
1415

1516

1617

docs/docs/walkthrough/phase-2/oref0-setup.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,44 +48,54 @@ If you have been looping for awhile, are setting up an additional rig, are comfo
4848

4949
## Step 2: Run oref0-setup
5050

51-
__Note:__ If you're using the 915MHz Explorer board, you'll need to log in as root to run oref0-setup.sh, as the mraa package doesn't yet support running under an ordinary user account. Also read below regarding port and other information to enter when running the script.
51+
__Note:__ If you're using the 915MHz Explorer board, you'll need to log in as root to run oref0-setup.sh, as the mraa package doesn't yet support running under an ordinary user account.
52+
53+
**Be prepared to enter the following items:**
54+
* directory name for your openaps
55+
* serial number of your pump
56+
* whether or not you are using an Explorer board
57+
* if not an Explorer board, and not a Carelink stick, you'll need to enter the mmeowlink port for TI stick or Explorer board (built in TI stick):
58+
* see [here](https://github.com/oskarpearson/mmeowlink/wiki/Installing-MMeowlink) for directions on finding your port
59+
* (if you're using a Carelink, you will NOT be using mmeowlink)
60+
* how you are getting CGM data
61+
* Nightscout URL and API secret
62+
* whether you want any of the oref0 advanced features
63+
* whether or not you want to automate your loop (using cron)
64+
65+
**Hint:** If you're not sure if you need something (advanced features), you probably don't, but for more information on the advanced features, see [here](http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-4/advanced-features.html). Also, scheduling something in cron means scheduling the loop to run automatically. So if you want an automated closed loop, Yes, you want to schedule it in cron. If you don't want an automated loop yet, you can always come back and run the `bash ~/myopenaps/oref0-runagain.sh` command later to automate. In addition, running the script again will update the various packages that the script installs.
66+
67+
**Read this note before running the script**: The very first time may take a while (10-15 minutes) for it to successfully read and pull a full history from your pump. Wait at least 15 minutes while watching the log (see below, in step 3 on this page) before asking for help. If it looks like it is giving you an error message, make sure you completed step 0 and 1 (see above!). If in doubt, run step 0 and step 1 again, and run the setup script (step 2) again as well. It will not hurt to run it multiple times, but you will probably want to comment out (add `#` in front of cron lines) or delete (`crontab -r` will delete the whole cron) any existing crons before adding another. Go on to the [next page](http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-2/troubleshoot-oref0-setup.html) for other ideas of troubleshooting. Read that page's troubleshooting tips before jumping into Gitter with questions about what to try next.
5268

5369
Most users will likely want to setup Bluetooth Tethering. Please see [Phase 4](https://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-4/bluetooth-tethering-edison.html) for the directions to run the setup script below for BT and pairing directions.
5470

71+
#### oref0-setup.sh script with Bluetooth
72+
5573
`cd && ~/src/oref0/bin/oref0-setup.sh --btmac=AA:BB:CC:DD:EE:FF` (where AA:BB:CC:DD:EE:FF is your phone's BT MAC address)
5674

75+
#### oref0-setup.sh script without Bluetooth tethering
76+
5777
Otherwise if you don't want Bluetooth tethering, run this:
5878

5979
`cd && ~/src/oref0/bin/oref0-setup.sh`
6080

6181
to run the script interactively, or get usage guidelines for providing inputs as command line arguments.
6282

63-
**Be prepared to enter the following items:**
64-
* Directory name for your openaps
65-
* serial number of your pump
66-
* the mmeowlink port:
67-
* /dev/spidev5.1 if using explorer board
68-
* see [here](https://github.com/oskarpearson/mmeowlink/wiki/Installing-MMeowlink) for other port options
69-
* how you are getting cgm data and cgm serial numbers if needed
70-
* nightscout host and api-secret if using nightscout
71-
* whether you want any of the oref0 advanced implementations
72-
* whether or not you want to automate your loop (using cron)
73-
74-
**Hint:** If you're not sure if you need something (advanced features), you probably don't, but for more information on the advanced features, see [here](http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-4/advanced-features.html). Also, scheduling something in cron means scheduling the loop to run automatically. So if you want an automated closed loop, Yes, you want to schedule it in cron. If you don't want an automated loop yet, you can always come back and run the `bash ~/myopenaps/oref0-runagain.sh` command later to automate. In addition, running the script again will update the various packages that the script installs.
75-
7683
**Worldwide pump users**
7784
If you are running from the master branch and not the WW branch, you'll need to follow the instructions at https://github.com/oskarpearson/mmeowlink/wiki/Non-USA-pump-settings to ensure that the correct frequency is used by mmtune.
7885

79-
The very first time may take a while (10-15 minutes) for it to successfully read and pull a full history from your pump. Wait at least 15 minutes when watching the log (see below, step 3) before asking for help. If it looks like it is giving you an error message, make sure you completed step 0 and 1 (see above!). If in doubt, run step 0 and step 1 again, and run the setup script (step 2) again as well. It will not hurt to run it multiple times, but you will probably want to comment out (add `#` in front of cron lines) or delete (`crontab -r` will delete the whole cron) any existing crons before adding another. Go on to the [next page](http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-2/troubleshoot-oref0-setup.html) for other ideas of troubleshooting. Read that page's troubleshooting tips before jumping into Gitter with questions about what to try next.
80-
81-
### Re-running the setup script
86+
### Re-running the oref0-setup.sh script
8287

8388
In the future, you may want to run the setup script again (such as when you want to come back and turn on new, advanced features). To do so, you will be able to run `bash ~/myopenaps/oref0-runagain.sh` to start running the setup script again with those options. (You may first want to `cat oref0-runagain.sh` to see what options you have saved in there. To run it again with different options, you can copy and paste and modify that output, or you can `nano oref0-runagain.sh` to change what's saved in the file to run the next time.)
8489

90+
If you are running this and the file does not exist, that just means you have not run oref0-setup since updating oref0 to 0.4.0 or later. You will need to run oref0-setup per the above section (with or without Bluetooth); then in the future you can use oref0-runagain.sh.
91+
8592
## Step 3: Watch the logs
8693

8794
When you decide to enable the new loop in cron, follow the log file (and watch Nightscout) to make sure that it is working properly:
8895

96+
(For rigs updated to master after 2/7/17 ([here is how to update](http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-2/update-your-rig.html)), you can simply type the letter "l" (aka the single letter `l`), or use the full tail command below to see the logs).
97+
8998
`tail -F /var/log/openaps/pump-loop.log`
9099

91100
Type control-C to exit the loop log.
101+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# How to update your OpenAPS rig in the future
2+
3+
You've probably heard about all kinds of cool new features that you want to try. If they're part of the master branch already, you just need to go enable them (usually by [re-running the oref0-setup script](http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-2/oref0-setup.html#re-running-the-setup-script)).
4+
5+
However, if it's a brand-new feature that's being tested or is recently added to master, you'll need to install the new version of `oref0` first. By the way, if you want to check which branch of oref0 you are currently running, `cd ~/src/oref0` and then `git branch`.
6+
7+
## Step 1: Install the new version
8+
9+
#### Recommended: To get the new stuff from the newest released master version of oref0
10+
11+
1. `cd ~/src/oref0 && git checkout master && sudo npm install -g oref0`
12+
13+
#### Optional: To get on "dev" branch to test even more recently added new stuff
14+
15+
Or, if the feature you want hasn't been released yet, and you want to test the latest untested development version of `oref0`, run:
16+
17+
1. `cd ~/src/oref0 && git checkout dev && git pull`
18+
2. `npm run global-install`
19+
20+
## Step 2: Re-run oref0-setup
21+
22+
Now that you've updated your `oref0` version, you can [re-run the oref0-setup script](http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-2/oref0-setup.html#re-running-the-setup-script) to use it.

0 commit comments

Comments
 (0)