Skip to content

Instantly share code, notes, and snippets.

@scottleibrand
Created March 23, 2016 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottleibrand/60afa95ccc1d8614e1b4 to your computer and use it in GitHub Desktop.
Save scottleibrand/60afa95ccc1d8614e1b4 to your computer and use it in GitHub Desktop.
Example of openaps devices, reports, and aliases you'll need to modify to run the advanced-meal-assist branch of oref0.
[
{
"extra": {
"fields": "pumphistory profile clock carbs glucose basal",
"cmd": "oref0",
"args": "meal"
},
"type": "device",
"name": "meal",
"meal": {
"vendor": "openaps.vendors.process",
"extra": "meal.ini"
}
},
{
"type": "report",
"name": "monitor/meal.json",
"monitor/meal.json": {
"profile": "settings/profile.json",
"carbs": "monitor/carbhistory.json",
"clock": "monitor/clock-zoned.json",
"reporter": "text",
"json_default": "True",
"use": "shell",
"pumphistory": "monitor/pumphistory-zoned.json",
"basal": "settings/basal_profile.json",
"device": "meal",
"remainder": "[]",
"glucose": "monitor/glucose.json"
}
},
{
"gather": {
"command": "! bash -c \"rm monitor/*; ( openaps get-bg | egrep \\\"reporting|Copied\\\" && echo -n R && openaps report invoke monitor/status.json 2>/dev/null >/dev/null && echo -n e && test $(cat monitor/status.json | json bolusing) == false && echo -n fr && openaps ns-meal-carbs && echo -n esh && ( (openaps monitor-pump || openaps monitor-pump) >/dev/null && echo ed ) || (echo; sleep 60; exit 1)) 2>/dev/null\""
},
"type": "alias",
"name": "gather"
},
{
"ns-meal-carbs": {
"command": "! bash -c \"curl -m 30 -s \\\"$NIGHTSCOUT_HOST/api/v1/treatments.json?find\\[created_at\\]\\[\\$gte\\]=`date -d \\\"3 hours ago\\\" -Iminutes`&find\\[carbs\\]\\[\\$exists\\]=true\\\" > monitor/carbhistory.json; exit 0\""
},
"type": "alias",
"name": "ns-meal-carbs"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment