Updated outline to help understand stepping through Phases 0-4

109 views
Skip to first unread message

Dana Lewis

unread,
Nov 7, 2015, 1:58:58 AM11/7/15
to openaps-dev
Hi all, I have been working on some updated documentation to help with the fact that we have a blank page in the documentation for phase 3 and not a lot of detail to get people from phase 1 to 2, as well (i.e. what to do after you have added/invoked some reports).

I'm not 100% done writing it up, but I shared my "rainbow" outline with some folks tonight who said it was more helpful than the blank page, so I wanted to go ahead and share it here. There will still likely be tons of questions; and yes, I'm planning on submitting this to be part of our docs (with some more context and English writeup to expand on these areas, much like the existing documentation), but hopefully this will help people in the meantime and/or help visualize the big picture steps for building their system. (Once I've got a draft submitted in docs, it'll be easy for you to put in PRs to help clarify things, add to, improve this, etc.!)

With the below, you should be able to easily see which phase you're in. (I know a bunch of folks are at phase 1 and trying to get to phase 2.)

Phase 0: general setup
Phase 1: logging, cleaning, analyzing your data in real-time. perform unit tests.
Phase 2: practice closing the loop, build a manual system. more unit tests.
Phase 3: automate your system
Phase 4: iterate and improve.


    1.    Get baseline date (30 days of CGM data minimum and document recent a1c)
    2.    Get supplies
    3.    Set up Raspberry Pi
    4.    Set up openaps and dependencies

    5.    Configure openaps
    ⁃    initialize new environment
    ⁃    add devices, including virtual devices for oref0 tools
    ⁃    check devices are added properly and communication is enabled
    ⁃    add reports
    ⁃    invoke reports
    ⁃    create aliases
    ⁃    ^Consider: recent glucose data, recent pump history, the time, battery status, pump settings, carb ratios, the current basal profile, insulin sensitivities, blood glucose targets, and the status of the pump
    ⁃    ^Are there groupings of these reports that you imagine would be called at the same time? For example, in a closed-loop setup, the pump settings, blood glucose targets, insulin sensitivities, the basal profile, and carb ratios would not need to be checked as often as the current pump status, battery status, clock, recent blood sugars, and recent pump history.
    ⁃    back up your instance

    6.    Use oref0 tools to pull things together
    ⁃    utilize oref0 determine-basal device
    ⁃    ^Consider, for example, `openaps report add enact/suggested.json text determine-basal shell monitor/iob.json monitor/temp_basal.json monitor/glucose.json settings/profile.json`. Invoking that will generate a suggested.json, which can then be enacted with `pump set_temp_basal` in a `use` or report.
    ⁃    add error checking against stale data and other diagnostics
    ⁃    create a preflight check
    7.    Create a loop alias and retry logic.
    ⁃    Test output manually

    8.    Create schedule to run alias that collects data, validate inputs, calculate IOB, generate temp basal suggestion, and prepare to enact.
    ⁃    Utilize crontab

9. Test, improve, rinse, repeat.

I've also attached a ppt that also breaks things up by phases, but is along the same lines as the rainbow stuff above.

Big thank you to everyone who has provided feedback to date!

(And on a non-documentation note, if you haven't seen it yet, 0.8.2 of Nightscout now has visualizations of temp basals enabled from OpenAPS, and it's an awesome display that will help make it easy to see what the loop is doing in context with BGs!)

-Dana

--
Dana Lewis | http://diyps.org | @DanaMLewis | http://www.linkedin.com/in/danalewis
"Doing something for someone else is more important than anything you would do for yourself."
OpenAPS phase breakdown_Nov 6 2015.pptx
Reply all
Reply to author
Forward
0 new messages