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

13th
May 2016
Paul Martin
@Spazholio
May 13 2016 00:37
@bewest Thanks for the link. I think my only confusion was due to the apparent prevalance of git repo corruption that seems to happen with this system. I use git fairly regularly (albeit basically) at work, and I don’t think I’ve ever encountered corruption. Is it due to the sudden poweroffs that can happen with these types of rigs?
Scott Leibrand
@scottleibrand
May 13 2016 00:49
we think that's the main cause, ya
Paul Martin
@Spazholio
May 13 2016 01:05
Well, it’s not happened to me yet, but if you have any debug code you’d like to have run to keep logfiles or whatever, just say the word.
On a completely unrelated note - I know that the Pebble watch is supported with OpenAPS, but is there a list of other watches that have been made to work with the system? I hear good things about the Pebble, but I’ve also heard that they can be flaky when it comes to having to constantly re-pair them (although that complaint might have been limited to the first gen watches).
Scott Leibrand
@scottleibrand
May 13 2016 01:07
that is still a problem with my new Pebble Time Steel.
not sure anyone is actively developing any Android Wear or Apple Watch apps for OpenAPS
there are various NS ones, but that's all I know of
Paul Martin
@Spazholio
May 13 2016 01:09
By “NS ones” you mean watches that don’t receive input pushed from OpenAPS but rather pull it from the NS site?
Scott Leibrand
@scottleibrand
May 13 2016 01:17
right
most of our OpenAPS pebble faces actually do that too, but they're aware of what OpenAPS data from NS is relevant and display that along with BGs
particularly Urchin
Paul Martin
@Spazholio
May 13 2016 01:24
Nice. Is there a list (along with images) of all the different faces? Considering picking one up tomorrow.
Oh, and does this functionality require Android? If so, that might make my decision for me. =/
Dana Lewis
@danamlewis
May 13 2016 01:27
Urchin = <3 you can customize it however you most prefer
(@mddub ;))
Scott Leibrand
@scottleibrand
May 13 2016 01:27
Urchin (and Pebble generally) don't care which phone OS you use
Paul Martin
@Spazholio
May 13 2016 01:30

@danamlewis Yeah, Urchin looks nice.

@scottleibrand Excellent. As much as I like to tinker with things, I still really dig my iPhone. Not to mention being entrenched in the ecosystem after many years. Really didn’t want to have to switch. =)

