-
Notifications
You must be signed in to change notification settings - Fork 1
/
openaps.ini
250 lines (212 loc) · 7.24 KB
/
openaps.ini
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
[device "curl"]
fields =
cmd = bash
vendor = openaps.vendors.process
args = -c "curl -s https://colinsbg.azurewebsites.net/api/v1/entries.json | json -e 'this.glucose = this.sgv'"
[report "settings/carb-ratios.json"]
device = my722
use = read_carb_ratios
reporter = JSON
[device "meal"]
fields = pumphistory profile clock
cmd = oref0
args = meal
vendor = openaps.vendors.process
[report "monitor/meal.json"]
profile = settings/profile.json
use = shell
reporter = text
clock = monitor/clock-zoned.json
json_default = True
pumphistory = monitor/pumphistory-zoned.json
device = meal
remainder = []
[device "auto-sens"]
vendor = openaps.vendors.process
extra = auto-sens.ini
[report "monitor/auto-sens.json"]
profile = settings/profile.json
use = shell
reporter = text
json_default = True
pumphistory = monitor/pumphistory-zoned.json
basal_profile = monitor/active_basal_profile.json
insulin_sensitivities = settings/insulin_sensitivities.json
glucose = monitor/glucose.json
device = auto-sens
remainder = []
[report "monitor/glucose.json"]
device = curl
use = shell
reporter = text
[report "last_ten_cgm_readings.json"]
device = curl
remainder = []
use = shell
json_default = True
reporter = JSON
[report "last_four_pump_hours.json"]
device = my722
hours = 4.0
use = iter_pump_hours
reporter = JSON
[alias]
last_four_hours = report invoke last_four_pump_hours.json last_ten_cgm_readings.json
gather-profile = ! bash -c "openaps report invoke settings/settings.json settings/bg_targets_mmol.json settings/insulin_sensitivities_mmol.json settings/basal_profile.json settings/carb-ratios.json settings/profile.json && openaps use units bg_targets settings/bg_targets_mmol.json > settings/bg_targets.json && openaps use units insulin_sensitivities settings/insulin_sensitivities_mmol.json > settings/insulin_sensitivities.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/pumphistory-zoned.json monitor/iob.json monitor/meal.json monitor/active_basal_profile.json
monitor-cgm = report invoke monitor/glucose.json
preflight = ! bash -c "rm -f monitor/clock.json 2>/dev/null && openaps use my722 mmtune && openaps report invoke monitor/clock.json && grep -q T monitor/clock.json && echo PREFLIGHT OK && rm -f preflight_fail.log || ( echo PREFLIGHT FAIL; echo -n X >> preflight_fail.log; exit 1 )"
gather = ! bash -c "rm -f monitor/*; openaps monitor-cgm && openaps monitor-pump"
loop = ! bash -c "(echo "" && date && (openaps preflight && openaps gather && openaps enact && cd /home/pi/zeroaps && ./log_complete.sh))"
enact = ! bash -c "rm -f enact/suggested.json; openaps report invoke enact/suggested.json && cat enact/suggested.json && grep -q duration enact/suggested.json && openaps report invoke enact/enacted.json && echo ENACT OK || echo ENACT SKIP "
ns-upload = ! bash -c "openaps report invoke monitor/upload-status.json && ns-upload $NIGHTSCOUT_HOST $API_SECRET devicestatus.json monitor/upload-status.json && openaps upload-recent-treatments"
retry-loop = ! bash -c "until(openaps loop); do sleep 10; done; openaps ns-upload; ./every_tenth_loop.sh"
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\""
[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"]
fields = iob temp_basal glucose profile auto-sens meal
cmd = oref0-determine-basal
vendor = openaps.vendors.process
args =
[report "settings/settings.json"]
device = my722
use = read_settings
reporter = JSON
[report "settings/bg_targets_mmol.json"]
device = my722
use = read_bg_targets
reporter = JSON
[report "settings/insulin_sensitivities_mmol.json"]
device = my722
use = read_insulin_sensitivities
reporter = JSON
[report "settings/basal_profile.json"]
device = my722
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 = monitor/active_basal_profile.json
reporter = text
json_default = True
max_iob = max_iob.json
device = get-profile
remainder = []
insulin_sensitivities = settings/insulin_sensitivities.json
carb-ratios = settings/carb-ratios.json
[device "units"]
vendor = openaps.vendors.units
extra = units.ini
[report "monitor/pumphistory.json"]
device = my722
hours = 28
use = iter_pump_hours
reporter = JSON
[report "monitor/clock.json"]
device = my722
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 "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
meal = monitor/meal.json
auto-sens = monitor/auto-sens.json
[report "monitor/temp_basal.json"]
device = my722
use = read_temp_basal
reporter = JSON
[report "enact/enacted.json"]
device = my722
input = enact/suggested.json
use = set_temp_basal
reporter = JSON
[vendor "mmeowlink.vendors.mmeowlink"]
path = .
module = mmeowlink.vendors.mmeowlink
[device "ns-status"]
vendor = openaps.vendors.process
extra = ns-status.ini
[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 = GMT
[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
[report "monitor/reservoir.json"]
device = my722
use = reservoir
reporter = JSON
[report "monitor/battery.json"]
device = my722
use = read_battery_status
reporter = JSON
[report "monitor/status.json"]
device = my722
use = status
reporter = JSON
[device "my722"]
vendor = mmeowlink.vendors.mmeowlink
extra = my722.ini
[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 = BST
[report "monitor/active_basal_profile.json"]
device = my722
use = read_selected_basal_profile
reporter = JSON