These are chat archives for nightscout/intend-to-bolus

14th
Feb 2016
Aaron Michelson
@Aaybob
Feb 14 2016 02:22
blob
hi, just jumping in...... Redid visualize. I have a blue line with blue shade with no axis label. Is that the basal? Is it updating? And another question: how does one use the last item in the document about uploading treatement? Heres the picture of my new azure nightscout website.
Aaron Michelson
@Aaybob
Feb 14 2016 02:34
@danamlewis yes I have a pretty stable machine now. I also redid visualize for a new website. I didn't update openaps except for the variable definitions of nightscout and secret and put those in cron which I hadn't done before. For the ENABLE of auzue I have "careportal iob openaps pump". Is that enough? It's just at this point I can't tell if the basal is working and I didn't put "basal" in the ENABLE field. I set temp basal on the pump from 1.2 to 2.1 but didn't see the graph change and the "loop" is changing the basal frequently right now but I'm not seeing any changes. But the openaps pillbox is showing the recent basal changes.
Aaron Michelson
@Aaybob
Feb 14 2016 02:45
The question about uploading treatment. What does it do, why does it do what it does?
Aaron Michelson
@Aaybob
Feb 14 2016 03:01
my basal looks like its upside down with the shading. The pill box matches basal but I can't make sense of the blue graph.
blob
JaysonEwer
@JaysonEwer
Feb 14 2016 03:04
Hello @Aaybob, did you try one of the other Basal views? I'm using the Default and it seems to be working fine to me. Which Basal Render to you have selected in your NS settings panel?
Scott Leibrand
@scottleibrand
Feb 14 2016 03:15
@Aaybob that indicates your basal display is working, but you don't have any temp basals being successfully uploaded to NS to display: it's just displaying your normal basal schedule. looks like you have "icicle" (aka upside-down) mode: you can switch that in the preferences to default if you prefer
Aaron Michelson
@Aaybob
Feb 14 2016 03:20
Hi , yes was trying everything to get it working, have it on icicle. So if temp basal is not uploading, Okay, and that Okay and when I changed the basal on my pump it changed it on the graph, so I got a decrease or increase at 4:52 or something. But then what needs to happen for temp basal to upload?
OOhhh is that what the upload treatment is about?
Aaron Michelson
@Aaybob
Feb 14 2016 03:26
I was thinking maybe it was for doctors or parents.
Scott Leibrand
@scottleibrand
Feb 14 2016 03:27
yes, upload treatments uploads the "treatment events" from the pump: boluses and temp basals etc.
Aaron Michelson
@Aaybob
Feb 14 2016 03:27
Okay, so glad I'm one bit of code away from there.
Scott Leibrand
@scottleibrand
Feb 14 2016 03:28
:-)
Aaron Michelson
@Aaybob
Feb 14 2016 03:28
Do boluses get graphed?
Scott Leibrand
@scottleibrand
Feb 14 2016 03:29
they show up as little circles down on the CGM line
as do carbs, if you enter them through the bolus wizard
half circles actually, one direction for carbs and the other direction for boluses. blue and white.
Aaron Michelson
@Aaybob
Feb 14 2016 03:30
The basal graph we just understand it goes from zero to max basal and visually interpret?
it'll have units on it
Aaron Michelson
@Aaybob
Feb 14 2016 03:30
Yup, wow.
Scott Leibrand
@scottleibrand
Feb 14 2016 03:51
got all four of our rigs all ready to go offline for a week. had to resurrect clockset.sh, and also hacked together an oref0-html.js tool that prints the same info as oref0-pebble.js, but as HTML instead of JSON, for local display using SimpleHTTPServer. also set up one of our Pi's with a second wifi dongle configured to create a wifi hotspot, so all the other rigs can connect to that (when there's nothing better available like a phone hotspot) and we can connect to it with our phones to see what the loop is doing (via the HTML and JSON files above).
(we're setting sail for the Caribbean tomorrow) :-)
Aaron Michelson
@Aaybob
Feb 14 2016 03:52
GATHER OK
{"temp":"absolute","bg":147,"tick":-2,"eventualBG":113,"snoozeBG":113,"reason":"113 is in range. No temp required"}
No Action Required
STATUS UPLOADED
PREFLIGHT OK
GATHER OK
No Action Required
See how I get "No Action Required" from "enact" but I don't get the ususal data output of {"temp":"a.... Then the Status Upload fails. I think that means that "suggested" did not contain the word duration. Here's my enact:
enact = ! bash -c "rm -f enact/suggested.json; openaps report invoke enact/suggested.json 2>/dev/null >/dev/null && cat enact/suggested.json && grep -q duration enact/suggested.json && openaps report invoke enact/enacted.json || echo$
That's nice. Its so fun to get away.
But so why would status upload fail? The error is that suggested.json does not exist.
And invoke suggested.json errs with clock too old
Aaron Michelson
@Aaybob
Feb 14 2016 04:00
$ openaps gather
GATHER OK
pi@raspberrypi:~/pancreas/First-commit $ openaps report invoke enact/suggested.json
determine-basal://text/shell/enact/suggested.json
BG data is too old, or clock set incorrectly Sat Feb 13 2016 19:14:43 GMT-0800 (PST)
reporting enact/suggested.json
Scott Leibrand
@scottleibrand
Feb 14 2016 04:07
Check your glucose.json
looks like your last CGM reading was 45m ago
Aaron Michelson
@Aaybob
Feb 14 2016 04:08
},
{
"trend_arrow": "FLAT",
"system_time": "2016-02-13T22:52:56",
"display_time": "2016-02-13T18:54:43",
"glucose": 155
}
Aaron Michelson
@Aaybob
Feb 14 2016 04:13
{
"trend_arrow": "FLAT",
"system_time": "2016-02-13T23:12:56",
"display_time": "2016-02-13T19:14:43",
"glucose": 147
},
I'm confused
What is system time? Why are there two different times?
Scott Leibrand
@scottleibrand
Feb 14 2016 04:15
System time is whatever Dexcom set. Display time is what the receiver displays.
Changing the CGM clock only changes display time.
Aaron Michelson
@Aaybob
Feb 14 2016 04:16
So that's a normal glucose.json?
Scott Leibrand
@scottleibrand
Feb 14 2016 04:16
Does the CGM itself display anything more recent than 19:14?
each of those records looks fine. There should be one every 5m though.
If not, oref0 refuses to act on old data.
Aaron Michelson
@Aaybob
Feb 14 2016 04:17
Oh thanks, no, my second CGM receiver stopped working on my RPi2.
The sensor expired..OK thanks, I wanted to be sure everything worked before I moved on the the last step.....I'll have to change out my sensor now. Thanks again and have a great vacation.
Scott Leibrand
@scottleibrand
Feb 14 2016 04:20
Thx. Laters. :-)
Ben West
@bewest
Feb 14 2016 06:04
much closer
blob
marius a. eriksen
@mariusae
Feb 14 2016 06:13
@jasoncalabrese i’m assuming that the AR(2) coefficients in Nightscout are regressed from some standard data set? are there any available statistics on that regression? (curious how well it performs)
Matthias
@ceben80
Feb 14 2016 08:12
@bewest little misspellings in enact/enacted.json. Does not matter, it just wanted to say :wink:
a.JPG
Milos Kozak
@MilosKozak
Feb 14 2016 10:36
we're running currently higher basal rate (+30 - 50%) because of sickness. how do you handle such situation together with openaps and ns visualisation?
Scott Leibrand
@scottleibrand
Feb 14 2016 10:57
openaps/oref0#58 is designed to help with that.
Havent tested it yet in a resistance situation, but it detects sensitivity pretty well.
Right now, for example:
Adjusting basal from 1 to 0.79
Adjusting sens from 40 to 50.6
Based on last 12h of data
Showing median deviation of -0.7 mg/dL per 5m
Ben West
@bewest
Feb 14 2016 11:09
nifty stuff
blob
several rough edges still :$
Milos Kozak
@MilosKozak
Feb 14 2016 11:27
@scottleibrand i think we should have some option to do it manually and help openaps. Maybe i extend profile switching possibilities in ns. Danar driver is able to auto adjust base basal profile based on data from ns
Scott Leibrand
@scottleibrand
Feb 14 2016 11:29
That would require some implementation in decocare I think.
For us, the problem is recognizing sensitivity/resistance soon enough to matter. If we do detect, we can set basal patterns manually on the pump.
I am also skeptical of setting something as fundamental as basal profiles from web input.
Milos Kozak
@MilosKozak
Feb 14 2016 11:34
For me as t1p is ns primary source of all information. Need to make it working everything together
Any plans/ideas how to report sensitivity changes to ns?
Scott Leibrand
@scottleibrand
Feb 14 2016 11:36
Not really yet. There is also some discussion in omniaps slack about #machine-learning from historical NS data
Milos Kozak
@MilosKozak
Feb 14 2016 11:36
Theoreticaly ns supports it in 0.9 profiles
Scott Leibrand
@scottleibrand
Feb 14 2016 11:36
to learn basals and sensitivity over more than 24h
Matthias
@ceben80
Feb 14 2016 11:40
I have both a dexcom G4 receicer and a xDrip. xDrip is sending the glucose data to NS. Regarding the APS I have currently connected the G4 receiver to the RPi.
Due to the better signal quality of the dexcom receiver I would prefer this device for APS.
@all What is your opition?
Scott Leibrand
@scottleibrand
Feb 14 2016 11:41
Dex over USB is fastest and most reliable
If you want to use both: 'openaps alias add get-bg '! bash -c "( openaps monitor-cgm 2>/dev/null | tail -1 && grep -q glucose monitor/cgm-glucose.json && rsync -rtu monitor/cgm-glucose.json monitor/glucose.json && rsync -rtu monitor/cgm-glucose.json glucose.json) || ( find glucose.json -mmin -5 | egrep -q glucose && rsync -rtu glucose.json monitor/glucose.json && echo Copied glucose.json to monitor/glucose.json ) || ( openaps get-ns-glucose && grep -q glucose monitor/ns-glucose.json && mv monitor/ns-glucose.json monitor/glucose.json )"''
sorry: openaps alias add get-bg '! bash -c "( openaps monitor-cgm 2>/dev/null | tail -1 && grep -q glucose monitor/cgm-glucose.json && rsync -rtu monitor/cgm-glucose.json monitor/glucose.json && rsync -rtu monitor/cgm-glucose.json glucose.json) || ( find glucose.json -mmin -5 | egrep -q glucose && rsync -rtu glucose.json monitor/glucose.json && echo Copied glucose.json to monitor/glucose.json ) || ( openaps get-ns-glucose && grep -q glucose monitor/ns-glucose.json && mv monitor/ns-glucose.json monitor/glucose.json )"' || die "Can't add get-bg"
it's ugly, but that will use attached CGM if its BG is current or NS otherwise.
Matthias
@ceben80
Feb 14 2016 11:57
Great Scott, will try this
Scott Leibrand
@scottleibrand
Feb 14 2016 11:58
Actually that might be a more complicated than necessary older version...
Try openaps alias add get-bg '! bash -c "( openaps monitor-cgm 2>/dev/null | tail -1 && grep -q glucose monitor/cgm-glucose.json && rsync -rtu monitor/cgm-glucose.json monitor/glucose.json ) || ( openaps get-ns-glucose && grep -q glucose monitor/ns-glucose.json && mv monitor/ns-glucose.json monitor/glucose.json )"' || die "Can't add get-bg"
Hmm, no...
I'm all confused. Back in a minute.
Scott Leibrand
@scottleibrand
Feb 14 2016 12:05
Ok, that should be fine, as long as you don't have ??? on the CGM. The inverse approach, which actually checks for recency, is openaps alias add get-bg '! bash -c "( openaps get-ns-glucose && cat monitor/ns-glucose.json | json -c \"minAgo=(new Date()-new Date(this.dateString))/60/1000; return minAgo < 10 && minAgo > -5 && this.glucose > 30\" | grep -q glucose && mv monitor/ns-glucose.json monitor/glucose.json ) || ( openaps monitor-cgm 2>/dev/null | tail -1 && grep -q glucose monitor/cgm-glucose.json && rsync -rtu monitor/cgm-glucose.json monitor/glucose.json )"'
Not sure if I have a version that tries cgm first and does the json date check. Would need to use a different field than dateString.
Matthias
@ceben80
Feb 14 2016 17:56
@scottleibrand running openaps get-bg doesn't work. I don't have a copied monitor/glucose.json, so I am running this statement manually
pi@raspberrypi:~/myopenaps $ openaps get-ns-glucose && cat monitor/ns-glucose.json | json -c \"minAgo=(new Date()-new Date(this.dateString)))/60/1000;
-bash: syntax error near unexpected token `('
pi@raspberrypi:~/myopenaps $
Scott Leibrand
@scottleibrand
Feb 14 2016 17:57
You don't want the \" there just "
Matthias
@ceben80
Feb 14 2016 17:58
pi@raspberrypi:~/myopenaps $ openaps get-ns-glucose && cat monitor/ns-glucose.json | json -c "minAgo=(new Date()-new Date(this.dateString)))/60/1000;
>

very interesting....

pi@raspberrypi:~/myopenaps $ openaps get-bg
ns-glucose://text/shell/monitor/ns-glucose.json
reporting monitor/ns-glucose.json
pi@raspberrypi:~/myopenaps $

Now I have a monitor/glucose.json

pi@raspberrypi:~/myopenaps/monitor $ ls -l
total 44
-rw-r--r-- 1 pi pi   44 Feb 14 18:43 battery.json
-rw-r--r-- 1 pi pi   42 Feb 14 18:43 cgm-battery.json
-rw-r--r-- 1 pi pi  721 Feb 14 18:43 cgm-glucose.json
-rw-r--r-- 1 pi pi   21 Feb 14 18:43 clock.json
-rw-r--r-- 1 pi pi   27 Feb 14 18:43 clock-zoned.json
-rw-r--r-- 1 pi pi 3921 Feb 14 18:59 glucose.json
-rw-r--r-- 1 pi pi   97 Feb 14 18:44 iob.json
-rw-r--r-- 1 pi pi 1939 Feb 14 18:43 pumphistory.json
-rw-r--r-- 1 pi pi    5 Feb 14 18:43 reservoir.json
-rw-r--r-- 1 pi pi   69 Feb 14 18:43 status.json
-rw-r--r-- 1 pi pi   55 Feb 14 18:43 temp_basal.json
Matthias
@ceben80
Feb 14 2016 18:08
But starting the whole loop brings up
pi@raspberrypi:~/myopenaps $ openaps do-loop
cgm://JSON/battery/monitor/cgm-battery.json
reporting monitor/cgm-battery.json
pump://JSON/read_clock/monitor/clock.json
reporting monitor/clock.json
PREFLIGHT OK
pump://JSON/read_status/monitor/status.json
reporting monitor/status.json
tz://JSON/clock/monitor/clock-zoned.json
reporting monitor/clock-zoned.json
pump://JSON/reservoir/monitor/reservoir.json
reporting monitor/reservoir.json
pump://JSON/read_battery_status/monitor/battery.json
reporting monitor/battery.json
pump://JSON/read_settings/settings/settings.json
reporting settings/settings.json
pump://JSON/read_bg_targets/settings/bg_targets.json
reporting settings/bg_targets.json
pump://JSON/read_insulin_sensitivities/settings/insulin_sensitivities.json
reporting settings/insulin_sensitivities.json
pump://JSON/read_selected_basal_profile/settings/basal_profile.json
reporting settings/basal_profile.json
get-profile://text/shell/settings/profile.json
reporting settings/profile.json
cgm://JSON/iter_glucose/monitor/cgm-glucose.json
reporting monitor/cgm-glucose.json
pump://JSON/read_clock/monitor/clock.json
reporting monitor/clock.json
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
pump://JSON/iter_pump_hours/monitor/pumphistory.json
reporting monitor/pumphistory.json
calculate-iob://JSON/shell/monitor/iob.json
reporting monitor/iob.json
calculate-iob://JSON/shell/monitor/iob.json
reporting monitor/iob.json
determine-basal://text/shell/enact/suggested.json
module.js:340
    throw err;
          ^
Error: Cannot find module '/home/pi/myopenaps/monitor/glucose.json'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-determine-basal.js:33:24)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
reporting enact/suggested.json
pump://JSON/set_temp_basal/enact/enacted.json
enact/enacted.json  raised  No JSON object could be decoded
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.0.10', 'openaps-report')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 727, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1652, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/cli/__init__.py", line 44, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/EGG-INFO/scripts/openaps-report", line 75, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/vendors/medtronic.py", line 314, in main
    program = self.get_program(args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/vendors/medtronic.py", line 311, in get_program
    program = json.load(argparse.FileType('r')(params.get('input')))
  File "/usr/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
pi@raspberrypi:~/myopenaps $
Here my alias definitions
[alias]
gather-profile = report invoke settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json settings/profile.json
monitor-cgm = report invoke monitor/cgm-glucose.json
monitor-pump = report invoke monitor/clock.json monitor/temp_basal.json monitor/pumphistory.json monitor/iob.json
get-settings = report invoke monitor/status.json monitor/clock-zoned.json monitor/reservoir.json monitor/battery.json
enact = report invoke enact/enacted.json
invoke = report invoke
status-upload = ! bash -c "openaps report invoke monitor/upload-status.json && ns-upload $NIGHTSCOUT_HOST $API_SECRET devicestatus.json monitor/upload-status.json"
preflight = ! bash -c "oref0-reset-git && rm -f monitor/cgm-battery.json && openaps report invoke monitor/cgm-battery.json 2>/dev/null && 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)"
cleanup = ! bash -c "rm -f enact/* monitor/* settings/*"
gather = ! bash -c "openaps gather-profile && openaps monitor-cgm && openaps monitor-pump && openaps report invoke monitor/iob.json"
suggest = report invoke enact/suggested.json
get-ns-glucose = report invoke monitor/ns-glucose.json
wait-for-bg = ! bash -c "touch monitor/glucose.json; cp monitor/glucose.json monitor/last-glucose.json; while(diff -q monitor/last-glucose.json monitor/glucose.json); do echo -n .; sleep 10; openaps get-bg >/dev/null; done"
get-dex-glucose = report invoke monitor/glucose.json
do-loop = ! bash -c "openaps cleanup && openaps preflight && openaps get-settings && openaps gather && openaps suggest && openaps enact && openaps status-upload"
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\""
upload = ! bash -c "openaps preflight && ( openaps monitor-pump && openaps upload-recent-treatments && openaps get-settings) 2>/dev/null >/dev/null && echo -n \"Uploaded; most recent treatment event @ \" && openaps latest-ns-treatment-time || echo \"Error; could not upload\""
get-bg = ! bash -c "( openaps get-ns-glucose && cat monitor/ns-glucose.json | json -c \"minAgo=(new Date()-new Date(this.dateString)))/60/1000; return minAgo < 10 && minAgo > -5 && this.glucose > 30\" | grep -q glucose && mv monitor/ns-glucose.json monitor/glucose.json ) || ( openaps monitor-cgm 2>/dev/null | tail -1 && grep -q glucose monitor/cgm-glucose.json && rsync -rtu monitor/cgm-glucose.json monitor/glucose.json )"
Scott Leibrand
@scottleibrand
Feb 14 2016 18:20
Take a look at cgm-glucose.json. It's not getting copied to glucose.json. Is it too old?
Matthias
@ceben80
Feb 14 2016 18:25
I restarted the job, first cleanup which removes all files in /monitor. Here the output. no glucose.json copy
pi@raspberrypi:~/myopenaps/monitor $ ls -l
total 40
-rw-r--r-- 1 pi pi   44 Feb 14 19:23 battery.json
-rw-r--r-- 1 pi pi   42 Feb 14 19:22 cgm-battery.json
-rw-r--r-- 1 pi pi  725 Feb 14 19:23 cgm-glucose.json
-rw-r--r-- 1 pi pi   21 Feb 14 19:23 clock.json
-rw-r--r-- 1 pi pi   27 Feb 14 19:22 clock-zoned.json
-rw-r--r-- 1 pi pi   89 Feb 14 19:23 iob.json
-rw-r--r-- 1 pi pi 2278 Feb 14 19:23 pumphistory.json
-rw-r--r-- 1 pi pi    7 Feb 14 19:22 reservoir.json
-rw-r--r-- 1 pi pi   69 Feb 14 19:22 status.json
-rw-r--r-- 1 pi pi   55 Feb 14 19:23 temp_basal.json
Scott Leibrand
@scottleibrand
Feb 14 2016 18:26
Look at the actual contents. Use less or cat or something.
Matthias
@ceben80
Feb 14 2016 18:27
pi@raspberrypi:~/myopenaps/monitor $ cat cgm-glucose.json
[
  {
    "trend_arrow": "45_UP",
    "system_time": "2016-02-15T02:18:32",
    "display_time": "2016-02-14T19:18:32",
    "glucose": 228
  },
  {
    "trend_arrow": "45_UP",
    "system_time": "2016-02-15T02:13:32",
    "display_time": "2016-02-14T19:13:32",
    "glucose": 223
  },
  {
    "trend_arrow": "45_UP",
    "system_time": "2016-02-15T02:08:32",
    "display_time": "2016-02-14T19:08:32",
    "glucose": 217
  },
  {
    "trend_arrow": "45_UP",
    "system_time": "2016-02-15T02:03:32",
    "display_time": "2016-02-14T19:03:32",
    "glucose": 206
  },
  {
    "trend_arrow": "FLAT",
    "system_time": "2016-02-15T01:58:32",
    "display_time": "2016-02-14T18:58:32",
    "glucose": 197
  }
yes display_time is too old
Scott Leibrand
@scottleibrand
Feb 14 2016 18:28
Is your Dex in the same timezone as your Pi/Edison?
You can also try running openaps get-bg on its own.
Matthias
@ceben80
Feb 14 2016 18:30
yes as I started raspi-config I setup to "my" timezone (Rpi)
pi@raspberrypi:~/myopenaps $ openaps get-bg
ns-glucose://text/shell/monitor/ns-glucose.json
reporting monitor/ns-glucose.json

undefined:2
minAgo=(new Date()-new Date(this.dateString)))/60/1000; return minAgo < 10 &&
                                             ^
SyntaxError: Unexpected token )
    at Object.Function (<anonymous>)
    at funcWithReturnFromSnippet (/usr/local/lib/node_modules/json/lib/json.js:1226:13)
    at main (/usr/local/lib/node_modules/json/lib/json.js:1270:28)
    at Object.<anonymous> (/usr/local/lib/node_modules/json/lib/json.js:1677:5)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
reporting monitor/cgm-glucose.json
Should I post my "old" alias get-bg (no probs with this one)?

Here....

get-bg = ! bash -c "openaps monitor-cgm 2>/dev/null || ( openaps get-ns-glucose && grep -q glucose monitor/ns-glucose.json && mv monitor/ns-glucose.json monitor/glucose.json )"

Matthias
@ceben80
Feb 14 2016 18:36
One ")" too much, now it's working
pi@raspberrypi:~/myopenaps $ openaps get-bg
ns-glucose://text/shell/monitor/ns-glucose.json
reporting monitor/ns-glucose.json
pi@raspberrypi:~/myopenaps $
Scott Leibrand
@scottleibrand
Feb 14 2016 18:38
:-)
Matthias
@ceben80
Feb 14 2016 18:39
but no monitor/glucose.json when running on its own
....and no ns-glucose.json
pi@raspberrypi:~/myopenaps $ openaps get-bg
ns-glucose://text/shell/monitor/ns-glucose.json
reporting monitor/ns-glucose.json
pi@raspberrypi:~/myopenaps $ ls -l monitor/
total 44
-rw-r--r-- 1 pi pi   44 Feb 14 19:37 battery.json
-rw-r--r-- 1 pi pi   42 Feb 14 19:37 cgm-battery.json
-rw-r--r-- 1 pi pi  725 Feb 14 19:37 cgm-glucose.json
-rw-r--r-- 1 pi pi   21 Feb 14 19:37 clock.json
-rw-r--r-- 1 pi pi   27 Feb 14 19:37 clock-zoned.json
-rw-r--r-- 1 pi pi 3974 Feb 14 19:41 glucose.json
-rw-r--r-- 1 pi pi   98 Feb 14 19:38 iob.json
-rw-r--r-- 1 pi pi 2278 Feb 14 19:37 pumphistory.json
-rw-r--r-- 1 pi pi    7 Feb 14 19:37 reservoir.json
-rw-r--r-- 1 pi pi   69 Feb 14 19:37 status.json
-rw-r--r-- 1 pi pi   55 Feb 14 19:37 temp_basal.json
Scott Leibrand
@scottleibrand
Feb 14 2016 18:42
You might be missing the environment variables in cron then.
If the full loop works from command line but not from cron
Matthias
@ceben80
Feb 14 2016 18:44
I don't have a cron at the moment, I always started openaps do-loop from the command line - no problem with the "old" alias get-bg (posted above)
Due to the fact I will use the USB connected dex now at this time I am gonna use my old simply get-bg.....no worries
Matthias
@ceben80
Feb 14 2016 18:56
Now it's working again. Later I might be change the get-bg again. Now another question or request:
For a good understanding and their interrelationships I would be happy learn about the loop scheduling.
What are the meaningful jobs before or while looping?
I would be happy if you could help me here and provide information around scheduling, may be post meaningful crontab?!
Otherwise, thanks for today regarding the "get-bg" stuff :clap:
Scott Leibrand
@scottleibrand
Feb 14 2016 18:58
The most important thing is to have a full loop alias that works well, and good monitoring of what it's doing, before you schedule it.
Matthias
@ceben80
Feb 14 2016 19:03
Do not misunderstand. I don't want go live tomorrow :smile: ....for overall understanding, hence my question. Monitoring etc. is the most important thing, safty first!
Dana Lewis
@danamlewis
Feb 14 2016 19:08
:+1:
Just an FYI for all - we (@scottleibrand & I) are going to be offline until next Saturday
Hope everyone's having a nice Valentine's Day
JaysonEwer
@JaysonEwer
Feb 14 2016 19:09
Enjoy your time away!! :-)
Dana Lewis
@danamlewis
Feb 14 2016 19:11
Thanks! :)
Matthias
@ceben80
Feb 14 2016 19:13
Have both a good time!
Scott Leibrand
@scottleibrand
Feb 14 2016 19:19
@ceben80 once you have those, it's just a matter of scheduling your loop to run every few minutes, making sure you're passing it all the right environment variables, and making sure the output is being logged somewhere so you can watch it. There are examples people have previously pasted into Gitter, but the key thing is to learn how cron works more generally and how to use it to do those three things.
John Males
@johnmales
Feb 14 2016 19:32
Running into the issue again where downloaded CGM data from the pump is not current - from around 0230, whilst other reports are current, around 0630. CGM values on the pump are up to date.
Matthias
@ceben80
Feb 14 2016 19:34
@scottleibrand - yes will do so and come back with my achievements once it's been done :+1:
Peter Miller
@ochenmiller
Feb 14 2016 20:08
Happy Valentines day all! I love love love my openaps!
@danamlewis and @scottleibrand, have a great time away!
Peter Miller
@ochenmiller
Feb 14 2016 20:22
Canula's not really 5 days old!!
Scott Leibrand
@scottleibrand
Feb 14 2016 20:26
:-D thx!
Dragan Maksimovic
@dm61
Feb 14 2016 21:06
@danamlewis and @scottleibrand, have a great off-line vacation!
Dana Lewis
@danamlewis
Feb 14 2016 21:27
Thanks! :)