-
Notifications
You must be signed in to change notification settings - Fork 2
/
openaps.ini.prod
185 lines (156 loc) · 5.4 KB
/
openaps.ini.prod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
[device "pump"]
vendor = openaps.vendors.medtronic
extra = pump.ini
[device "cgm"]
vendor = openaps.vendors.dexcom
extra = cgm.ini
[device "oref0"]
vendor = openaps.vendors.process
extra = oref0.ini
[device "get-profile"]
vendor = openaps.vendors.process
extra = get-profile.ini
[device "calculate-iob"]
vendor = openaps.vendors.process
extra = calculate-iob.ini
[device "determine-basal"]
vendor = openaps.vendors.process
extra = determine-basal.ini
[report "settings/settings.json"]
device = pump
use = read_settings
reporter = JSON
[report "settings/bg_targets.json"]
device = pump
use = read_bg_targets
reporter = JSON
[report "settings/insulin_sensitivities.json"]
device = pump
use = read_insulin_sensitivies
reporter = JSON
[report "settings/basal_profile.json"]
device = pump
use = read_basal_profile_std
reporter = JSON
[report "settings/profile.json"]
use = shell
bg_targets = settings/bg_targets.json
settings = settings/settings.json
basal_profile = settings/basal_profile.json
reporter = text
json_default = True
max_iob = max_iob.json
device = get-profile
remainder = []
insulin_sensitivities = settings/insulin_sensitivities.json
[alias]
gather-profile = report invoke settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json settings/profile.json
monitor-pump = report invoke monitor/clock.json monitor/clock-zoned.json monitor/battery.json monitor/reservoir.json monitor/status.json monitor/temp_basal.json monitor/pumphistory.json monitor/iob.json
monitor-cgm = report invoke monitor/glucose.json
gather = ! bash -c "rm -f monitor/*; openaps gather-profile && openaps monitor-cgm && openaps monitor-pump && openaps report invoke monitor/iob.json"
preflight = ! bash -c "rm -f monitor/clock.json && openaps report invoke monitor/clock.json 2>/dev/null && grep -q T monitor/clock.json && echo PREFLIGHT OK || (mm-stick warmup || (sudo oref0-reset-usb && echo PREFLIGHT SLEEP && sleep 120); echo PREFLIGHT FAIL; exit 1)"
loop = ! bash -c "openaps monitor-cgm 2>/dev/null && ( openaps preflight && openaps gather && openaps enact && openaps status-upload && openaps upload-recent-treatments) || echo No CGM data."
retry-loop = ! bash -c "until( ! mm-stick warmup || openaps loop); do sleep 5; done"
enact = ! bash -c "openaps report invoke enact/suggested.json && grep -q duration enact/suggested.json && (openaps report invoke enact/enacted.json && cat enact/enacted.json ) || echo No action required"
status-upload = ! bash -c "openaps report invoke monitor/pumphistory-zoned.json && openaps report invoke monitor/upload-status.json && ns-upload $NIGHTSCOUT_HOST $API_SECRET devicestatus.json monitor/upload-status.json"
latest-ns-treatment-time = ! bash -c "nightscout latest-openaps-treatment $NIGHTSCOUT_HOST | json created_at"
format-latest-nightscout-treatments = ! bash -c "nightscout cull-latest-openaps-treatments monitor/pumphistory-zoned.json settings/model.json $(openaps latest-ns-treatment-time) > upload/latest-treatments.json"
upload-recent-treatments = ! bash -c "openaps format-latest-nightscout-treatments && test $(json -f upload/latest-treatments.json -a created_at eventType | wc -l ) -gt 0 && (ns-upload $NIGHTSCOUT_HOST $API_SECRET treatments.json upload/latest-treatments.json ) || echo \"No recent treatments to upload\""
[report "monitor/pumphistory.json"]
device = pump
hours = 4.0
use = iter_pump_hours
reporter = JSON
[report "monitor/clock.json"]
device = pump
use = read_clock
reporter = JSON
[report "monitor/iob.json"]
profile = settings/profile.json
use = shell
reporter = JSON
clock = monitor/clock.json
json_default = True
pumphistory = monitor/pumphistory.json
device = calculate-iob
remainder = []
[report "monitor/temp_basal.json"]
device = pump
use = read_temp_basal
reporter = JSON
[report "monitor/glucose.json"]
device = cgm
count = 288
use = iter_glucose
reporter = JSON
[report "enact/suggested.json"]
profile = settings/profile.json
use = shell
temp_basal = monitor/temp_basal.json
reporter = text
json_default = True
device = determine-basal
remainder = []
iob = monitor/iob.json
glucose = monitor/glucose.json
[report "enact/enacted.json"]
device = pump
input = enact/suggested.json
use = set_temp_basal
reporter = JSON
[device "ns-status"]
vendor = openaps.vendors.process
extra = ns-status.ini
[report "monitor/upload-status.json"]
suggested = enact/suggested.json
status = monitor/status.json
use = shell
reservoir = monitor/reservoir.json
reporter = JSON
battery = monitor/battery.json
clock = monitor/clock-zoned.json
json_default = True
device = ns-status
remainder = []
iob = monitor/iob.json
enacted = enact/enacted.json
[vendor "openapscontrib.timezones"]
path = .
module = openapscontrib.timezones
[device "tz"]
vendor = openapscontrib.timezones
extra = tz.ini
[report "monitor/clock-zoned.json"]
use = clock
reporter = JSON
astimezone = False
date = None
adjust = missing
input = monitor/clock.json
device = tz
timezone = EDT
[report "monitor/battery.json"]
device = pump
use = read_battery_status
reporter = JSON
[report "monitor/reservoir.json"]
device = pump
use = reservoir
reporter = JSON
[report "monitor/status.json"]
device = pump
use = read_status
reporter = JSON
[report "monitor/pumphistory-zoned.json"]
use = rezone
reporter = JSON
astimezone = False
date = timestamp dateString start_at end_at created_at
adjust = missing
input = monitor/pumphistory.json
device = tz
timezone = EDT
[report "settings/model.json"]
device = pump
use = model
reporter = JSON