Dana Lewis
@danamlewis
May 13 2016 01:30
:)
Scott Leibrand
@scottleibrand
May 13 2016 01:31
we're 100% iphone, so you can be assured there will be good ios options for a good long while. :)
Paul Martin
@Spazholio
May 13 2016 01:34
:thumbsup:
Paul Martin
@Spazholio
May 13 2016 01:39
Switching gears - in NS, when I hover over the pump section (pill? Is that what it’s called in NS vernacular?) it says “Device: undefined”. Does that mean I’m missing something in a report somewhere?
Jason Calabrese
@jasoncalabrese
May 13 2016 02:32
There might not be current data, look at what YOUR_SITE/api/v1/devicestatus.json shows
Could also be time/timezone related
Paul Martin
@Spazholio
May 13 2016 02:39
The data should be fresh. I mean, the data’s less than 10 minutes old. The devicestatus.json shows
[
  {
    "pump": {
      "battery": {
        "status": "normal",
        "voltage": 1.34
      },
      "status": {
        "status": "normal",
        "timestamp": "2016-05-12T16:25:59.000Z",
        "bolusing": false,
        "suspended": false
      },
      "reservoir": 244.3,
      "clock": "2016-05-12T12:21:03-04:00"
    },
    "openaps": {
      "suggested": {
        "bg": 142,
        "temp": "absolute",
        "snoozeBG": 114,
        "timestamp": "2016-05-12T16:22:25.000Z",
        "reason": "Eventual BG 114>90 but Delta -5 < Exp. Delta -4.3; no temp to cancel",
        "eventualBG": 114,
        "tick": -5
      },
      "iob": {
        "timestamp": "2016-05-12T16:25:58.000Z",
        "bolusiob": 0.0086000317333332,
        "iob": 1.2853598817167,
        "activity": 0.037644620811287
      },
      "enacted": {
        "bg": 112,
        "temp": "absolute",
        "missing": [
          "duration",
          "rate"
        ],
        "timestamp": "2016-05-12T01:57:01.000Z",
        "snoozeBG": 116,
        "reason": "Eventual BG 93>90 but Delta -1 < Exp. Delta -0.5; no temp to cancel",
        "eventualBG": 93,
        "error": "missing required input fields",
        "input": {
          "bg": 112,
          "temp": "absolute",
          "snoozeBG": 116,
          "reason": "Eventual BG 93>90 but Delta -1 < Exp. Delta -0.5; no temp to cancel",
          "eventualBG": 93,
          "tick": -1
        },
        "tick": -1
      }
    },
    "created_at": "2016-05-13T02:37:42.848Z",
    "_id": "57353df60cd869a41f231ba6"
  }
]
I don’t see the “722” in the pump section. However…it shows the battery level is 1.34v, but NS shows 1.32v. So there’s a discrepancy there...
Jason Calabrese
@jasoncalabrese
May 13 2016 02:42
The timestamps in suggested look old
The pump and OpenAPS plugins handle multiple rigs and look at the recency of each part independently
So you might be posting old data
Paul Martin
@Spazholio
May 13 2016 02:43
That’s peculiar. Good catch. So…what does that indicate? What should I look at?
Jason Calabrese
@jasoncalabrese
May 13 2016 02:46
You team a full loop recently?
*ran
Paul Martin
@Spazholio
May 13 2016 02:47
I’ve been running a full loop via cron for a few hours now. It’s been failing for the last 10m, so I’m running a manual one now.
And it just finished and posted.
The JSON from devicestatus.json has the same stuff in the suggested section.
Scott Leibrand
@scottleibrand
May 13 2016 02:50
is the timestamp on the most recent entry in devicestatus.json now current?
it's currently Fri May 13 02:50:17 UTC 2016
Paul Martin
@Spazholio
May 13 2016 02:51
Sorry, device status.json has a few timestamps - which one are you referring to specifically?
Scott Leibrand
@scottleibrand
May 13 2016 02:51
the most recent one from the last uploaded loop
Paul Martin
@Spazholio
May 13 2016 02:53
The timestamp in the suggested section is the same as before.
And my enact/suggested.json file is zero length.
Hmm.
Loop’s running again - I didn’t see an errors previously, but let me see what it says about that file...
suggested.json is populated, but my devicestatus.json still has the old timestamp in the suggested section.
Paul Martin
@Spazholio
May 13 2016 02:58
I manually invoked the upload-status.json file and now it contains the right data. So…does that mean it’s not getting deleted and regenerated prior to uploading?
Scott Leibrand
@scottleibrand
May 13 2016 02:59
where in your loop do you invoke the upload-status.json report?
Paul Martin
@Spazholio
May 13 2016 03:00
blink
Nowhere.
…what the hell?
Scott Leibrand
@scottleibrand
May 13 2016 03:01
it should be part of the upload alias (or one of its child aliases) if you're using my scheme
Paul Martin
@Spazholio
May 13 2016 03:02
That’s the weird thing - I am using your scheme, and I’d like to think I wasn’t bold enough to make that kind of a change. Oh well - time to put it back in.
Scott Leibrand
@scottleibrand
May 13 2016 03:02
hmm, let me look then
which branch of openaps-sh did you use?
Paul Martin
@Spazholio
May 13 2016 03:02
I’m pretty sure I used the mmeowlink. I might have used the master though. But I doubt it.
I don't call it upload-status.json, I call it ns-status.json
but if upload-status.json is a report that does the right thing, your report is probably better than my alias > ns-status.json
so you can call openaps invoke upload-status.json instead of openaps upload-ns-status in the upload alias
Paul Martin
@Spazholio
May 13 2016 03:06
Well, I’m game to use your stuff, and the only reason I was thinking that it was in the upload-status.json file is because that’s the only place I saw the erroneous timestamp. That might be a faulty conclusion though. The ns-status.json file is showing the right data.
{
  "openaps": {
    "iob": {
      "iob": 0.89588229331556,
      "activity": 0.017551953580247,
      "bolusiob": 0,
      "timestamp": "2016-05-13T03:00:39.000Z"
    },
    "suggested": {
      "temp": "absolute",
      "bg": 133,
      "tick": -1,
      "eventualBG": 122,
      "snoozeBG": 122,
      "reason": "27mins @3.275 = 1.474 > req 0.64+0.3 U",
      "duration": 30,
      "rate": 3.1,
      "timestamp": "201    6-05-13T03:00:43.000Z"
    },
    "enacted": {
      "bg": 133,
      "temp": "absolute",
      "snoozeBG": 122,
      "recieved": true,
      "rate": 3.1,
      "reason": "27mins @3.275 = 1.474 > req 0.64+0.3 U",
      "eventualBG": 122,
      "timestamp": "2016-05-13T03:00:47.000Z",
      "duration": 30,
      "tick": -1
    }
  },
  "pump": {
    "clock": "2016-05-12T22:59:47-04:00",
    "battery": {
      "status": "n    ormal",
      "voltage": 1.32
    },
    "reservoir": 219,
    "status": {
      "status": "normal",
      "bolusing": false,
      "suspended": false,
      "timestamp": "2016-05-13T03:00:40.000Z"
    }
  }
}
Still no model info in there though...
Scott Leibrand
@scottleibrand
May 13 2016 03:08
why are you looking for model info?
Paul Martin
@Spazholio
May 13 2016 03:09
Honestly, it’s not a big deal at all. I was just noticing that when I look in NS, when I hover over the Pump pill, it shows “Device undefined”. I figured it’s supposed to show something there, so I’m missing something or I’ve got something misconfigured...
Scott Leibrand
@scottleibrand
May 13 2016 03:12
the Device field in that pill should say something like openaps://yourhostname
should be the first thing in ns-status.json: upload/ns-status.json:{"device":"openaps://rpi4","openaps":{"iob":{"iob": etc
Paul Martin
@Spazholio
May 13 2016 03:14
The word “device” does not appear in my upload/ns-status.json
Scott Leibrand
@scottleibrand
May 13 2016 03:14
maybe you're using an older version of oref0 that doesn't populate it?
didn't you say you're on master / packaged version?
Paul Martin
@Spazholio
May 13 2016 03:15
It’s possible. How does one upgrade oref0?
Scott Leibrand
@scottleibrand
May 13 2016 03:15
you could switch to dev, or you could wait a few days for me to get around to releasing it to master
working on the PRs for that right now in fact
there are a few things we wanted to make off-by-default first
Paul Martin
@Spazholio
May 13 2016 03:16
No worries. Once I do, how do I upgrade? Just re-run the command here https://github.com/openaps/oref0#installing ?
Scott Leibrand
@scottleibrand
May 13 2016 03:17
Paul Martin
@Spazholio
May 13 2016 03:18
Yes! That’s how I did it the first time. My mistake.
Scott Leibrand
@scottleibrand
May 13 2016 03:18
that is correct, no mistake
if you want to move to the beta stuff you could do quick-src instead of quick-packages, but only if you actually want to test out all the new stuff before we release it.
Paul Martin
@Spazholio
May 13 2016 03:21
Is quick-src considered dev or beta? As in, will it ever just flat-out break if I happen to upgrade at a time when you’re working on stuff or anything like that?
I’m a huge fan of running the latest and greatest, but also a fan of my rig continuing to work as intended. =)
Scott Leibrand
@scottleibrand
May 13 2016 03:22
quick-src and the dev branch are more beta than alpha. the alpha development for oref0 are happening in the advanced-meal-assist branch right now. and once we merge that to dev I'll probably make a new branch for whatever new feature I'm working on.
mmeowlink dev is the only thing I can think of that's been unstable recently, and that's not in quick-src.
I would also set up a second rig so you can switch one at a time and make sure all your reports still work with the new code before switching the other
Paul Martin
@Spazholio
May 13 2016 03:25
Yeah, I definitely plan on doing that. I just got everything mostly working this afternoon. Tonight’s gonna be my first time looping overnight. Once things seem ok there, I’ll probably fire up my 2nd RPi as a dev rig.
Scott Leibrand
@scottleibrand
May 13 2016 03:26
:+1: :-)
you'll very quickly get annoyed by carelink range and want to get a TI stick with mmeowlink for your new rig
Paul Martin
@Spazholio
May 13 2016 03:27
I’m curious how people are handling multiple rigs. I know people have a mobile, home, work rig, but…how? Do you just plug the Dexcom into whatever rig you’re using? Will my work rig continue looping while I’m at home, but the data will just be ignored by NS, or…?
Oh, I have a TI stick. I needed more than 3 freaking feet for range. =)
Or do people unplug their home rigs when they go to work or something similar?
Scott Leibrand
@scottleibrand
May 13 2016 03:29
we have 6 rigs all going in our one-bedroom apartment. :)
Paul Martin
@Spazholio
May 13 2016 03:29
…dude.
=)
Scott Leibrand
@scottleibrand
May 13 2016 03:29
the one by the bed has the dexcom plugged in, but the rest download BG from NS
https://github.com/scottleibrand/openaps-sh/blob/cgm-loop/setup.sh#L155 is a new thing in mmeowlink that helps with making sure they don't talk over each other. before that I had backoff logic in a modified ruby bin/mmtune and my preflight that did something similar
Paul Martin
@Spazholio
May 13 2016 03:31
So do they all also talk to the pump? I suppose since OpenAPS does logic to determine what to push to the pump, it doesn’t matter how many things are talking to it - the rigs shouldn’t be sending conflicting commands to the pump…right?
Scott Leibrand
@scottleibrand
May 13 2016 03:31
with my setup, the rigs won't upload unless they can successfully talk to the pump. I think @jasoncalabrese has them upload regardless, so he knows they're online and happy.
right: they all collect the same inputs from the pump, so they all come to the same conclusion about what temp to set
(if you only have a single CGM). If you have two CGM receivers calibrated differently, you get some slight disagreement between rigs about what to do, but NBD.
Paul Martin
@Spazholio
May 13 2016 03:32
Ok, I can see that.
Uh oh - slight issue...
[{"msg":"Optional feature Meal Assist enabled, but could not read required meal data.","file":"monitor/meal.json",”error”...
I…don’t recall enabling that, but maybe that’s the default? How do I make that not be a thing anymore?
Scott Leibrand
@scottleibrand
May 13 2016 03:33
hmm, are you actually on dev somehow?
Paul Martin
@Spazholio
May 13 2016 03:33
…I am now?
I just upgraded to it.
Scott Leibrand
@scottleibrand
May 13 2016 03:33
ah ok
we literally just merged the code that does that.
10 minutes ago :)
so you're already providing useful testing feedback. :)
Paul Martin
@Spazholio
May 13 2016 03:34
That’s kinda sorta the story of my life. :smiley:
Scott Leibrand
@scottleibrand
May 13 2016 03:35
can you paste me your determine-basal device and report configs? openaps device show determine-basal --json and openaps report show enact/suggested.json --json
once we collect all the diagnostics you'll probably want to switch back to master until we fix this. cd ~/src/oref0 && git checkout master should be sufficient I think.
Paul Martin
@Spazholio
May 13 2016 03:37
{"determine-basal": {"vendor": "openaps.vendors.process", "extra": "determine-basal.ini"}, "type": "device", "name": "determine-basal", "extra": {"fields": "iob temp_basal glucose profile autosens meal", "cmd": "oref0", "args": "determine-basal”}}
Scott Leibrand
@scottleibrand
May 13 2016 03:37
oh, and good job proving me wrong on dev being stable. ;-)
Paul Martin
@Spazholio
May 13 2016 03:38
{"type": "report", "name": "enact/suggested.json", "enact/suggested.json": {"profile": "settings/profile.json", "use": "shell", "temp_basal": "monitor/temp_basal.json", "reporter": "text", "json_default": "True", "meal": "monitor/meal.json", "autosens": "settings/autosens.json", "device": "determine-basal", "remainder": "[]", "iob": "monitor/iob.json", "glucose": "monitor/glucose.json”}}
Scott Leibrand
@scottleibrand
May 13 2016 03:38
huh, interesting. you do have meal assist configured.
guess that's from running my script
Paul Martin
@Spazholio
May 13 2016 03:38
By the time I have to call tech support on anything, the phrase, “Huh. I’ve…never seen that before.” has been said more times than is statistically probable.
Dana Lewis
@danamlewis
May 13 2016 03:38
that’s my line ;)
Scott Leibrand
@scottleibrand
May 13 2016 03:38
lol. that means you're doing their job for them before you call. :)
Dana Lewis
@danamlewis
May 13 2016 03:39
(i tend to get that from a certain device manufacturer)
Scott Leibrand
@scottleibrand
May 13 2016 03:39
so maybe you don't need to switch back to master then
maybe we just need to run the reports again to collect the meal data it wants.
Paul Martin
@Spazholio
May 13 2016 03:40
Well, I saw that at the end of my loop, so…I think the reports ran? But I’m happy to run whatever else to give this thing a kick.
Scott Leibrand
@scottleibrand
May 13 2016 03:40
try running the main loop alias again
Paul Martin
@Spazholio
May 13 2016 03:40
Sure thing.
Same result.
Scott Leibrand
@scottleibrand
May 13 2016 03:42
ok. what does your meal.json look like?
Paul Martin
@Spazholio
May 13 2016 03:42
My what now?
(I don’t have a meal.json file)
Jason Calabrese
@jasoncalabrese
May 13 2016 03:43
I've switched to only uploading after a successful loop
Scott Leibrand
@scottleibrand
May 13 2016 03:43
monitor/meal.json
and if it doesn't exist, what does openaps report invoke monitor/meal.json do?
Jason Calabrese
@jasoncalabrese
May 13 2016 03:43
the extra cron was causing some issues
Paul Martin
@Spazholio
May 13 2016 03:43
Invoking manually gets me {"carbs":0,"boluses":0,"mealCOB":9}
Scott Leibrand
@scottleibrand
May 13 2016 03:44
ok, good. openaps report invoke enact/suggested.json again now?
Jason Calabrese
@jasoncalabrese
May 13 2016 03:44
also Urchin doesn't handle older data exactly the same as NS
Paul Martin
@Spazholio
May 13 2016 03:44
determine-basal://text/shell/enact/suggested.json
{"carbs":0,"boluses":0,"mealCOB":9}
Optional feature Auto Sensitivity enabled.  Could not find specified auto-sens: settings/autosens.json
[SyntaxError: Unexpected end of input]
reporting enact/suggested.json
Scott Leibrand
@scottleibrand
May 13 2016 03:45
ah, progress....
try openaps invoke settings/autosens.json
Paul Martin
@Spazholio
May 13 2016 03:46
Yowza. It output a lot of stuff to the screen, only to give me {"ratio":1} in my autosens.json file.
Scott Leibrand
@scottleibrand
May 13 2016 03:46
that's good
now invoke enact/suggested.json again?
Paul Martin
@Spazholio
May 13 2016 03:47
determine-basal://text/shell/enact/suggested.json
Optional feature Meal Assist enabled, but could not read required meal data.
{"ratio":1}
reporting enact/suggested.json
Scott Leibrand
@scottleibrand
May 13 2016 03:47
hmm. is your meal.json still the same?
Paul Martin
@Spazholio
May 13 2016 03:47
No, it’s not there anymore.
Wait, crap.
Scott Leibrand
@scottleibrand
May 13 2016 03:47
do you have your loop running in cron?
Paul Martin
@Spazholio
May 13 2016 03:47
I think cron might be clobbering.
Scott Leibrand
@scottleibrand
May 13 2016 03:47
yeah
Paul Martin
@Spazholio
May 13 2016 03:47
Yeah, fixing that...
Scott Leibrand
@scottleibrand
May 13 2016 03:48
now what's interesting is openaps gather && openaps get-settings should be invoking these reports you just did manually
so unless your cron was clobbering your openaps loop before...
you should be able to just do openaps loop and it should refresh all this stuff
Paul Martin
@Spazholio
May 13 2016 03:48
Output of suggested.json is now
determine-basal://text/shell/enact/suggested.json
{"carbs":0,"boluses":0,"mealCOB":8}
{"ratio":1}
{"delta":1,"glucose":133,"avgdelta":1.667}
{"duration":0,"rate":0,"temp":"absolute"}
{"iob":0.87,"activity":0.0073,"bolussnooze":0,"basaliob":0.87,"netbasalinsulin":1.45,"hightempinsulin":1.45}
{"max_iob":5,"type":"current","dia":3,"current_basal":1.8,"max_daily_basal":2.2,"max_basal":6,"min_bg":90,"max_bg":110,"sens":20,"carb_ratio":5}
reporting enact/suggested.json
Scott Leibrand
@scottleibrand
May 13 2016 03:49
ok, good
so it's working, yay
Paul Martin
@Spazholio
May 13 2016 03:49
I don’t know why it’s not, but I’ll dig into my loop once you tell me that stuff’s looking good.
Scott Leibrand
@scottleibrand
May 13 2016 03:49
try just running the loop alias again
Paul Martin
@Spazholio
May 13 2016 03:49
Running...
Scott Leibrand
@scottleibrand
May 13 2016 03:49
it may have just been timing against cron or a comms failure
so I'm wondering if these new hard-failure modes @bewest added are adding any value, or if it'd be better to let the loop proceed when meal assist or autosens are configured but their input files are empty/missing
Paul Martin
@Spazholio
May 13 2016 03:51
It’s still missing meal.json in the loop. But autosens.json seems to still be there...
Scott Leibrand
@scottleibrand
May 13 2016 03:51
hmm. lemme check the meal.json logic in my aliases
Paul Martin
@Spazholio
May 13 2016 03:52
The only time in any alias I see meal.json mentioned is in the ns-meal-carbs alias. Which I don’t think is used in my loop…?
Scott Leibrand
@scottleibrand
May 13 2016 03:52
it's also a report called in openaps gather
but I think ns-meal-carbs might fail badly with ben's new stuff
Paul Martin
@Spazholio
May 13 2016 03:53
I don’t see it in there. I don’t remember doing it, but I might have tinkered with that one?
Scott Leibrand
@scottleibrand
May 13 2016 03:53
I bet it would work if you entered some carbs, but will fail when there aren't any carbs in pumphistory
k, checking
Paul Martin
@Spazholio
May 13 2016 03:54
I wonder if I used the one from master?
Scott Leibrand
@scottleibrand
May 13 2016 03:54
in monitor-pump
Paul Martin
@Spazholio
May 13 2016 03:55
It’s not in mine, but I can easily change it to match.
Scott Leibrand
@scottleibrand
May 13 2016 03:56
yeah, try that, if you want to test out meal assist
it will high-temp you more aggressively after a meal
(if you didn't bolus for the whole thing up front, or it sees you rising fast)
Paul Martin
@Spazholio
May 13 2016 03:57
Even during a bolus?
Huh. Interesting.
Well, I tend to be right on top of my numbers, and with this whole looping thing, I’m going to be hyper-attentive for a while, so I’ll give it a shot.
Scott Leibrand
@scottleibrand
May 13 2016 03:58
I'm not entirely happy with the meal assist algorithm in dev, which is why we made advanced-meal-assist. but it's better than nothing.
Paul Martin
@Spazholio
May 13 2016 04:00
Made changes, looping again.
Scott Leibrand
@scottleibrand
May 13 2016 04:00
I'm expecting it to fail again, but not sure
Paul Martin
@Spazholio
May 13 2016 04:01
No errors.
Scott Leibrand
@scottleibrand
May 13 2016 04:01
actually testing that scenario out on one of @danamlewis' rigs now
interesting. cool.
Paul Martin
@Spazholio
May 13 2016 04:01
I mean, now that I’m actually invoking meal.json it’s going through.
Scott Leibrand
@scottleibrand
May 13 2016 04:01
what does meal.json look like now?
Paul Martin
@Spazholio
May 13 2016 04:02
{"carbs":0,"boluses":0,"mealCOB":10}
Scott Leibrand
@scottleibrand
May 13 2016 04:02
ok. that 10 is a known cosmetic bug, and expected.
Paul Martin
@Spazholio
May 13 2016 04:02
Is that “mealCOB” mypothetical? I ask b…ok good.
Scott Leibrand
@scottleibrand
May 13 2016 04:03
if you had non-zero carbs it would calculate something reasonable for mealCOB
Paul Martin
@Spazholio
May 13 2016 04:03
Becaue I haven’t eaten, and if my rig was observing me not eating, that’s creepy. Awesome, but creepy.
Scott Leibrand
@scottleibrand
May 13 2016 04:03
but mealCOB is for display only in dev
Paul Martin
@Spazholio
May 13 2016 04:03
Ok.
And we’re SO far from the original issue, but my “device” is finally populated. =)
Scott Leibrand
@scottleibrand
May 13 2016 04:04
lol. because you uploaded to dev, remember?
so maybe @bewest's changes were helpful: we identified a misconfiguration as a result.
Paul Martin
@Spazholio
May 13 2016 04:06
Oh, I know why. We just went way down that rabbit hole to get there. =)
Scott Leibrand
@scottleibrand
May 13 2016 04:06
yeah, totally. found the rabbit, though, so I consider that a win. :)
so how's your rig looping now? still happy?
Paul Martin
@Spazholio
May 13 2016 04:08
No idea. Because SOMEONE forgot to re-enable cron...
Scott Leibrand
@scottleibrand
May 13 2016 04:08
lol. never done that before, nope, not me, no way... ;-)
Paul Martin
@Spazholio
May 13 2016 04:08
I’ll let you know in a few. =)
Question - your setup.sh uses the retry-loop alias. For my loop, I just used the loop alias. It’s pretty straightforward - every 5 minutes, loop and log the output. Can I ask why you use the retry-loop alias rather than just the loop?
(also, my loop appears to be running just fine)
Scott Leibrand
@scottleibrand
May 13 2016 04:11
retry-loop is just a bit more aggressive on timing
when you start dealing with comms failures as you move around, you may not want to wait 5 minutes to try again when some long command fails
Paul Martin
@Spazholio
May 13 2016 04:14
I’ll keep an eye on it. It looks like wait-loop invokes all the same stuff as the loop alias, more or less - is that accurate?
Scott Leibrand
@scottleibrand
May 13 2016 04:14
in a different order, yes
Paul Martin
@Spazholio
May 13 2016 04:14
Is the different order to try to get around whatever possibly caused loop to choke?
Scott Leibrand
@scottleibrand
May 13 2016 04:15
one thing it does is quick enacts: openaps/oref0#78
more just to try to get the bare minimum data required to do an enact without refreshing all the settings etc. first.
but if that fails, it goes back to the more conservative loop alias
Paul Martin
@Spazholio
May 13 2016 04:16
Huh, interesting.
Wait, I just realized something - 6 rigs?! How long do the batteries in your pump last?!
Scott Leibrand
@scottleibrand
May 13 2016 04:17
we use energizer lithiums, and they last for about a week of constant looping
the other thing you just enabled is auto-sensitivity detection: openaps/oref0#58
so if you're running more sensitive or resistant than your configured basal and ratios, it will adjust your basals and ISF accordingly
Paul Martin
@Spazholio
May 13 2016 04:18
The way I look at it is, as long as my loop doesn’t kill me, everything I get is usable data for you guys. =)
Oh and I just noticed something that might be intentional in the docs: http://openaps.readthedocs.io/en/master/docs/walkthrough/phase-0/loops-in-progress.html
Scott Leibrand
@scottleibrand
May 13 2016 04:19
well, my bar is a little higher than that: I want it to be obviously better (safer and more effective) than not looping :)
Paul Martin
@Spazholio
May 13 2016 04:20
"New to Github, and PRs? Check out how to submit your first PR.” <— none of that is a link to illustrate how to submit one’s first PR. =)
Dana Lewis
@danamlewis
May 13 2016 04:20
then you need to PR a fix that has a link added ;)
Paul Martin
@Spazholio
May 13 2016 04:20
Yeah, I knew that was coming. =)
Dana Lewis
@danamlewis
May 13 2016 04:20
tautology club, welcome ;)
do a PR, there’s confetti waiting!
Scott Leibrand
@scottleibrand
May 13 2016 04:21
readthedocs has a very nice search function. :)
Paul Martin
@Spazholio
May 13 2016 04:21
Just don’t give me a LMGTFY link, and we’re good. =)
Dana Lewis
@danamlewis
May 13 2016 04:21
deal!
Dana Lewis
@danamlewis
May 13 2016 04:22
I can poke him for you, @Spazholio
Scott Leibrand
@scottleibrand
May 13 2016 04:22
she will, too
Dana Lewis
@danamlewis
May 13 2016 04:22
::pokes::
Paul Martin
@Spazholio
May 13 2016 04:24
I’m reading, I’m reading! Quit poking, dammit. =)
Scott Leibrand
@scottleibrand
May 13 2016 04:24
no, she was poking me. really. in person. :)
Paul Martin
@Spazholio
May 13 2016 04:24
I know. That’s…what I meant. cough
goes back to reading docs
Dana Lewis
@danamlewis
May 13 2016 04:24
lol
scottleibrand @scottleibrand waits for someone to tell us to get a room, so I can point out that this is our room. ;-)
Dana Lewis
@danamlewis
May 13 2016 04:25
::rolls eyes::
JaysonEwer
@JaysonEwer
May 13 2016 04:29
:-D
Quick question if you guys still have your clothes on....
Dana Lewis
@danamlewis
May 13 2016 04:29
Not a guy, but I am wearing clothes. Do you want an answer?
JaysonEwer
@JaysonEwer
May 13 2016 04:29
Is this a normal message:
edison@Ewer-Edison-OpenAPS-31:~/openaps$ openaps use pump model
subg_rfspy status: OK
Version: subg_rfspy 0.8
No handlers could be found for logger "mmeowlink.handlers.stick"
"522"edison@Ewer-Edison-OpenAPS-31:~/openaps$
Dana Lewis
@danamlewis
May 13 2016 04:30
Yes, but we get that Q so often someone should go add some logger handlers to mmeowlink
JaysonEwer
@JaysonEwer
May 13 2016 04:30
I"m sorry, @danamlewis I should say, you KIDS....is that acceptable?
Dana Lewis
@danamlewis
May 13 2016 04:30
LOL. touche.
JaysonEwer
@JaysonEwer
May 13 2016 04:30
:-P
I FINALLY have my edison with TI stick talking to my pump!!!
Dana Lewis
@danamlewis
May 13 2016 04:31
woohoo!
JaysonEwer
@JaysonEwer
May 13 2016 04:31
yeehaw!
so I just disregard the No handlers and it doesn't impact the operation at all, correct?
Dana Lewis
@danamlewis
May 13 2016 04:32
Correct
JaysonEwer
@JaysonEwer
May 13 2016 04:33
Very good. Thank you.
Dana Lewis
@danamlewis
May 13 2016 04:34
:+1:
Paul Martin
@Spazholio
May 13 2016 04:37
Ok, I’m having what might be a stupid moment here. In the docs that @scottleibrand so helpfully pointed me to, in the second section (after I’ve forked and made the changes), step 2 says: "Select dev from the branch drop down on the upper left (since that’s where we’d like the changes to go to)” and step 3 says: "Press the pull request button”. If I select the “dev” branch, I don’t have a “Pull Request” button. But if I leave it on master, I do.
Scott Leibrand
@scottleibrand
May 13 2016 04:37
are you pointing it at your dev, or openaps/dev?
Paul Martin
@Spazholio
May 13 2016 04:38
Step 1 of that same section says, "Go to https://github.com/openaps/docs”. So that’s where I am.
Scott Leibrand
@scottleibrand
May 13 2016 04:38
paste the URL it generates?
Paul Martin
@Spazholio
May 13 2016 04:39
I don’t follow?
the url of the page should reflect what it's comparing to what
Paul Martin
@Spazholio
May 13 2016 04:40
Well, I haven’t clicked the “Pull Request” button, since it wasn’t visible on dev. Should I click the one I see on master?
Scott Leibrand
@scottleibrand
May 13 2016 04:40
the compare thing should be URL of the page you're looking at that has or doesn't have a pull request button
or just do a screenshot if that's easier
Paul Martin
@Spazholio
May 13 2016 04:42
Screen Shot 2016-05-13 at 12.41.18 AM.png
Now when I drop down and choose dev:
Screen Shot 2016-05-13 at 12.42.12 AM.png
Scott Leibrand
@scottleibrand
May 13 2016 04:42
oh, I see
we should probably update the first-pr doc to suggest that instead
Paul Martin
@Spazholio
May 13 2016 04:44
Probably wouldn’t hurt. =)
Dana Lewis
@danamlewis
May 13 2016 04:44
dev docs just got updated with something to this page
so it might cover this already? or if not, you’ll want to edit on top of that
Paul Martin
@Spazholio
May 13 2016 04:46
Hey neat, it worked. =)
Scott Leibrand
@scottleibrand
May 13 2016 04:47
bonus points if you make the first-pr link relative instead of absolute. :)
just update it and commit to your branch, and it'll update the PR automatically
Paul Martin
@Spazholio
May 13 2016 04:48
You read my mind.
Scott Leibrand
@scottleibrand
May 13 2016 04:49
mental FAQ :)
Scott Leibrand
@scottleibrand
May 13 2016 04:59
not quite right: it's 404 now
Paul Martin
@Spazholio
May 13 2016 04:59
Crap. What’d I miss?
I thought I followed what it said here: https://github.com/blog/1395-relative-links-in-markup-files
I think you were using the old url from master, not the current location in dev
Paul Martin
@Spazholio
May 13 2016 05:02
I swear, give me PHP/HTML/CSS, and I can hold my own. Github and Markdown? It’s like I’m drooling or something.
Scott Leibrand
@scottleibrand
May 13 2016 05:03
lol
Paul Martin
@Spazholio
May 13 2016 05:05
Ok, so if I understand correctly, the link should be changed to "docs/docs/Resources/my-first-pr.md”?
Scott Leibrand
@scottleibrand
May 13 2016 05:05
something like that. try it and see if it works
Paul Martin
@Spazholio
May 13 2016 05:05
k
Now?
Paul Martin
@Spazholio
May 13 2016 05:07
Hmm.
Scott Leibrand
@scottleibrand
May 13 2016 05:07
need some ../../ ?
or a leading /
Paul Martin
@Spazholio
May 13 2016 05:08
Oh! It’s relative to the directory I’m in, not to the branch itself. Hang on...
Dana Lewis
@danamlewis
May 13 2016 05:10
Yep
Paul Martin
@Spazholio
May 13 2016 05:11
Ok, that’s got it.
Scott Leibrand
@scottleibrand
May 13 2016 05:14
merged. :)
now you can go fix the first-pr directions to start from your own fork instead of openaps/dev, if you aren't github'd out for the night. :)
and if it hasn't already been done
looks like it has not
Dana Lewis
@danamlewis
May 13 2016 05:19
:confetti_ball: @Spazholio
Paul Martin
@Spazholio
May 13 2016 05:19
Woooooo!
Scott Leibrand
@scottleibrand
May 13 2016 05:20
@Spazholio once you loop successfully overnight on dev, we could use a :+1: on merging it to master. PR is openaps/oref0#105
Paul Martin
@Spazholio
May 13 2016 05:21
Sure thing.
Scott Leibrand
@scottleibrand
May 13 2016 05:25
@/all we could use some beta testers of oref0/dev before merging openaps/oref0#105 and putting out a new package release, hopefully this weekend. If you'd like to help, please run quick-src.sh (http://openaps.readthedocs.io/en/dev/docs/walkthrough/phase-0/openaps.html#installing-from-source) on an extra rig (or on your main rig if you're feeling brave and have time to troubleshoot any issues) to update to the latest and test it out. If everything looks good, please note whether you were previously on master or dev and put a :+1: into the PR. If you have any issues, please speak up here first, and in the PR comments if you think it might be a release blocker.
JamOrHam
@jamorham
May 13 2016 08:25
Does everyone else have a massive gitter sidebar now? When I click to "toggle left menu" it removes the useful bit and leaves the useless bit of the gui on the screen. Bleurgh
Hristina Dimova
@xpucuto
May 13 2016 08:52
My gitter updated yesterday and I dont like it either :(
Colin Lennon
@colinlennon
May 13 2016 09:16
Hi all. I switched to the dev branch recently and have just managed to fix an issue I was having. I found that auto-sens.json report file was quite often empty, which in turn led to suggested.json being empty
I'm pulling glucose data from Nightscout and my connection is quite slow - I'm sharing my phone's internet connection via BLE tethering
So the issue was that glucose.json was sometimes timing out before it had got the entire report. The solution is to use the -m option with the curl command to specify a timeout - I've specified 120 seconds
One for folks with slower connections to look out for!
Colin Lennon
@colinlennon
May 13 2016 09:32
Actually, I'm not so sure that's fixed it... will continue to troubleshoot
Hristina Dimova
@xpucuto
May 13 2016 12:32
@Spazholio Where did you buy the battery from ? I just got an answer from Amazon and they leave it for me as a gift and will make a refund.
Paul Martin
@Spazholio
May 13 2016 14:47
It was Amazon as well. Maybe I should look into contacting them. Did you speak with the Tecknet or Amazon?
Hristina Dimova
@xpucuto
May 13 2016 14:48
Amazon directly , i had an email from the shop dispatching regarding the product satisfaction but they said i have to contact Anazon for a refund as they have shipped the item.
Paul Martin
@Spazholio
May 13 2016 14:49
@scottleibrand Ok, so last night’s loop was mostly a success. Right around 4am, my NS install apparently needed to be restarted - no idea why. And my loop’s been failing for the last hour, but as soon as I went to investigate it, it worked without me doing anything. So I’m going to chalk that one up to the gypsy woman’s curse rather than anything wrong with the loop specifically.
Chris Oattes
@cjo20
May 13 2016 14:51
technology sometimes wants attention. It's broken until you give it some attention, then it works again
Paul Martin
@Spazholio
May 13 2016 14:56
@cjo20 I’ve been working in IT for ~20 years and can find no logical flaw in your statement.
Scott Leibrand
@scottleibrand
May 13 2016 15:08
:+1:
@colinlennon interested to know why autosens.json was empty. If it was due to missing glucose.json, then the loop wouldn't have completed under master either... But if there's some new failure case that prevents the loop from completing we might want to consider relaxing the error check...
Paul Martin
@Spazholio
May 13 2016 15:16
Does anyone else have their NS installs set to restart periodically? Is it a “thing” that it just goes ka-flooey every once in a while, or was that just unexplained weirdness on my end?
Paul Martin
@Spazholio
May 13 2016 15:37
@xpucuto Just curious - how did you go about reporting the faulty battery? I went to “My Orders” and asked for refund/exchange, and when I enter my reasons, it’s telling me I have to return it prior to getting money back. I can’t really do that, and I’d rather have it swapped out.
Hristina Dimova
@xpucuto
May 13 2016 15:45
@Spazholio I tries
Scott Leibrand
@scottleibrand
May 13 2016 15:46
@Spazholio is your NS on Azure, or ?
Paul Martin
@Spazholio
May 13 2016 15:46
Self-hosted.
On a server that is pretty much exclusively running NS and doing little else.
Hristina Dimova
@xpucuto
May 13 2016 15:47
@Spazholio You go to contact us , choose your order and then i choosed from a list ( it was the last one - Description of the product sometihng ) . And then i explained about the problem that it doesnt want to charge and whether they will refund my shipping cost and it will be hard for me to return it because i live in Bulgaria, but i bought it from Amazon.de . Also asked if they can help me with the situation because of the problem with shipping batteries trough local post ;) I hope that helps
not directly to a return item from your orders.
Paul Martin
@Spazholio
May 13 2016 15:48
@xpucuto Ahhh, I see. So it sounds like the product is working as designed, just not as we need it to.
Hristina Dimova
@xpucuto
May 13 2016 15:49
no, it is not working as designed. In the descriptions its written you can charge the battery while it is charging another device, and this is not happening it is only keeping the battery level.
ericmtx
@ericmtx
May 13 2016 16:01
ok - low level technical question. When we first got my daughter's 722 and started sending temp basals to it remotely, it didn't make a sound NOR did it vibrate. It did make beeps for the other functions, like bolusing manually. She didn't like the beeps, so I changed the Alert type to Vibrate. Now it vibrates when we send temp basal updates (when it didn't at first??). Any way you all know of to stop any beeps or vibrates PERIOD?
Scott Leibrand
@scottleibrand
May 13 2016 16:04
It shouldn't vibe or beep when you send a temp basal. It should only do that every hour on the hour if a temp basal is running.
ericmtx
@ericmtx
May 13 2016 16:05
odd - I'll test it out with her tonight. Maybe I'm getting hyperbole from the pre-teen
Scott Leibrand
@scottleibrand
May 13 2016 16:05
Afaik there's no way to turn that off completely other than to cancel the temp before the top of the hour.
Paul Martin
@Spazholio
May 13 2016 16:09
So, I’ve got a gap in my NS from last night for a little over an hour. I checked my Dexcom, and I have no gaps there. No problem, as I think that’s when my NS went ka-flooey on me. So, I’ve plugged my Dexcom into my rig, because I thought that would make it “fill in the gaps”. Is there a way to get rid of that gap? It’s not a huge deal, but I’d prefer to have complete data in NS.
Scott Leibrand
@scottleibrand
May 13 2016 16:10
@bewest has a brand new gap fill tool that isn't documented yet.
(Isn't in the main docs. It has command line help and everything.)
i think he opened a docs issue that shows how to use it.
Welcome to the brave new world of 18 ways to upload to NS. ;-)
Paul Martin
@Spazholio
May 13 2016 16:14
Wife (last night): “You’re really working over there. What’s going on? Everything ok?”
Me: “I’m trying to figure out how all this stuff ties together. The damned thing won’t upload like I think it’s supposed to.”
Wife: “Oh, that sucks. I’m sorry.”
Me: “Don’t be, I love this kind of stuff!”
Wife: eyeroll
Toby Canning
@TC2013
May 13 2016 16:20
@Spazholio @scottleibrand If either of you find the gap fill tool link, please post it here, thanks!
Scott Leibrand
@scottleibrand
May 13 2016 16:22
openaps/docs#129
Toby Canning
@TC2013
May 13 2016 16:22
@Spazholio Also, this may not be helpful at all, so forgive me, but make sure careportal is enabled in your config vars in azure (or where NS is hosted for you)
Scott Leibrand
@scottleibrand
May 13 2016 16:22
Search that for "gap"
Paul Martin
@Spazholio
May 13 2016 16:23
@TC2013 It is, but I’ve been known to overlook the bleedingly obvious, so good call. =)
Paul Martin
@Spazholio
May 13 2016 16:29
@scottleibrand Since I’m on the dev branch, I should have that command/functionality - right?
Scott Leibrand
@scottleibrand
May 13 2016 16:36
I think so: give it a try.
Paul Martin
@Spazholio
May 13 2016 16:37
Doing so now. During the setup of the ns device, do you see any issues with the “averylongplainsecret” just being my NS API_SECRET? Seems simpler, but I don’t know if that would/could cause any problems...
Scott Leibrand
@scottleibrand
May 13 2016 16:40
I think it has to match.
Paul Martin
@Spazholio
May 13 2016 16:41
Hey, even better.
Scott Leibrand
@scottleibrand
May 13 2016 16:41
I've never set this stuff up yet. @bewest will be able to answer best if you get stuck. Be sure to write up your steps as you go along: this needs added to the docs.
Paul Martin
@Spazholio
May 13 2016 16:43
Well, retrieving entries from NS works as indicated.
Scott Leibrand
@scottleibrand
May 13 2016 16:45
That doesn't use API secret fwiw.
Paul Martin
@Spazholio
May 13 2016 16:46
Oh, and apparently list format on readthedocs.io is slightly different than on github.com. When I look at the docs here http://openaps.readthedocs.io/en/dev/docs/Resources/my-first-pr.html, look at the numbering from the PR last night. Compare it to https://github.com/openaps/docs/blob/dev/docs/docs/Resources/my-first-pr.md to see what I mean.
If that’s a problem, I can reformat it.
Scott Leibrand
@scottleibrand
May 13 2016 16:47
Ew. Silly inconsistent md parsing.
ddaniels1
@ddaniels1
May 13 2016 17:10
Anyone have advice if I should be using the iob-cob branch of nightscout instead of standard for openaps?
Dana Lewis
@danamlewis
May 13 2016 17:15
heh. use standard @ddaniels1
iob-cob is old and not up to date. BUT, there’s purple lines you can enable in standard now that do much of the same :)
This is what modern purple lines look like @ddaniels1: https://twitter.com/danamlewis/status/722821258619052032
Scott Leibrand
@scottleibrand
May 13 2016 17:19
does anyone have any objections at this point to archiving or even deleting wip/iob-cob? @jasoncalabrese can you think of anything else we need out of there?
Dana Lewis
@danamlewis
May 13 2016 17:19
Nope. and I put out that request over a month ago and didn’t get any objections, so I think it’s time.
ddaniels1
@ddaniels1
May 13 2016 17:19
Great, how do I enable the purple lines? That's what I was interested in, in order to follow if DIA and ISF are set correctly.
Also, we are learning that getting the medtronic pump off our little one for meal time boluses is challenging. In addition, especially in the morning when she has been looping all night, the composite IOB is more than the active insulin by the pump and therefore at risk to over correct her with a bolus is she is high. Therefore I was thinking that we should do away with using the bolus wizard in the pump alltogether. @danamlewis interested in your take on this. What could solve both problems for us is if there was a way to use the openaps toolkit to interact with an iphone app that could serve as a bolus wizard for meal time. Query IOB, IC ratio, current BG from openaps, then enter carbs and command the bolus via the bolus.json functionality that is available though not part of oref0. Thoughts?
Dana Lewis
@danamlewis
May 13 2016 17:24
yes. you need to use netIOB to do any bolus calculation decisions
not sure if BWP in Nightscout is the easiest solution for this. @jasoncalabrese , thoughts?
Scott Leibrand
@scottleibrand
May 13 2016 17:25
an intermediate option is to use some sort of bolus wizard app that takes into account net IOB (like BWP once it's updated to consider openaps-sourced IOB), and then use the easy bolus buttons on the pump instead of the bolus wizard...
ddaniels1
@ddaniels1
May 13 2016 17:27
Yes, I think BWP will work as it currently uses the net iob sourced from openaps. the issue is if you change the ISF and IC ratios on the pump, these have to currently be updated on NS. Seems that these could also be made to pull those data from openaps correct? Wish I had the programming skills to do that.
What do you guys think about the possibility of the iPhone bolus wizard. Could it be done safely? That is my major concern.
Scott Leibrand
@scottleibrand
May 13 2016 17:29
oh, BWP is using net IOB now? nice.
iPhone bolus wizard calculator would be fine. we don't want to issue boluses via openaps though.
Dana Lewis
@danamlewis
May 13 2016 17:29
the other option is to do BWP and also use temp targets at the same time for extra safety margin
ddaniels1
@ddaniels1
May 13 2016 17:30
Also does autosensitivity reprogram the pump with new ISF? If so another reason to push the ISF from openaps to NS on each loop.
Dana Lewis
@danamlewis
May 13 2016 17:31
no. it’s not reprogramming pump at all, just adjusting basals as a result
Scott Leibrand
@scottleibrand
May 13 2016 17:32
I think the best combination is: set Eating Soon temp target to 80 ~1h prior to eating. at meal time, use a custom bolus wizard app to determine required meal bolus (which will be smaller than you'd normally give). administer that with the easy bolus buttons (no need to unclip pump). enter the carbs via NS, and let AMA deal with the rest.
ddaniels1
@ddaniels1
May 13 2016 17:32
Maybe the iphone app could query openaps on all the data needed, then give a bolus recommendation on the screen that could be given with the easybolus remote. Would be useful if it could send the carbs to NS for meal assist, but I suspect could be via openaps
cool, i think we are saying the same thing
Scott Leibrand
@scottleibrand
May 13 2016 17:32
yeah, that would work. app could upload carbs to NS
ddaniels1
@ddaniels1
May 13 2016 17:33
OK, need some programming help to make this happen, maybe @jasoncalabrese is interested?
You think the app could pull all the relevant data from openaps? Based on my understanding should be able to pull the required data in .json
Scott Leibrand
@scottleibrand
May 13 2016 17:34
yep, pulling data from the NS API is easy
ddaniels1
@ddaniels1
May 13 2016 17:36
so you would suggest using NS as the intermediary and not openaps? Seems like ISF and IC ratios if it could get them via openaps would be easier.
Scott Leibrand
@scottleibrand
May 13 2016 17:36
NS is best suited to do all the plumbing of getting data between different systems
have openaps upload anything you want from the pump to NS, and then it's all accessible via API
ddaniels1
@ddaniels1
May 13 2016 17:37
ok got it. What about enabling purple lines on current NS? Everything I find online refers to IOB-COB branch
Scott Leibrand
@scottleibrand
May 13 2016 17:38
you'll need to set up advanced-meal-assist
and then ENABLE the purple prediction lines in NS
Is this the best help on configuring meal assist at this point?
Scott Leibrand
@scottleibrand
May 13 2016 17:39
not exactly well documented yet, but that's a good place to start. that's regular meal assist, not AMA, but it's a good chunk of what you need
I think there was another doc floating around on setting up AMA, but not sure if it ever got posted anywhere. maybe @amazaheri remembers?
Dana Lewis
@danamlewis
May 13 2016 17:41
::expresses the usual wish for someone to get so annoyed by the lack of documentation in one place on these advanced features that they’ll PR it all in :) ::
Scott Leibrand
@scottleibrand
May 13 2016 17:42
;-) :+1:
JaysonEwer
@JaysonEwer
May 13 2016 17:43
i'm getting there, I'm getting there. :-/
Dana Lewis
@danamlewis
May 13 2016 17:43
:D
JaysonEwer
@JaysonEwer
May 13 2016 17:43
:-D
I know, ITS CRAZY, I don't have AMA setup yet, so I will do my best to document whatever I can, It may not happen today, perhaps late tonight.
Ali Mazaheri
@amazaheri
May 13 2016 17:44
goal is to extend the auto-sens I PRed earlier, @JaysonEwer if you can add to that or a separate section would be great.
Dana Lewis
@danamlewis
May 13 2016 17:44
:+1:
JaysonEwer
@JaysonEwer
May 13 2016 17:44
No doubt
Thank you
is that the one Scott just posted?
Ali Mazaheri
@amazaheri
May 13 2016 17:44
no but
u use that :)
When I did ours I didn't have the setup.sh , that makes it way easier :)
JaysonEwer
@JaysonEwer
May 13 2016 17:46
sweet, thanks for the suggestion. I can look over your PR and see if I can gleen info from both places to help add color and fireworks and all that.
ddaniels1
@ddaniels1
May 13 2016 17:46
@scottleibrand looking through that script is that a complete set up for openaps that includes AMA buried in there?
Ali Mazaheri
@amazaheri
May 13 2016 17:46
Capture.PNG
For anyone interested pre-AMA and post-AMA
ddaniels1
@ddaniels1
May 13 2016 17:47
@amazaheri what app is that you used to display your data?
Andrew Baugh
@baughaw
May 13 2016 17:48
@amazaheri AWESOME
Dana Lewis
@danamlewis
May 13 2016 17:48
@JaysonEwer :fireworks:
Ali Mazaheri
@amazaheri
May 13 2016 17:48
That's dexcom clarity
Clarity.dexcom.com
I also use some custom reports using powerbi shared with our Endo as well
ddaniels1
@ddaniels1
May 13 2016 17:52
cool
JaysonEwer
@JaysonEwer
May 13 2016 17:52
pretty significant reduction in lows, nice.
Ali Mazaheri
@amazaheri
May 13 2016 17:52
Capture.PNG
yeah
Would be great to see everyone getting the same benifits
We have been running it 24/7 and happy with @scottleibrand AMA
ddaniels1
@ddaniels1
May 13 2016 17:55
@scottleibrand so to clarify going through https://github.com/scottleibrand/openaps-sh/blob/advanced-meal-assist/setup.sh and picking out the bits related to AMA and executing those on the command line along with installing latest dev openaps will allow AMA to work? If so could do that and write it up, I am happy to try with some editing from you all.
JaysonEwer
@JaysonEwer
May 13 2016 17:55
Are you adjusting ISF and other settings on the pump? I thought I read somewhere that AMA is supposed to be able to recommend basal settings adjustments?
Ali Mazaheri
@amazaheri
May 13 2016 17:56
:+1:
Nothing on pump
JaysonEwer
@JaysonEwer
May 13 2016 17:56
Ideally, you would do that, no?
Andrew Baugh
@baughaw
May 13 2016 17:56
Looks like my weekend is going to be spent setting up AMA.. :)
Ali Mazaheri
@amazaheri
May 13 2016 17:57
:0
JaysonEwer
@JaysonEwer
May 13 2016 17:57
In the event your rig dies or is separated from your son, he would benefit from el Pancreator's hard work of analysis and recommendations. Am I right to think that way?
Ali Mazaheri
@amazaheri
May 13 2016 17:58
:)
Talking to my customers to cover their behind with redundancy and DR we have bunch of options too
JaysonEwer
@JaysonEwer
May 13 2016 17:59
:-D
Dana Lewis
@danamlewis
May 13 2016 17:59
@JaysonEwer but sensitivity changes, so I wouldn’t change your default settings on the pump as a result
Ali Mazaheri
@amazaheri
May 13 2016 18:00
Last night after almost a year of looping we hit a almost disaster though
This message was deleted
JaysonEwer
@JaysonEwer
May 13 2016 18:01
True, but as always, if you are starting to see patterns, it's worth it to modify things slightly, no?
Ali Mazaheri
@amazaheri
May 13 2016 18:01
So I go with @scottleibrand suggestion if you are on g4 or g5 with receiver
JaysonEwer
@JaysonEwer
May 13 2016 18:11

@scottleibrand I did the upgrade to get the latest oref0, but i'm not sure I got anything new. I foolishly started reading your post above and forgot to get the before versions. But I have the console output saved, which is pretty thorough. I ran into an issue towards the end which generated the following messages:

fatal: destination path 'oref0' already exists and is not an empty directory.
Already up-to-date.
npm ERR! Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js'
npm ERR!  { [Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js']
npm ERR!   errno: 50,
npm ERR!   code: 'EPERM',
npm ERR!   path: '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 4.1.19-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/src/oref0
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/src/oref0/npm-debug.log
npm ERR! not ok code 0
installed /etc/udev/rules.d/80-medtronic-carelink.rules
installed /etc/udev/rules.d/80-dexcom.rules
Installing bash completion script /etc/bash_completion.d/python-argcomplete.sh
openaps 0.1.1-dev
pi@Ewer-Open-APS:~/Documents/openaps $

Does that look normal? The command I used was the following:

curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-src.sh | bash -
Jason Calabrese
@jasoncalabrese
May 13 2016 18:16
trying to catch up... @scottleibrand I don't think we need to keep the iob-cob branch, seems like it's only causing confusion now, but losing history is annoying, maybe adding a tag to the head of that branch would be good
then we can delete the branch and if we ever care to be able to to go back as see what was there
Dana Lewis
@danamlewis
May 13 2016 18:16
:+1: @jasoncalabrese
Jason Calabrese
@jasoncalabrese
May 13 2016 18:18
a way to help with manual correction boluses and initial meal bolues would really help us, we're not being consistent and it's too hard to explain to others what should be done
JaysonEwer
@JaysonEwer
May 13 2016 18:18
@scottleibrand I can provide the npm-debug.log if that is of any use?
@scottleibrand How do you like that, I actually read the end of that message which indicated I needed to run the command again as root. SO i'm re-running with sudo in front of my curl command. :-D DOH!!!
ddaniels1
@ddaniels1
May 13 2016 18:22
@jasoncalabrese so how do we go about doing it? Seems to me getting the required data from openaps to the NS API for correction and meal bolus recommendations would be easy and making an app to take that data and do the math then output the bolus suggestion to enter in the pump and route the carbs back to carb portal for AMA would be perfect. I'd be happy to throw some money at a developer to do it, but don't know where to find someone like that.
Dana Lewis
@danamlewis
May 13 2016 18:23
;) @JaysonEwer
JaysonEwer
@JaysonEwer
May 13 2016 18:23
I prolly should have paused my loop first, too, eh? 8-D

@scottleibrand I got what appears to be the same message when I ran it using sudo.

Using /usr/local/lib/python2.7/dist-packages/smmap-0.9.0-py2.7.egg
Finished processing dependencies for openaps-contrib==0.0.6
fatal: destination path 'oref0' already exists and is not an empty directory.
Already up-to-date.
npm ERR! Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js'
npm ERR!  { [Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js']
npm ERR!   errno: 50,
npm ERR!   code: 'EPERM',
npm ERR!   path: '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 4.1.19-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/src/oref0
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/src/oref0/npm-debug.log
npm ERR! not ok code 0
installed /etc/udev/rules.d/80-medtronic-carelink.rules
installed /etc/udev/rules.d/80-dexcom.rules
Installing bash completion script /etc/bash_completion.d/python-argcomplete.sh
openaps 0.1.1-dev
pi@Ewer-Open-APS:~/Documents/openaps $

But I had my loop running while the script was running. I'll try again, now that i've paused my loop.

JaysonEwer
@JaysonEwer
May 13 2016 18:34
looks like it ended the same way, perhaps that's normal?
Yeah, +1 on the NOT a HUGE FAN of the new Gitter web client. :-/
Scott Leibrand
@scottleibrand
May 13 2016 18:48
@JaysonEwer the "already exists" error is definitely not a problem, but I'm not sure about the npm ERR stuff. might be worth at least looking at the npm-debug.log.
@ddaniels1 yeah, that's the idea behind that script. I usually copy and paste out the bits I want to add/change, but if you want to start a new directory from scratch, it can also get you most of the way set up. there are usually still things you need to tweak to get it working though, so I don't recommend doing so until you've done a full setup end-to-end and know how all the pieces fit together.
Paul Martin
@Spazholio
May 13 2016 19:31
@bewest Whenever you have a moment, I’d like to pick your brain about your nightscout device. I’m following what’s written in the docs (openaps/docs#129) but I’m getting nothing returned from NS.
Ben West
@bewest
May 13 2016 19:31
oh?
you have ns device set up using nightscout autoconfigure-device-crud?
Paul Martin
@Spazholio
May 13 2016 19:33
Correct.
Ben West
@bewest
May 13 2016 19:34
what happens with openaps use ns shell get entries.json count=1
Paul Martin
@Spazholio
May 13 2016 19:35
I get one result returned.
Ben West
@bewest
May 13 2016 19:36
fantastic
Paul Martin
@Spazholio
May 13 2016 19:36
So…I suppose technically I’m getting something returned from NS sometimes. =)
Ben West
@bewest
May 13 2016 19:37
that should work all the time, so long as you have internet access
Paul Martin
@Spazholio
May 13 2016 19:37
So then I added the two reports right below that, and they added correctly. However, openaps use ns shell format-recent-history-treatments monitor/pump-history.json model.json returns nothing.
Ben West
@bewest
May 13 2016 19:37
cat model.json
head monitor/pump-history.json
Paul Martin
@Spazholio
May 13 2016 19:38
I can’t imagine it matters, but those files live in a different location and I’ve updated the report accordingly.
model.json contains “722".
Ben West
@bewest
May 13 2016 19:39
ok, yeah, just checking those files actually exist
and have stuff in them
Paul Martin
@Spazholio
May 13 2016 19:39
head settings/pumphistory-24h.json returns
[
  {
    "_type": "Bolus", 
    "_description": "Bolus 2016-05-11T21:24:00 head[4], body[0] op[0x01]", 
    "timestamp": "2016-05-11T21:24:00", 
    "_body": "", 
    "appended": [
      {
        "_type": "UnabsorbedInsulinBolus", 
        "_description": "UnabsorbedInsulinBolus unknown head[8], body[0] op[0x5c]",
Ben West
@bewest
May 13 2016 19:39
ok, openaps use ns shell get treatments.json count=1
and that's the file you're using
Paul Martin
@Spazholio
May 13 2016 19:39
That returns three items.
Ben West
@bewest
May 13 2016 19:40
ok
openaps use ns shell latest-treatment-time
it will only include items from pump-history that occur after this time
Paul Martin
@Spazholio
May 13 2016 19:41
"2016-05-13T15:30:03-04:00”
Ben West
@bewest
May 13 2016 19:41
yeah
so, the "nothing" result is actually corrrect
does it actually print nothing or []?
Paul Martin
@Spazholio
May 13 2016 19:42
Ok. Hmm. Well, my end goal here is to fill in a couple gaps in NS.
No, it prints []. Sorry, bad terminology. =)
“Did you use ‘’, 0, or NULL? It matters!`
(thank you, PHP)
Ben West
@bewest
May 13 2016 19:44
:-)
ok, to manually just fill a bunch of gaps
well
I would manually run mm-format-ns-treatments pumphistory.json model.json | tee manual-backfill.json
then you can openaps use ns upload treatments.json manual-backfill.json if you don't care about dupes
or
you could use lsgaps and select :)
Scott Leibrand
@scottleibrand
May 13 2016 19:46
I think @Spazholio was originally trying to do lsgaps
Paul Martin
@Spazholio
May 13 2016 19:47
I think I do care about dupes. I think that would make me twitch every time I looked at NS.
Ben West
@bewest
May 13 2016 19:47
so openaps use ns shell get treatments.json count=1000 | openaps use tz lsgaps | openaps use tz select --gaps - manual-backfill.json | tee culled-manual.json
Paul Martin
@Spazholio
May 13 2016 19:47
And lsgaps sounds like what I’m looking for. At least with the name. =)
Ben West
@bewest
May 13 2016 19:47
lsgaps there generates a list of all the gaps
select --gaps - will read that incoming list, and select the gaps out of the manual-backfill.json file
and save it in culled-manual.json
you can adjust the size of the gap to look for
Paul Martin
@Spazholio
May 13 2016 19:48
Is that supposed to be opens use ns shell get rather than opens use ns get?
Ben West
@bewest
May 13 2016 19:48
by default I think it's 10 minutes
yes
Paul Martin
@Spazholio
May 13 2016 19:49
Ok. Beacuse otherwise, there are a LOOOOT of errors. =)
Ben West
@bewest
May 13 2016 19:49
:-(
Paul Martin
@Spazholio
May 13 2016 19:49
And then I’d upload the culled-manual.json file to NS?
Ben West
@bewest
May 13 2016 19:49
yeah
openaps use ns shell upload culled-manual.json
we're missing one more feature to make this automatic gap sync/deduping
Paul Martin
@Spazholio
May 13 2016 19:50
It returns
usage: openaps-use tz [-h] USAGE ...
openaps-use tz: error: argument USAGE: invalid choice: 'lsgaps' (choose from 'clock', 'glucose', 'rezone')
usage: openaps-use tz [-h] USAGE ...
openaps-use tz: error: argument USAGE: invalid choice: 'select' (choose from 'clock', 'glucose', 'rezone')
Ben West
@bewest
May 13 2016 19:50
hmm
sudo pip install --update openaps-contrib
Paul Martin
@Spazholio
May 13 2016 19:51
no such option: —update
Swapped it out with —upgrade and it appears to be going.
Paul Martin
@Spazholio
May 13 2016 19:56
Same error message afterward though.
Scott Leibrand
@scottleibrand
May 13 2016 19:56
time to install the argument synonym finder. :)
Paul Martin
@Spazholio
May 13 2016 19:58
I need Clippy. “It looks like you’re trying to backfill Nightscout data. Would you like help?"
JaysonEwer
@JaysonEwer
May 13 2016 20:14
'sudo pip install arg-syn-finder' or something like that, eh? 😉
Paul Martin
@Spazholio
May 13 2016 20:16
I hate that I almost ran that.
Ben West
@bewest
May 13 2016 20:19
?
openaps use tz -h
Paul Martin
@Spazholio
May 13 2016 20:19
usage: openaps-use tz [-h] USAGE ...

optional arguments:
  -h, --help  show this help message and exit

## Device tz:
  vendor openapscontrib.timezones

  Timezones - manage timezones in diabetes data with ease.



  USAGE       Usage Details
    clock     Manage timezones of device clock.
    glucose   Manage timezones on glucose times.
    rezone    Manage how timezones are expressed in data.
Ben West
@bewest
May 13 2016 20:19
maybe you installed from src? ls ~/src?
Paul Martin
@Spazholio
May 13 2016 20:20
I didn’t install from src. But I just upgraded to quick-src if that helps?
Ben West
@bewest
May 13 2016 20:21
ls ~/src
Paul Martin
@Spazholio
May 13 2016 20:21
drwxr-xr-x 9 pi pi 4096 May 12 23:27 decoding-carelink
drwxr-xr-x 5 pi pi 4096 May 12 23:27 dexcom_reader
drwxr-xr-x 7 pi pi 4096 May 12 23:27 openaps
drwxr-xr-x 5 pi pi 4096 May 12 23:27 openaps-contrib
drwxr-xr-x 8 pi pi 4096 May 12 23:27 oref0
Ben West
@bewest
May 13 2016 20:21
probably: cd ~/src/openaps-contrib; git pull origin; sudo python setup.py develop
Paul Martin
@Spazholio
May 13 2016 20:21
Running...
Done.
Ben West
@bewest
May 13 2016 20:22
now you have select and lsgaps
Paul Martin
@Spazholio
May 13 2016 20:22
No change to openaps use tz -h though.
Ben West
@bewest
May 13 2016 20:22
wat o-0
Paul Martin
@Spazholio
May 13 2016 20:23
I’m on openaps 0.1.1-dev if that helps?
Ben West
@bewest
May 13 2016 20:23
pydoc openapscontrib
Paul Martin
@Spazholio
May 13 2016 20:24
Help on package openapscontrib:

NAME
    openapscontrib - Virtual Namespace for 3rd party openaps contributions

FILE
    /home/pi/src/openaps-contrib/openapscontrib/__init__.py

PACKAGE CONTENTS
    plugins (package)
    timezones (package)

(END)
Ben West
@bewest
May 13 2016 20:24
yeah
(q to quit that), cd ~/src/openaps-contrib; git status
Paul Martin
@Spazholio
May 13 2016 20:25
On branch dev
Your branch is up-to-date with 'origin/dev'.
nothing to commit, working directory clean
Ben West
@bewest
May 13 2016 20:25
ah ,ok
git checkout master
Paul Martin
@Spazholio
May 13 2016 20:25
Done.
Ben West
@bewest
May 13 2016 20:25
git pull origin master
Paul Martin
@Spazholio
May 13 2016 20:26
From git://github.com/openaps/openaps-contrib
 * branch            master     -> FETCH_HEAD
Already up-to-date.
Ben West
@bewest
May 13 2016 20:27
ok
git rev-parse HEAD
Paul Martin
@Spazholio
May 13 2016 20:28
Hey, now we’re getting into the git commands I’m unfamilair with. =)
5ab4616c74eab65e504bfa749e5176fbe2a77ba1
Ben West
@bewest
May 13 2016 20:28
great
ok
hmmm
back to your openaps instance/dir
try openaps use tz -h again, see if select is in there
Paul Martin
@Spazholio
May 13 2016 20:28
Oh god.
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 47, in __call__
    self.configure_parser(self.parser)
  File "/home/pi/src/openaps/bin/openaps-use", line 31, in configure_parser
    available = devices.get_device_map(self.config)
  File "/home/pi/src/openaps/openaps/devices/__init__.py", line 21, in get_device_map
    for device in Device.FromConfig(vendors, conf):
  File "/home/pi/src/openaps/openaps/devices/device.py", line 77, in FromConfig
    vendor = vendors.lookup(config.get(candidate, 'vendor').split('.').pop( ), config)
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 27, in lookup
    return get_map(config)[name]
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 22, in get_map
    vendors = all_vendors(config)
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 36, in all_vendors
    return get_vendors( ) + find_plugins(config)
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 16, in find_plugins
    return [ v.get_module( ) for v in vendors ]
  File "/home/pi/src/openaps/openaps/vendors/plugins/vendor.py", line 19, in get_module
    return importlib.import_module(self.name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/pi/src/openaps-contrib/openapscontrib/timezones/__init__.py", line 129, in <module>
    import recurrent
ImportError: No module named recurrent
Ben West
@bewest
May 13 2016 20:29
great
actually
This message was deleted
anyway
oh
Paul Martin
@Spazholio
May 13 2016 20:29
Yeah, I didn’t think “great” was in response to that output. =)
Ben West
@bewest
May 13 2016 20:29
back in cd ~/src/openaps-contrib
one more time:
sudo python setup.py develop
Paul Martin
@Spazholio
May 13 2016 20:29
Done.
Ben West
@bewest
May 13 2016 20:30
ok, back again and -h again
Paul Martin
@Spazholio
May 13 2016 20:30
NOW I have the commands.
Ben West
@bewest
May 13 2016 20:30
:-)
Paul Martin
@Spazholio
May 13 2016 20:30
I mean…I knew how to do all that. I just wanted to make sure YOU knew how.
cough
Ben West
@bewest
May 13 2016 20:30
lol
this will be on the test
lol
Paul Martin
@Spazholio
May 13 2016 20:31
Ok, so…I have to go pick up my kids in 2 mins, but if you want to throw out the command I should use when I get back to test, I’ll give it a run.
Ben West
@bewest
May 13 2016 20:32
working on it, it might need some tweaks
Paul Martin
@Spazholio
May 13 2016 20:33
Sure thing. And thanks for all the debugging help. I think I need to make a full image backup of this card fairly soon. I have NO idea how I’d recreate some of this if things were to go ka-flooey.
Dana Lewis
@danamlewis
May 13 2016 20:33
Good plan;)
Ben West
@bewest
May 13 2016 20:34
openaps use ns shell get treatments.json count=1000 | openaps use tz lsgaps --date created_at --before now - | openaps use tz select --date created_at --gaps - nightscout/recent-treatments.json
something like this
will read history from NS, identify all the gaps, then pull records occurring inside the gap out of recent-treatments.json
so that would be the list to upoad
the results of all that
make sure everything is zoned, oops:
openaps use ns shell get treatments.json count=1000 | openaps use tz rezone --astimezone --date created_at - | openaps use tz lsgaps --date created_at --before now - | openaps use tz select --date created_at --gaps - nightscout/recent-treatments.json
Ben West
@bewest
May 13 2016 20:40
you could even pipe that directly to ns: | openaps use ns shell upload treatments.json - might work
hmm, would use a file to be sure though
Bill Stackpole
@billstackpole
May 13 2016 20:48
Has anyone tried this data-only SIM card from SparkFun for their uploader? ($80, data only for 6 months, 1G/mo@LTE speeds)
JaysonEwer
@JaysonEwer
May 13 2016 20:56
@scottleibrand Here is the output of the debug file from earlier:
pi@Ewer-Open-APS:~/Documents/openaps $ cat /home/pi/src/oref0/npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'install' ]
2 info using npm@1.4.21
3 info using node@v0.10.29
4 verbose readDependencies using package.json deps
5 verbose install where, deps [ '/home/pi/src/oref0',
5 verbose install   [ 'share2nightscout-bridge', 'timezone', 'mocha', 'should' ] ]
6 info preinstall oref0@0.1.4
7 verbose readDependencies using package.json deps
8 verbose already installed skipping share2nightscout-bridge@^0.1.5 /home/pi/src/oref0
9 verbose already installed skipping timezone@0.0.47 /home/pi/src/oref0
10 verbose already installed skipping mocha@^2.3.3 /home/pi/src/oref0
11 verbose already installed skipping should@^7.1.0 /home/pi/src/oref0
12 silly resolved []
13 info build /home/pi/src/oref0
14 verbose linkStuff [ false, false, false, '/home/pi/src' ]
15 info linkStuff oref0@0.1.4
16 verbose linkBins oref0@0.1.4
17 verbose linkMans oref0@0.1.4
18 verbose rebuildBundles oref0@0.1.4
19 verbose rebuildBundles [ '.bin',
19 verbose rebuildBundles   'mocha',
19 verbose rebuildBundles   'oref0',
19 verbose rebuildBundles   'share2nightscout-bridge',
19 verbose rebuildBundles   'should',
19 verbose rebuildBundles   'timezone' ]
20 verbose rebuild bundle /home/pi/src/oref0/node_modules/oref0
21 info build /home/pi/src/oref0/node_modules/oref0
22 info preinstall oref0@0.1.4
23 verbose linkStuff [ false, false, false, '/home/pi/src/oref0/node_modules' ]
24 info linkStuff oref0@0.1.4
25 verbose linkBins oref0@0.1.4
26 verbose link bins [ { 'oref0-calculate-iob': './bin/oref0-calculate-iob.js',
26 verbose link bins     'oref0-find-insulin-uses': './bin/oref0-find-insulin-uses.js',
26 verbose link bins     'oref0-detect-sensitivity': './bin/oref0-detect-sensitivity.js',
26 verbose link bins     'oref0-determine-basal': './bin/oref0-determine-basal.js',
26 verbose link bins     'oref0-meal': './bin/oref0-meal.js',
26 verbose link bins     'oref0-normalize-temps': './bin/oref0-normalize-temps.js',
26 verbose link bins     'send-tempbasal-Azure': './bin/send-tempbasal-Azure.js',
26 verbose link bins     'oref0-fix-git-corruption': 'bin/oref0-fix-git-corruption.sh',
26 verbose link bins     'oref0-get-profile': './bin/oref0-get-profile.js',
26 verbose link bins     'oref0-mint-max-iob': './bin/oref0-mint-max-iob.sh',
26 verbose link bins     'oref0-ifttt-notify': './bin/oref0-ifttt-notify',
26 verbose link bins     'oref0-raw': './bin/oref0-raw.js',
26 verbose link bins     'oref0-reset-usb': 'bin/oref0-reset-usb.sh',
26 verbose link bins     'oref0-reset-git': 'bin/oref0-reset-git.sh',
26 verbose link bins     'mm-format-ns-glucose': './bin/mm-format-ns-glucose.sh',
26 verbose link bins     'mm-format-ns-profile': './bin/mm-format-ns-profile.sh',
26 verbose link bins     'mm-format-ns-treatments': './bin/mm-format-ns-treatments.sh',
26 verbose link bins     'mm-format-ns-pump-history': './bin/mm-format-ns-pump-history.sh',
26 verbose link bins     oref0: './bin/oref0.sh',
26 verbose link bins     'mm-stick': './bin/mm-stick.sh',
26 verbose link bins     'ns-upload-entries': './bin/ns-upload-entries.sh',
26 verbose link bins     'ns-upload': './bin/ns-upload.sh',
26 verbose link bins     'ns-get': './bin/ns-get.sh',
26 verbose link bins     'ns-status': './bin/ns-status.js',
26 verbose link bins     nightscout: './bin/nightscout.sh',
26 verbose link bins     'ns-dedupe-treatments': './bin/ns-dedupe-treatments.sh',
26 verbose link bins     'oref0-html': './bin/oref0-html.js',
26 verbose link bins     'oref0-pebble': './bin/oref0-pebble.js' },
26 verbose link bins   '/home/pi/src/oref0/node_modules/.bin',
26 verbose link bins   false ]
27 verbose linkMans oref0@0.1.4
28 verbose rebuildBundles oref0@0.1.4
29 verbose rebuildBundles [ 'share2nightscout-bridge', 'timezone' ]
30 error Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js'
30 error  { [Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js']
30 error   errno: 50,
30 error   code: 'EPERM',
30 error   path: '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js' }
31 error Please try running this command again as root/Administrator.
32 error System Linux 4.1.19-v7+
33 error command "/usr/bin/nodejs" "/usr/bin/npm" "install"
34 error cwd /home/pi/src/oref0
35 error node -v v0.10.29
36 error npm -v 1.4.21
37 error path /home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js
38 error code EPERM
39 error errno 50
40 error stack Error: EPERM, chmod '/home/pi/src/oref0/node_modules/oref0/bin/oref0-calculate-iob.js'
41 verbose exit [ 50, true ]
pi@Ewer-Open-APS:~/Documents/openaps $
Does that help at all?
Scott Leibrand
@scottleibrand
May 13 2016 21:03
not really. you could try rm -rf /home/pi/src/oref0 and then run quick-src again...
JaysonEwer
@JaysonEwer
May 13 2016 21:04
SWEET!! This is my primary rig. :-D But my Edison is almost ready for primetime!
and i've got less than an hour before I have to leave. :-D I'm game.
Is it worth trying to detemine what might be wrong? Do you think there will be others with similar experience?
Dana Lewis
@danamlewis
May 13 2016 21:07
for anyone who’s been working on their loops…don’t skip this part of the instructions :) https://github.com/openaps/docs/blob/master/docs/docs/walkthrough/phase-6/keeping-up-to-date.md (re: after 3 successful nights of overnight looping without major issues)
JaysonEwer
@JaysonEwer
May 13 2016 21:16
@scottleibrand I just ran the same script on my Edison and there were no error's and it said the same thing along the way :
fatal: destination path 'oref0' already exists and is not an empty directory.
fatal: destination path 'oref0' already exists and is not an empty directory.
Already up-to-date.
npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine boom@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
/usr/local/bin/oref0-calculate-iob -> /usr/local/lib/node_modules/oref0/bin/oref0-calculate-iob.js
/usr/local/bin/oref0-find-insulin-uses -> /usr/local/lib/node_modules/oref0/bin/oref0-find-insulin-uses.js
/usr/local/bin/oref0-detect-sensitivity -> /usr/local/lib/node_modules/oref0/bin/oref0-detect-sensitivity.js
/usr/local/bin/oref0-determine-basal -> /usr/local/lib/node_modules/oref0/bin/oref0-determine-basal.js
/usr/local/bin/oref0-meal -> /usr/local/lib/node_modules/oref0/bin/oref0-meal.js
/usr/local/bin/oref0-normalize-temps -> /usr/local/lib/node_modules/oref0/bin/oref0-normalize-temps.js
/usr/local/bin/send-tempbasal-Azure -> /usr/local/lib/node_modules/oref0/bin/send-tempbasal-Azure.js
/usr/local/bin/oref0-fix-git-corruption -> /usr/local/lib/node_modules/oref0/bin/oref0-fix-git-corruption.sh
/usr/local/bin/oref0-get-profile -> /usr/local/lib/node_modules/oref0/bin/oref0-get-profile.js
/usr/local/bin/oref0-mint-max-iob -> /usr/local/lib/node_modules/oref0/bin/oref0-mint-max-iob.sh
/usr/local/bin/oref0-ifttt-notify -> /usr/local/lib/node_modules/oref0/bin/oref0-ifttt-notify
/usr/local/bin/oref0-raw -> /usr/local/lib/node_modules/oref0/bin/oref0-raw.js
/usr/local/bin/oref0-reset-usb -> /usr/local/lib/node_modules/oref0/bin/oref0-reset-usb.sh
/usr/local/bin/oref0-reset-git -> /usr/local/lib/node_modules/oref0/bin/oref0-reset-git.sh
/usr/local/bin/mm-format-ns-glucose -> /usr/local/lib/node_modules/oref0/bin/mm-format-ns-glucose.sh
/usr/local/bin/mm-format-ns-profile -> /usr/local/lib/node_modules/oref0/bin/mm-format-ns-profile.sh
/usr/local/bin/mm-format-ns-treatments -> /usr/local/lib/node_modules/oref0/bin/mm-format-ns-treatments.sh
/usr/local/bin/mm-format-ns-pump-history -> /usr/local/lib/node_modules/oref0/bin/mm-format-ns-pump-history.sh
/usr/local/bin/oref0 -> /usr/local/lib/node_modules/oref0/bin/oref0.sh
/usr/local/bin/mm-stick -> /usr/local/lib/node_modules/oref0/bin/mm-stick.sh
/usr/local/bin/ns-upload-entries -> /usr/local/lib/node_modules/oref0/bin/ns-upload-entries.sh
/usr/local/bin/ns-upload -> /usr/local/lib/node_modules/oref0/bin/ns-upload.sh
/usr/local/bin/ns-get -> /usr/local/lib/node_modules/oref0/bin/ns-get.sh
/usr/local/bin/ns-status -> /usr/local/lib/node_modules/oref0/bin/ns-status.js
/usr/local/bin/nightscout -> /usr/local/lib/node_modules/oref0/bin/nightscout.sh
/usr/local/bin/ns-dedupe-treatments -> /usr/local/lib/node_modules/oref0/bin/ns-dedupe-treatments.sh
/usr/local/bin/oref0-html -> /usr/local/lib/node_modules/oref0/bin/oref0-html.js
/usr/local/bin/oref0-template -> /usr/local/lib/node_modules/oref0/bin/oref0-template.js
/usr/local/bin/oref0-copy-fresher -> /usr/local/lib/node_modules/oref0/bin/oref0-copy-fresher
/usr/local/bin/oref0-pebble -> /usr/local/lib/node_modules/oref0/bin/oref0-pebble.js
oref0@0.1.4 /usr/local/lib/node_modules/oref0
├── yargs@4.3.2 (decamelize@1.2.0, camelcase@2.1.1, y18n@3.2.1, require-main-filename@1.0.1, window-size@0.2.0, yargs-parser@2.4.0, lodash.assign@4.0.9, os-locale@1.4.0, string-width@1.0.1, cliui@3.2.0, pkg-conf@1.1.2, read-pkg-up@1.0.1)
├── share2nightscout-bridge@0.1.5 (request@2.53.0)
└── timezone@0.0.47
/usr/local/bin/oref0-calculate-iob -> /usr/local/lib/node_modules/oref0/bin/oref0-calculate-iob.js
/usr/local/bin/oref0-find-insulin-uses -> /usr/local/lib/node_modules/oref0/bin/oref0-find-insulin-uses.js
/usr/local/bin/oref0-detect-sensitivity -> /usr/local/lib/node_modules/oref0/bin/oref0-detect-sensitivity.js
/usr/local/bin/oref0-determine-basal -> /usr/local/lib/node_modules/oref0/bin/oref0-determine-basal.js
/usr/local/bin/oref0-meal -> /usr/local/lib/node_modules/oref0/bin/oref0-meal.js
/usr/local/bin/oref0-normalize-temps -> /usr/local/lib/node_modules/oref0/bin/oref0-normalize-temps.js
/usr/local/bin/send-tempbasal-Azure -> /usr/local/lib/node_modules/oref0/bin/send-tempbasal-Azure.js
/usr/local/bin/oref0-fix-git-corruption -> /usr/local/lib/node_modules/oref0/bin/oref0-fix-git-corruption.sh
/usr/local/bin/oref0-get-profile -> /usr/local/lib/node_modules/oref0/bin/oref0-get-profile.js
/usr/local/bin/oref0-mint-max-iob -> /usr/local/lib/node_modules/oref0/bin/oref0-mint-max-iob.sh
/usr/local/bin/oref0-ifttt-notify -> /usr/local/lib/node_modules/oref0/bin/oref0-ifttt-notify
/usr/local/bin/oref0-raw -> /usr/local/lib/node_modules/oref0/bin/oref0-raw.js
/usr/local/bin/oref0-reset-usb -> /usr/local/lib/node_modules/oref0/bin/oref0-reset-usb.sh
/usr/local/bin/oref0-reset-git -> /usr/local/lib/node_modules/oref0/bin/oref0-reset-git.sh
/usr/local/bin/mm-format-ns-glucose -> /usr/local/lib/node_modules/oref0/bin/mm-format-ns-glucose.sh
/usr/local/bin/mm-format-ns-profile -> /usr/local/lib/node_modules/oref0/bin/mm-format-ns-profile.sh
/usr/local/bin/mm-format-ns-treatments -> /usr/local/lib/node_modules/oref0/bin/mm-format-ns-treatments.sh
/usr/local/bin/mm-format-ns-pump-history -> /usr/local/lib/node_modules/oref0/bin/mm-format-ns-pump-history.sh
/usr/local/bin/oref0 -> /usr/local/lib/node_modules/oref0/bin/oref0.sh
/usr/local/bin/mm-stick -> /usr/local/lib/node_modules/oref0/bin/mm-stick.sh
/usr/local/bin/ns-upload-entries -> /usr/local/lib/node_modules/oref0/bin/ns-upload-entries.sh
/usr/local/bin/ns-upload -> /usr/local/lib/node_modules/oref0/bin/ns-upload.sh
/usr/local/bin/ns-get -> /usr/local/lib/node_modules/oref0/bin/ns-get.sh
/usr/local/bin/ns-status -> /usr/local/lib/node_modules/oref0/bin/ns-status.js
/usr/local/bin/nightscout -> /usr/local/lib/node_modules/oref0/bin/nightscout.sh
/usr/local/bin/ns-dedupe-treatments -> /usr/local/lib/node_modules/oref0/bin/ns-dedupe-treatments.sh
/usr/local/bin/oref0-html -> /usr/local/lib/node_modules/oref0/bin/oref0-html.js
/usr/local/bin/oref0-template -> /usr/local/lib/node_modules/oref0/bin/oref0-template.js
/usr/local/bin/oref0-copy-fresher -> /usr/local/lib/node_modules/oref0/bin/oref0-copy-fresher
/usr/local/bin/oref0-pebble -> /usr/local/lib/node_modules/oref0/bin/oref0-pebble.js
/usr/local/lib/node_modules/oref0 -> /home/edison/src/oref0
unbuild oref0@0.1.4
/home/edison/src/oref0/node_modules/oref0 -> /usr/local/lib/node_modules/oref0 -> /home/edison/src/oref0
installed /etc/udev/rules.d/80-medtronic-carelink.rules
installed /etc/udev/rules.d/80-dexcom.rules
Installing bash completion script /etc/bash_completion.d/python-argcomplete.sh
openaps 0.1.1-dev
edison@Ewer-Edison-OpenAPS-31:~/openaps$
Scott Leibrand
@scottleibrand
May 13 2016 21:20
that "fatal" error is actually completely normal: Just means the git clone didn't work because you already have the directory, so it proceeded to do a git pull instead.
if someone wants to go fix quick-src.sh to suppress that error, feel free. :)
JaysonEwer
@JaysonEwer
May 13 2016 21:26
Ok, I think it worked this time. I was just doing a sudo blah, before, but this time I did a sudo su and then ran the script and it finished basically the same way as when I ran it on my Edison.
ddaniels1
@ddaniels1
May 13 2016 21:30
any advice on getting the dev branch? looking at the instructions having problems finding srv directory in order to git pull dev branch
sorry src directory
Paul Martin
@Spazholio
May 13 2016 21:40
@bewest Just got back. Going to try those commands in a few. I’ll let you know.
JaysonEwer
@JaysonEwer
May 13 2016 21:40
Ok, i'm getting the following message after restarting my loop:
May 13 17:39:02 Ewer-Open-APS openaps: Traceback (most recent call last):
May 13 17:39:02 Ewer-Open-APS openaps:   File "/usr/local/bin//openaps", line 4, in <module>
May 13 17:39:02 Ewer-Open-APS openaps:     __import__('pkg_resources').require('openaps==0.1.1.dev0')
May 13 17:39:02 Ewer-Open-APS openaps:   File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 2927, in <module>
May 13 17:39:02 Ewer-Open-APS openaps:   File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 2913, in _call_aside
May 13 17:39:02 Ewer-Open-APS openaps:   File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
May 13 17:39:02 Ewer-Open-APS openaps:   File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 635, in _build_master
May 13 17:39:02 Ewer-Open-APS openaps:   File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 943, in require
May 13 17:39:02 Ewer-Open-APS openaps:   File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 829, in resolve
May 13 17:39:02 Ewer-Open-APS openaps: pkg_resources.DistributionNotFound: The 'openaps==0.1.1.dev0' distribution was not found and is required by the application
@scottleibrand Is there a quick way to fix the "pkg_resources.DistributionNotFound: The 'openaps==0.1.1.dev0' distribution was not found and is required by the application" message?
pi@Ewer-Open-APS:~/Documents/openaps $ openaps use pump model
Traceback (most recent call last):
  File "/usr/local/bin/openaps", line 4, in <module>
    __import__('pkg_resources').require('openaps==0.1.1.dev0')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 2927, in <module>
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 2913, in _call_aside
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 635, in _build_master
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 943, in require
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 829, in resolve
pkg_resources.DistributionNotFound: The 'openaps==0.1.1.dev0' distribution was not found and is required by the application
pi@Ewer-Open-APS:~/Documents/openaps $
Have you seen that one before?
Paul Martin
@Spazholio
May 13 2016 21:44
@bewest Alas, it still returns []. I’m pretty sure it should be returning something other than that, shouldn’t it? Something I noticed though - openaps use ns shell get treatments.json count=1000. If I’m reading this correctly, that’s getting treatments. However, wouldn’t I want entries? My Dexcom registered no gaps in the night, but NS did, and that’s what I want to fill in.
Scott Leibrand
@scottleibrand
May 13 2016 21:45
yeah, try that with entries instead
Ben West
@bewest
May 13 2016 21:45
huh?
aren't you trying to upload treatments?
pump-history needs to be reformatted as treatments and compared against the treatments record
the file you mentioned earlier was pump-history
Scott Leibrand
@scottleibrand
May 13 2016 21:46
@JaysonEwer that looks like a @bewest question
JaysonEwer
@JaysonEwer
May 13 2016 21:46
k
Ben West
@bewest
May 13 2016 21:46
@JaysonEwer looks like you recently upgraded?
JaysonEwer
@JaysonEwer
May 13 2016 21:47
:-D
Ben West
@bewest
May 13 2016 21:47
cd ~/src/openaps; sudo python setup.py develop
JaysonEwer
@JaysonEwer
May 13 2016 21:47
yes sir
Paul Martin
@Spazholio
May 13 2016 21:47
I believe I’m not, but I could be mistaken. IIRC, “treatments” are whenever the pump is sent a temp basal, right? If so, then no. I’m attempting to fill in glucose readings in my NS that are missing, but aren’t missing from my Dexcom. I mentioned the pump-history.json in my initial question since that’s what was in the docs, and I was not getting the results I believed I should be. Apologies if I misstated what I was looking to accomplish.
JaysonEwer
@JaysonEwer
May 13 2016 21:48
@bewest Done, try again?
pi@Ewer-Open-APS:~/Documents/openaps $ openaps use pump model
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 47, in __call__
    self.configure_parser(self.parser)
  File "/home/pi/src/openaps/bin/openaps-use", line 31, in configure_parser
    available = devices.get_device_map(self.config)
  File "/home/pi/src/openaps/openaps/devices/__init__.py", line 21, in get_device_map
    for device in Device.FromConfig(vendors, conf):
  File "/home/pi/src/openaps/openaps/devices/device.py", line 77, in FromConfig
    vendor = vendors.lookup(config.get(candidate, 'vendor').split('.').pop( ), config)
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 27, in lookup
    return get_map(config)[name]
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 22, in get_map
    vendors = all_vendors(config)
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 36, in all_vendors
    return get_vendors( ) + find_plugins(config)
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 16, in find_plugins
    return [ v.get_module( ) for v in vendors ]
  File "/home/pi/src/openaps/openaps/vendors/plugins/vendor.py", line 19, in get_module
    return importlib.import_module(self.name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named openapscontrib.timezones
pi@Ewer-Open-APS:~/Documents/openaps $
progress, we got a new error. :-D
Paul Martin
@Spazholio
May 13 2016 21:51
DGzSZ8h.png
JaysonEwer
@JaysonEwer
May 13 2016 21:51
crap, i'll have to work on this later. My wife and I have a date now. :-D
oops...:-/ bummer, loop will be offline for a few hours.
@bewest unless you can talk me through the fix on the way. :-D
going mobile now
tazitoo
@tazitoo
May 13 2016 21:53
I heard someone was talking about Alexa earlier - how about your own button for "eating soon" mode...put it on the fridge!
http://www.slashgear.com/amazon-now-has-a-programmable-dash-button-for-the-iot-13439996/
ddaniels1
@ddaniels1
May 13 2016 21:54
Can't find src directory that has oref0 code to install dev. I set it up originally using this: https://openaps.readthedocs.io/en/dev/docs/walkthrough/phase-0/openaps.html
help?
Paul Martin
@Spazholio
May 13 2016 21:54
Do you have a ~/src directory?
Ben West
@bewest
May 13 2016 21:54
@Spazholio if you want to do entries.json, that should be done with the glucose data, not the pump data
there's a new oref0_glucose use for dexcom that can format the glucose nicely
ddaniels1
@ddaniels1
May 13 2016 21:55
nope
Paul Martin
@Spazholio
May 13 2016 21:55
@bewest I agree. We got so far down the path with the fact I didn’t have the right tz installed, I lost sight of what I was actually trying to accomplish.
ddaniels1
@ddaniels1
May 13 2016 21:55
tried from root
Ben West
@bewest
May 13 2016 21:56
@JaysonEwer it looks like you may need to update openaps-contrib if you have a cd ~/src/openaps-contrib; git checkout master; git pull origin master; sudo python setup.py develop
ddaniels1
@ddaniels1
May 13 2016 21:56
I found an src directory on the pi but has nothing in it
it was in usr
Ben West
@bewest
May 13 2016 21:56
ah, if you do not have a src/openaps-contrib directory:
sudo pip install -U openaps-contrib
Paul Martin
@Spazholio
May 13 2016 21:57
@bewest Can you clarify what you mean when you’re talking about the oref0_glucose?
Ben West
@bewest
May 13 2016 21:58
you're running openaps use cgm oref0_glucose -h
you already have an glucose report of some kind?
some file with glucose data in it
Paul Martin
@Spazholio
May 13 2016 21:59
I’m going to assume so, since that’s part of the loop, no? And if not, it’s gotta be easily generated.
I mean, I have the monitor/glucose.json file. But I imagine I’ll have to query to Dexcom to get way more than the 5 entries that are in there.
Ben West
@bewest
May 13 2016 22:02
ok, let's play with that one for now
JaysonEwer
@JaysonEwer
May 13 2016 22:02
pi@Ewer-Open-APS:~/Documents/openaps $ openaps use pump model
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 47, in __call__
    self.configure_parser(self.parser)
  File "/home/pi/src/openaps/bin/openaps-use", line 31, in configure_parser
    available = devices.get_device_map(self.config)
  File "/home/pi/src/openaps/openaps/devices/__init__.py", line 21, in get_device_map
    for device in Device.FromConfig(vendors, conf):
  File "/home/pi/src/openaps/openaps/devices/device.py", line 77, in FromConfig
    vendor = vendors.lookup(config.get(candidate, 'vendor').split('.').pop( ), config)
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 27, in lookup
    return get_map(config)[name]
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 22, in get_map
    vendors = all_vendors(config)
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 36, in all_vendors
    return get_vendors( ) + find_plugins(config)
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 16, in find_plugins
    return [ v.get_module( ) for v in vendors ]
  File "/home/pi/src/openaps/openaps/vendors/plugins/vendor.py", line 19, in get_module
    return importlib.import_module(self.name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named openapscontrib.timezones
pi@Ewer-Open-APS:~/Documents/openaps $
Ben West
@bewest
May 13 2016 22:02
openaps report show --cli monitor/glucose.json
Paul Martin
@Spazholio
May 13 2016 22:03
openaps use cgm iter_glucose 5
Ben West
@bewest
May 13 2016 22:03
@JaysonEwer which update command did you run?
Paul Martin
@Spazholio
May 13 2016 22:03
Wait…that —cli flag will show me what was used to generate a given report?
Ben West
@bewest
May 13 2016 22:03
yes :-)
very useful for debugging
openaps use cgm oref0_glucose --no-raw --glucose monitor/glucose.json
try this though: openaps use cgm oref0_glucose
compare and contrast :-), what is the difference?
pro tip: there are other flags, --json, and --ini that will export the whole "object" represented as json or ini, respectively
live4sw
@live4sw
May 13 2016 22:08
Hi guys - quick question. Do any of you have a periodic reboot in your cron? Thinking it might be a good idea as I generally only reboot every week or two.
Ben West
@bewest
May 13 2016 22:08
if you have unlimited power, there's rarely a need to reboot
Scott Leibrand
@scottleibrand
May 13 2016 22:08
some of mine do. not sure how much it actually helps though.
I have issues with the Pi's going offline for no reason even when plugged into wall power. usually have to hard power cycle them though
Paul Martin
@Spazholio
May 13 2016 22:10
You’re asking me to visually diff JSON files? Sadist.
The second command gives me more elements in the returned JSON set.
Ben West
@bewest
May 13 2016 22:12
hmmm, no not the JSOn files :_)
live4sw
@live4sw
May 13 2016 22:12
Oh ok, fair. I have the good battery which you can charge while using, so probably no real need. Thanks!
Ben West
@bewest
May 13 2016 22:12
I mean, hmm did you notice any difference in behavior?
Paul Martin
@Spazholio
May 13 2016 22:12
So the second one is pulling from the Dexcom, whereas the first one uses the glucose.json file, right?
Ben West
@bewest
May 13 2016 22:12
what do the args maybe mean?
ah bingo
yeah
Paul Martin
@Spazholio
May 13 2016 22:12
I get there eventually. =)
Ben West
@bewest
May 13 2016 22:12
so you have two options then
you can consider replacing your glucose report with this thing
or you can make another report that uses the existing glucose report
btw, it looks like your glucose data is not zoned, so we'll have to add another report anyway
openaps/docs#132
these templates suggest mkdir raw-cgm and putting the reports directly from the device into this "raw" area
Paul Martin
@Spazholio
May 13 2016 22:14
Looks like all of my pump history reports (and clock reports) are zoned. Must have missed the CGM ones.
Ben West
@bewest
May 13 2016 22:14
then we'll use tz rezone to zone the data, put it into monitor/glucose.json
JaysonEwer
@JaysonEwer
May 13 2016 22:15
@bewest I'm getting the following after upgrading the contrib stuff.
ImportError: No module named openapscontrib.timezones
Ben West
@bewest
May 13 2016 22:15
which upgrade command did you use?
Paul Martin
@Spazholio
May 13 2016 22:16
So my current glucose.json is coming from the Dexcom directly, right? And I appear to have a monitor/cgm-glucose.json report. Uncertain if/where it’s used. Still looking.
Ben West
@bewest
May 13 2016 22:16
I suggested two different methods, depending on whether ~/src/openaps-contrib exists or not
@Spazholio doesn't matter too much, let's try creating a new report with the data from oref0_glucose:
Paul Martin
@Spazholio
May 13 2016 22:16
And it pulls the last 25 hours.
Ok.
Ben West
@bewest
May 13 2016 22:17
I suggest making a "raw" version first
for that you'll want --hours 25 as well
Paul Martin
@Spazholio
May 13 2016 22:18
Ok.
Dana Lewis
@danamlewis
May 13 2016 22:18
@tazitoo alexa, dash button…all awesome options, someone just needs to make an IFTT integration with NS care portal ;)
Ben West
@bewest
May 13 2016 22:18
@JaysonEwer : ls ~/src/openaps-contrib
Paul Martin
@Spazholio
May 13 2016 22:22
I’m still a little iffy on the format used to create reports. I imagine it at least starts with openaps report add raw-cgm/glucose.json JSON - right?
Ben West
@bewest
May 13 2016 22:23
replace use with report add file.json JSON
yup
everything after use is identical
you can verify with show --json
ddaniels1
@ddaniels1
May 13 2016 22:23
anyone know the command to find my oref0 directory?
struggling
Ben West
@bewest
May 13 2016 22:24
@ddaniels1 it's often something like this: ls ~/src
ddaniels1
@ddaniels1
May 13 2016 22:24
don't have src
Scott Leibrand
@scottleibrand
May 13 2016 22:24
@ddaniels1 if you don't have a ~/src/oref0 directory, you need to run quick-src.sh (or do manually what it does)
Ben West
@bewest
May 13 2016 22:24
ok, you installed it via npm, are you trying to update?
you don't need to run that
ddaniels1
@ddaniels1
May 13 2016 22:24
trying to get the dev branch
Ben West
@bewest
May 13 2016 22:24
if you're trying to update to dev:
Scott Leibrand
@scottleibrand
May 13 2016 22:24
ben will show you how to do it manually :)
Ben West
@bewest
May 13 2016 22:25
sudo npm install -g git://github.com/openaps/oref0.git'#dev'
Paul Martin
@Spazholio
May 13 2016 22:25
And what do I want in the report? I know it’ll at least be openaps use cgm oref0_glucose —hours 25 but I see that there are other flags, and I’m uncertain if I need/want them?
Ben West
@bewest
May 13 2016 22:26
well, try them out
the --glucose and --sensor flags allow reading from file
if you leave those out, it'll read from the receiver
it'll read --hours hours
Paul Martin
@Spazholio
May 13 2016 22:27
I did it without the —glucose flag, and I still got data including glucose readings. And your last sentence made that make sense.
Ben West
@bewest
May 13 2016 22:27
ah, --threshold is how close a sensor vs egv record needs to be in order to merge them together
in seconds I think
Paul Martin
@Spazholio
May 13 2016 22:28
The help docs indicate something slightly different, and that was about to be my next question. =)
ddaniels1
@ddaniels1
May 13 2016 22:28
@bewest looks like that worked, thanks!
Paul Martin
@Spazholio
May 13 2016 22:31
Ok, report created, and working. I now have a huge honking raw-cgm/glucose.json file with the last 25 hours of readings.
So I imagine the logical flow from this is to somehow compare it to what NS has from the last 25 hours, then upload the diffs back to NS?
Ben West
@bewest
May 13 2016 22:34
zone it up
report add monitor/glucose.json JSON tz rezone --astimezone --date display_time --date dateString
you'll need matching --date , relative to previous snippet
same way we're talking about entries instead of treatments
Paul Martin
@Spazholio
May 13 2016 22:41
Assume replacing monitor/glucose.json should be replaced with raw-cgm/glucose.json? Not being pedantic, just checking.
Ben West
@bewest
May 13 2016 22:45
no
you want the zoned version
so now we have a raw version
if we add that zoned report, let's invoke that to get it zoned
then we'll have a zoned, merged, ns-formatted monitor/glucose.json
Paul Martin
@Spazholio
May 13 2016 22:46
Oh, so I’m replacing whatever usually generates my monitor/glucose.json with this new, zoned one. Got it.
Hang on, I have to reboot my Pi.
usage: openaps-report add report {base,text,stdout,JSON} tz rezone
       [-h] [--timezone TIMEZONE] [--adjust {missing,replace}] [--date DATE]
       [--astimezone]
       input
openaps-report add report {base,text,stdout,JSON} tz rezone: error: too few arguments
Ben West
@bewest
May 13 2016 22:49
something like this:
Paul Martin
@Spazholio
May 13 2016 22:49
Is it becase there are two —date flags?
Ben West
@bewest
May 13 2016 22:49
report add monitor/glucose.json JSON tz rezone --astimezone --date display_time --date dateString
oh that's what you did?
Paul Martin
@Spazholio
May 13 2016 22:49
Correct.
Ben West
@bewest
May 13 2016 22:49
oh
hahaha
it's missing the raw file on the end there
it needs to know which file to add zones to
Paul Martin
@Spazholio
May 13 2016 22:50
So just pass it the raw-cgm/glucose.json on the end?
Ben West
@bewest
May 13 2016 22:50
it's whatever you named that raw file
Paul Martin
@Spazholio
May 13 2016 22:50
k
Ben West
@bewest
May 13 2016 22:50
yup
Paul Martin
@Spazholio
May 13 2016 22:51
Ok, got it.
Ben West
@bewest
May 13 2016 22:51
invoke that new one and we can play with it
we're finally getting to my favorite part, lsgaps and select
Paul Martin
@Spazholio
May 13 2016 22:53
Got it.
Looks like my loop automatically generates the monitor/glucose.json file. Is that going to wonk things up when it uploads?
BG data is too old, or clock set incorrectly Fri May 13 2016 18:28:09 GMT-0400 (EDT) vs Fri May 13 2016 18:54:48 GMT-0400 (EDT) Oof. Is what we’re doing throwing things off?
Paul Martin
@Spazholio
May 13 2016 22:59
Actually, if I’m following the logic, I think it is. The monitor/glucose.json is generated from raw-cgm/glucose.json but that’s a manually generated file, since I don’t have my CGM hooked up to my Pi 100% of the time...
(feel free to poke holes here)
Ben West
@bewest
May 13 2016 23:00
you'll need to add the raw file wherever that gets invoked
so it should say invoke raw-cgm/glucose.json monitor/glucose.json in the alias
so that they occur back to back
Paul Martin
@Spazholio
May 13 2016 23:00
But what happens if the CGM isn’t attached?
Ben West
@bewest
May 13 2016 23:01
then that part of the alias will fail, in mine the loop stops if that happens
Paul Martin
@Spazholio
May 13 2016 23:01
…oh.
That’s not good, is it?
I mean, I very rarely have the CGM attached to the Pi.
Ben West
@bewest
May 13 2016 23:01
dunno
Paul Martin
@Spazholio
May 13 2016 23:02
And it was working previously. I think adding this report overwrote the old monitor/glucose.json. Hmm.
Ben West
@bewest
May 13 2016 23:02
ah, how were you planning on getting glucose in?
yeah, instead of unzoned iter_glucose, it's now zoned oref0_glucose
Paul Martin
@Spazholio
May 13 2016 23:03
Well, however it was before? I thought it would pull from the CGM if connected, if not then it would pull from NS.
Which is just fine. This thing we’re working on now was just to fill in gaps.
I can check @scottleibrand’s setup.sh to see how the old monitor/glucose.json was generated, because I don’t remember.
Ben West
@bewest
May 13 2016 23:04
mine isn't that fancy yet
Scott Leibrand
@scottleibrand
May 13 2016 23:04
yeah, my setup uses ns-glucose if cgm-glucose isn't available.
Paul Martin
@Spazholio
May 13 2016 23:04
I’m happy to not have this thing we’re working on be a part of the loop, yet. Just a one-off kind of thing.
Scott Leibrand
@scottleibrand
May 13 2016 23:04
you'll probably want to use this stuff to produce the cgm-glucose, and keep the same logic to select ns-glucose if it's not available
or yeah, make it a new thing that's not in the loop at all
Paul Martin
@Spazholio
May 13 2016 23:07
@scottleibrand Do you have the settings for the original monitor/glucose.json report?
Ben West
@bewest
May 13 2016 23:07
it shouldn't change much
you just need t oadd the raw on
you need to add the raw report so it occurs just before monitor/glucose.json in several places
openaps alias show
lsgaps and select both accept any number of input files
so you can give them both NS and Dexcom files ,and it will merge them accordingly
Paul Martin
@Spazholio
May 13 2016 23:08
I think I know what needs to be done. Just working it through in my head. Did you want to see the entire output of openaps alias show?
Ben West
@bewest
May 13 2016 23:08
mmmm, no
Paul Martin
@Spazholio
May 13 2016 23:08
heh
Ben West
@bewest
May 13 2016 23:09
openaps alias show | grep 'monitor/glucose.json'
I'll have a peek at that though, hehehe
Paul Martin
@Spazholio
May 13 2016 23:09
monitor-cgm report invoke monitor/glucose.json
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 )"
wait-for-bg ! bash -c "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”
Ben West
@bewest
May 13 2016 23:09
that first one especially
actually just that one
just name the raw file right after invoke, before monitor/glucose.json
Paul Martin
@Spazholio
May 13 2016 23:11
Ok.
Ben West
@bewest
May 13 2016 23:11
now it should be same as before, basically
Paul Martin
@Spazholio
May 13 2016 23:11
I did that, then ran the monitor-cgm alias and got:
cgm://JSON/oref0_glucose/raw-cgm/glucose.json
raw-cgm/glucose.json  raised  'NoneType' object has no attribute 'iter_records'
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-report", line 82, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/home/pi/src/openaps/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/home/pi/src/openaps/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/home/pi/src/openaps/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/home/pi/src/openaps/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/home/pi/src/openaps/openaps/vendors/dexcom.py", line 381, in main
    iter_glucose = self.get_glucose_data(params, args)
  File "/home/pi/src/openaps/openaps/vendors/dexcom.py", line 360, in get_glucose_data
    return itertools.takewhile(self.comparison, self.dexcom.iter_records('EGV_DATA'))
AttributeError: 'NoneType' object has no attribute ‘iter_records’
Ben West
@bewest
May 13 2016 23:12
ok
Paul Martin
@Spazholio
May 13 2016 23:12
I suspect because my CGM isn’t connected?
Ben West
@bewest
May 13 2016 23:12
yes
Paul Martin
@Spazholio
May 13 2016 23:14
I think get-bg mitigates that properly, if I’m reading it correctly?
Ben West
@bewest
May 13 2016 23:14
yeah, sort of
I'm about to introduce you to a new way
Paul Martin
@Spazholio
May 13 2016 23:15
Running get-bg now produces a monitor/glucose.json that’s clearly from NS rather than the CGM.
Oh, ok.
Ben West
@bewest
May 13 2016 23:15
using lsgaps and select
ddaniels1
@ddaniels1
May 13 2016 23:16

@bewest Basic question about adding devices. I read the original docs and it is not clear what the syntax is for adding the required data. I am working on configuring autosense (and editing your doc on it to explain it to non programmers, my first PR!). The doc says:

After applying the above change you need to add a new device and report as follow:

[device "auto-sens"]
vendor = openaps.vendors.process
extra = auto-sens.ini

and your auto-sens.ini should look like this:
```
[device "auto-sens"]
fields = glucose pumphistory insulin_sensitivities basal_profile profile
cmd = oref0
args = detect-sensitivity

The question is in order to add this device I would suspect you do:
`openaps device add process --' And then what? Couldn't sort this out with -h. Help me understand so I can explain to the non programmers out there

Ben West
@bewest
May 13 2016 23:16
openaps device add process auto-sens oref0-auto-sens
the parameters would go after
if someone has a working one of these, they can donate theirs as a recipe/template to the community by doing:
openaps device show auto-sens --json
Scott Leibrand
@scottleibrand
May 13 2016 23:19
$ openaps device show detect-sensitivity --json
{"extra": {"fields": "glucose pumphistory isf basal_profile profile", "cmd": "oref0", "args": "detect-sensitivity"}, "type": "device", "name": "detect-sensitivity", "detect-sensitivity": {"vendor": "openaps.vendors.process", "extra": "detect-sensitivity.ini"}}
Ben West
@bewest
May 13 2016 23:19
openaps device add auto-sens process --require "glucose pumphistory insulin_sensitivities basal_profile profile" oref0 detect-sensitivity, based on that snippet
Paul Martin
@Spazholio
May 13 2016 23:22
@bewest The logic that @scottleibrand has in get-bg in addition to the adjustments you had me make seem to have gotten my loop working again, so while I’m interested in this mythical lsgaps and select I keep hearing about, no rush. =)
Ben West
@bewest
May 13 2016 23:25
$ oref0 template mint device oref0  | json -a  name  
cmd extra.args   
oref0 oref0 
detect-sensitivity oref0 detect-sensitivity
get-profile oref0 get-profile
calculate-iob oref0 calculate-iob
determine-basal oref0 determine-basal
well, you still want to do the backfill, right?
we're going to use lsgaps for that, and it's what I need to explain it to someone anyway
ddaniels1
@ddaniels1
May 13 2016 23:27
OK so the basic pattern is: openaps device add <device name> process --require "<fields>" <cmd> <args>
is that correct?
Ben West
@bewest
May 13 2016 23:27
yup :-)
@Spazholio so it might look something like this when all done "inline": openaps use ns shell get entries.json count=1000 | openaps use tz rezone --astimezone --date dateString --date display_time - | openaps use tz lsgaps --date dateString --before now - | openaps use tz select --date dateString --gaps - monitor/glucose.json
what this does it look at last 1k sgvs from NS, look for any gaps, feed the gaps specification to select data from the monitor/glucose.json file
so if you have a report to get data from NS already (which you do)
you can even select cgm-data.json ns-data.json and it will work
so that could be another way to implement the merging
always try to get both
if it fails, the file is empty
always try to merge both
then always upload only the missing gaps
Paul Martin
@Spazholio
May 13 2016 23:31
So you’re suggesting to actually merge the gap-fixing into the main loop itself, rather than as a one-off?
And I know we sorta talked about this but I forgot - does it de-dupe?
Ben West
@bewest
May 13 2016 23:33
it's something to think about, yeah
might not be quite ready, might need some more tweaks as we play around with it
but yeah, it seems a lot simpler
to always try to get data from NS and Dexcom if possible
doing the gap thing kind of dedupes it.... it prevents duplication but doesn't deduplicate per se
Paul Martin
@Spazholio
May 13 2016 23:34
So there’s a possibility of duplicate data getting uploaded to NS, right?
Ben West
@bewest
May 13 2016 23:34
you can feed both lsgaps and select both the dexcom and the NS data at the same time
no
because you're selecting and lsgaping both data sets at same time, only the missing bits come out in the end
so you only get missing/latest records
Paul Martin
@Spazholio
May 13 2016 23:35
Ah, ok.
Ben West
@bewest
May 13 2016 23:35
but if there's a duplicate record in there, it won't remove it per se
in order for a record to come out on the end, it must be missing from one of the data sets
the --after now switches help control how much of a timeframe should be in there
eg if NS doesn't have recent data, it should generate a gap between now and then
so --after now or --before now help express that
Ben West
@bewest
May 13 2016 23:40
there are a few things that would be really helpful, like if the uses knew how to take a --fill gaps.json switch
then it could mostly be done with dumb reports
so imagine something like....
openaps use lsgaps old-ns.json old-dexcom.json | openaps use ns shell get --fill - entries.json count=1000 | openaps use tz rezone --astimezone --date dateString --date display_time - | openaps use tz lsgaps --date dateString --before now - | openaps use tz select --date dateString --gaps - monitor/glucose.json, and a similar oref0_glucose --fill option
could allow them to basically dynamically query for only the missing data
against the local cache