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

29th
Mar 2016
Jim Matheson
@jmatheson
Mar 29 2016 00:27
@scottleibrand re I think we need to update the autosens documentation to make the full 28h pumphistory query a separate report that is only run after everything else, so if it fails it doesn't stop the loop
Would that then be the last thing before enact? and then use the 28h history if is there, otherwise use the 6 hour
Brian Bonner
@itsn0tm3
Mar 29 2016 00:29
Hmm interesting, I had a high carb lunch and I think I put in the right about of insulin in my bolus. OpenAPS decided that it was too much even though my blood sugar never went below 133 and low tempted me for a while and eventually hit 243 and now it's high temping me. The interesting thing is that my range is set to 100-130 so I'm not sure why it low-temped me since I never went below 130? I'm kicking in quite a bit of insulin now just to try to get it back down again
I was at 183 when I did the bolus too, so I had put in a bit more insulin to get my blood sugar down to the right place too
Jim Matheson
@jmatheson
Mar 29 2016 00:30
it was only low temping when you were dropping right?
(to narrow the discussion)
amoskane
@amoskane
Mar 29 2016 00:31
@eluhrs gracias!
Brian Bonner
@itsn0tm3
Mar 29 2016 00:31
@jmatheson No actually, it was dropping -1 then it would go up +1 then it would drop down -1 (up and down)
the fastest drop I saw during the whole thing was -4
actually the biggest drop was -7 when I was at 152
Jim Matheson
@jmatheson
Mar 29 2016 00:32
i’d say go back and pull what happened each step of the way. it should be telling why it made each decision that it did
Brian Bonner
@itsn0tm3
Mar 29 2016 00:32
then the carbs started kicking in and it flattened out
yeah will need to look in the logs, I think it was freaking out that my eventual BG was -277<100
Jim Matheson
@jmatheson
Mar 29 2016 00:33
i had a similar set of questions about a week ago in here.
Brian Bonner
@itsn0tm3
Mar 29 2016 00:34
my blood sugar is 241 now :( oh well
I guess I'll look at the logs and compare with your discussion and see
Jim Matheson
@jmatheson
Mar 29 2016 00:35
did you manually correct?
run something like this to get what happened sudo grep openaps-loop /var/log/syslog | grep reason | grep "Mar 28”
Brian Bonner
@itsn0tm3
Mar 29 2016 00:36
yep manually correcting now trying to get it down, still going up a bit
Jim Matheson
@jmatheson
Mar 29 2016 00:36
frustrating
Brian Bonner
@itsn0tm3
Mar 29 2016 00:36
agreed
will check the log when I get home, don't have access to the APS from here at work due to it using my phone's hotspot for NS access
Jim Matheson
@jmatheson
Mar 29 2016 00:37
how long did it low temp for? if not too long then it probably was not a big factor in the high since you had IOB from your bolus which it sounds like you knew would need a big dose
Brian Bonner
@itsn0tm3
Mar 29 2016 00:37
almost a hour
I was watching it on NS thinking to myself, ooh I must have bolused too much
then thought to myself, but it didn't even let it get down into my range first before low-temping.. hmm..
Jim Matheson
@jmatheson
Mar 29 2016 00:38
yeah sounds very similar to my questions
if only it were easy to find old posts in here :)
Brian Bonner
@itsn0tm3
Mar 29 2016 00:38
then it just started shooting up and high bolused me like no tomorrow
Dana Lewis
@danamlewis
Mar 29 2016 00:39
Which branch are you on?
Brian Bonner
@itsn0tm3
Mar 29 2016 00:39
then me going D'oH! should have cancelled all those low temps
Dev
I think the older Dev tho since I don't have autosense in
Jim Matheson
@jmatheson
Mar 29 2016 00:40
:point_up: March 27, 2016 3:30 PM was one conversation from yesterday
Brian Bonner
@itsn0tm3
Mar 29 2016 00:40
@jmatheson too bad we can't just go "find that discussion I'm thinking of!" and have it pop up heh
yea that is a bit similar, but you were low while I was high
Jim Matheson
@jmatheson
Mar 29 2016 00:42
:point_up: March 19, 2016 4:09 PM and part of the earlier thread with more conversation below it
the mar 19 was similar
my BG was flat and not really dropping
even well after a pre bolus
not exactly the same, but i think the answer to why is going to be similar
Brian Bonner
@itsn0tm3
Mar 29 2016 00:44
hmm interesting'
yeah
let me see if the bolus snooze number is in the pill
Jim Matheson
@jmatheson
Mar 29 2016 00:44
should be
Brian Bonner
@itsn0tm3
Mar 29 2016 00:44
hmm my IOB was 7.45 and the bolus snooze was 3.0
that was when I was at 140 and flat
Need to go home and see the reasons in the log sequentially, I think that'll explain it better than my NS retroactive view
yea at one other point it was 141 and going up +5 and the eventual BG was -130<100, IOB was 6.74 and bolus snooze was 2.0 and it still low temped (shrugs)
Jason Calabrese
@jasoncalabrese
Mar 29 2016 00:49
@jmatheson getting the 28h history should be after enact, where failing doesn't matter
Jim Matheson
@jmatheson
Mar 29 2016 00:53
but doesn’t that factor into what we decide to enact?
if resistance is higher or lower then we adjust
if it did not fail we want to use it, if it did fail then we roll without it.
Jim Matheson
@jmatheson
Mar 29 2016 00:58
this is my current psuedo code for the loop with some of the new things recently discussed. would love feedback.
Screen Shot 2016-03-28 at 5.58.23 PM.png
Jason Calabrese
@jasoncalabrese
Mar 29 2016 00:59
the autosens doesn't seem to change very fast, I'm curious what everyone else sees, but after seeing a few 95-99's it's always been 100
Jim Matheson
@jmatheson
Mar 29 2016 01:01
when i was running it before i only had it partially working. i asked the same thing and scott took a look at the output from logs and then i had to do some more work. wish i had a backup of what i implemented back then :)
Jason Calabrese
@jasoncalabrese
Mar 29 2016 01:01
this is what I'm doing now, but want to optimize more https://github.com/jasoncalabrese/indy-e3/blob/master/openaps.ini#L17-L19
Jim Matheson
@jmatheson
Mar 29 2016 01:05
so since the long 24 hour things are the last thing in your wait loop if it fails nothing gets skipped
i don’t quite understand this, despite having used it in one of my loops myself retry-loop = ! bash -c "openaps wait-loop || until( ! openaps preflight || openaps loop); do sleep 10; done”
Jason Calabrese
@jasoncalabrese
Mar 29 2016 01:10
it's some bash magic I picked from here awhile ago, the wait-loop waits for the next bg before enacting, it's combined with a cron that kills any openaps processes running over 10mins
Jim Matheson
@jmatheson
Mar 29 2016 01:10
yeah, i just want to understand the magic.
Jason Calabrese
@jasoncalabrese
Mar 29 2016 01:12
with your sparkfun rig do you have to unplug the stick sometimes? find a way to automate that like we reset usb on the pi
Jim Matheson
@jmatheson
Mar 29 2016 01:12
maybe 2-3x a week.
Jason Calabrese
@jasoncalabrese
Mar 29 2016 01:13
I had 3 last night
hasn't happened like that before
only big change is adding the extra autosens stuff
maybe unrelated
Jim Matheson
@jmatheson
Mar 29 2016 01:14
i think the || just runs to the right if the thing on the left fails.
so it is running wait-loop but if that fails it runs preflight until it succeeds and then runs regular loop. and if preflight fails it waits 10 seconds and repeats. ? that is my best stab
Jason Calabrese
@jasoncalabrese
Mar 29 2016 01:15
I think it can be simplified
Jim Matheson
@jmatheson
Mar 29 2016 01:16
your loop and wait loop are the same except one is waiting for a BG and the other is not. you also have the 24 thing in one but seems like it should be in both?
Jason Calabrese
@jasoncalabrese
Mar 29 2016 01:16
I had it in both, but took it out of 1
it could probably run 1 time an hour and be fine
Jim Matheson
@jmatheson
Mar 29 2016 01:17
i actually for awhile when i was on my setup that died - i was just doing loop. i was never doing wait for bg. just re-running every time
Jason Calabrese
@jasoncalabrese
Mar 29 2016 01:18
openaps loop; openaps wait-loop might be good
Jim Matheson
@jmatheson
Mar 29 2016 01:18
why is that, does auto sens take into account both the short and long history?
if so and your short history is 6 hours, then really only needs to be pulled every 4 hours or so
Jason Calabrese
@jasoncalabrese
Mar 29 2016 01:19
I never really messed with that just left what I had from when first setting things up, but now looking at it...
Jim Matheson
@jmatheson
Mar 29 2016 01:20
with the new things i am starting to get confused. the ini is feeling like a mess
Jason Calabrese
@jasoncalabrese
Mar 29 2016 01:20
it's not efficient at all, why I was dragging my feet setting it up
yeah, thats how I was feeling too, and testing changes is a pain, so easy to make a typo
I got a 2nd rig setup, put a pump and pi zero in a box covered with tin foil, and let it run
thought I'd test everything there, but it doesn't know about boluses or carbs...
the only that came out of that is I found the pi zero and erf is really reliable
been going for days without opening the box
Scott Leibrand
@scottleibrand
Mar 29 2016 01:56
Autosens won't change more than about 1% every 15 minutes, so it doesn't have to refresh every loop. Stale autosens data is fine.
I haven't come up with anything better than refreshing the DIA-hour pumphistory frequently and the 24+DIA hour one after everything else is done including enact
if we had some good way to keep state, maybe download pumphistory from NS, that might work better.
Jim Matheson
@jmatheson
Mar 29 2016 01:59
and with that approach it just uses the last version that was downloaded (of the 24+) each time it loops? so it’s one loop behind or more…but not a big deal
Scott Leibrand
@scottleibrand
Mar 29 2016 01:59
Right.
Jim Matheson
@jmatheson
Mar 29 2016 01:59
ok, that makes sense.
Scott Leibrand
@scottleibrand
Mar 29 2016 01:59
Stuff that happened a few minutes ago doesn't affect insulin activity much yet.
Jim Matheson
@jmatheson
Mar 29 2016 02:00
but there is no combining the short and long history, so if long gets out of date and short is up to date it won’t see that
Scott Leibrand
@scottleibrand
Mar 29 2016 02:00
Even regular pumphistory would be fine to us up to 15m stale, except we need to know about new boluses so we can stop high temping.
Right
Jim Matheson
@jmatheson
Mar 29 2016 02:01
it does seem like pulling from NS or even some sort of local history might be helpful since pump comms are flaky and burn battery, etc.
Scott Leibrand
@scottleibrand
Mar 29 2016 02:01
if we downloaded from NS it wouldn't have to refresh everything, and would use each newly refreshed one.
Yeah
Jim Matheson
@jmatheson
Mar 29 2016 02:02
pulling 288 from NS is no harder than pulling 5 on the BG side right?
Scott Leibrand
@scottleibrand
Mar 29 2016 02:02
Just a few more KB
It is an issue with openxshareble though.
Jim Matheson
@jmatheson
Mar 29 2016 02:02
yeah, that was next question
it seems like in general for both it’d be good to pull only as far back as we need since our last pull.
Scott Leibrand
@scottleibrand
Mar 29 2016 02:04
yep. But keeping state reliably is hard.
Jim Matheson
@jmatheson
Mar 29 2016 02:04
but there is something nice about not having to have a local db or whatever.
Scott Leibrand
@scottleibrand
Mar 29 2016 02:05
"There are only two hard things in Computer Science: cache invalidation and naming things."
Or: "There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors."
and we could certainly fall back to querying the full 28h pumphistory if NS comms fail.
I don't think the longer query hurts battery much. Once the radio is on it doesn't seem to matter how much you use it. But flaky comms are annoying.
Although openaps/oref0#78 helps a lot with that.
Brian Bonner
@itsn0tm3
Mar 29 2016 02:14
hmm well I'm home and looking at my logs now and I don't see much reason why it started low temping me
but then I think I'm just clueless (chuckles)
I went from this:
Mar 28 17:36:06 mobileaps openaps: {"temp":"absolute","bg":143,"tick":"+0","even tualBG":-217,"snoozeBG":129,"reason":"Eventual BG -217<100bolus snooze: eventual BG range -217-129"}
to this:
Mar 28 17:41:15 mobileaps openaps: {"temp":"absolute","bg":143,"tick":"+0","even tualBG":-201,"snoozeBG":97,"reason":"Eventual BG -201<100, no temp, setting 0.87 U/hr","duration":30,"rate":0.85}
my bg wasn't changing and it low temped me?
then I went to this:
Scott Leibrand
@scottleibrand
Mar 29 2016 02:17
The difference there is that bolus snooze was decaying away, dropping snoozeBG.
Brian Bonner
@itsn0tm3
Mar 29 2016 02:18
Mar 28 17:56:08 mobileaps openaps: {"temp":"absolute","bg":140,"tick":"+0","even tualBG":-154,"snoozeBG":22,"reason":"Eventual BG -154<100, temp 0.275 <~ req 0.5 1U/hr"}
yeah but my blood sugar was stable and not changing and the eventual BG was getting better
so I don't get WHY it low-temped e?
err me?
Scott Leibrand
@scottleibrand
Mar 29 2016 02:19
It should have been looking at deviation and avoiding a low temp as long as BG delta was >=0
what version of oref0 are you on?
Brian Bonner
@itsn0tm3
Mar 29 2016 02:19
I think dev
Scott Leibrand
@scottleibrand
Mar 29 2016 02:19
This behavior feels like old master code
Brian Bonner
@itsn0tm3
Mar 29 2016 02:20
hmm lemme run the scripts again and see if I can get it to update
Scott Leibrand
@scottleibrand
Mar 29 2016 02:20
before I did expected delta.
Brian Bonner
@itsn0tm3
Mar 29 2016 02:21
ah whoops the mobile rig is using master
Scott Leibrand
@scottleibrand
Mar 29 2016 02:21
K
Brian Bonner
@itsn0tm3
Mar 29 2016 02:21
the home rig must be the one using dev
Scott Leibrand
@scottleibrand
Mar 29 2016 02:21
dev should be a lot better.
Brian Bonner
@itsn0tm3
Mar 29 2016 02:21
yea let me move the mobile one to dev
Jason Calabrese
@jasoncalabrese
Mar 29 2016 02:24
we could do the calculations on the NS server
once we pull oref0 into NS the code will be there
then we send back the result
Scott Leibrand
@scottleibrand
Mar 29 2016 02:25
Interesting.
Jason Calabrese
@jasoncalabrese
Mar 29 2016 02:26
there are data model things that we need to convert between NS and oref0
Scott Leibrand
@scottleibrand
Mar 29 2016 02:26
That might use the same API as stuff like temporary BG targets for eating soon and activity mode.
Jason Calabrese
@jasoncalabrese
Mar 29 2016 02:26
I started working on a properties api
so you would have /api/v2/oref0.json
Scott Leibrand
@scottleibrand
Mar 29 2016 02:27
OpenAPS could ask NS for several different kinds of things, and only accept responses wishing certain ranges.
Jason Calabrese
@jasoncalabrese
Mar 29 2016 02:27
I like like idea of asking for things and checking the results
Scott Leibrand
@scottleibrand
Mar 29 2016 02:27
Autosens, temp BG targets, what else?
Jason Calabrese
@jasoncalabrese
Mar 29 2016 02:28
for NS I haven't had to keep it fully locked down, I get a notification for any treatment, but they don't have to login at school, but they only ever enter carb corrections now
Jason Calabrese
@jasoncalabrese
Mar 29 2016 02:34
but I think if I add the authorized flag, then I can start by only having the rigs trust treatments posted with the api secret
but modes is something else
Scott Leibrand
@scottleibrand
Mar 29 2016 02:48
Would modes not use the same auth framework?
Brian Bonner
@itsn0tm3
Mar 29 2016 02:54
ok weird, I have an error in upload-status.json after updating to dev
some error about missing a module?
ns-status://JSON/shell/monitor/upload-status.json
Could not require: /home/pi/mobileaps/[ { [Error: Cannot find module '/home/pi/mobileaps/['] code: 'MODULE_NOT_FOUND' }
reporting monitor/upload-status.json
cat: entries.json: No such file or directory
Scott Leibrand
@scottleibrand
Mar 29 2016 02:55
That usually comes from not having a NIGHTSCOUT_HOST ENV variable.
Brian Bonner
@itsn0tm3
Mar 29 2016 02:56
(groans) I really need to figure out a way to keep my rigs straight
and you're right
wonder why my cron failed
since it's in there
ok moved it around lets see if that works
Brian Bonner
@itsn0tm3
Mar 29 2016 03:07
and it's working now
hopefully that'll take care of those meal issues I've been having
(squints) wait a min, the error is still there
'''Mar 28 23:06:19 mobileaps openaps: }tz://JSON/rezone/monitor/pumphistory-zoned.json
Mar 28 23:06:19 mobileaps openaps: reporting monitor/pumphistory-zoned.json
Mar 28 23:06:24 mobileaps openaps: Could not require: /home/pi/mobileaps/[ { [Error: Cannot find module '/home/pi/mobileaps/['] code: 'MODULE_NOT_FOUND' }
Mar 28 23:06:24 mobileaps openaps: ns-status://JSON/shell/monitor/upload-status.json
Mar 28 23:06:24 mobileaps openaps: reporting monitor/upload-status.json
'''
the env is there since it says "uploaded to bla bla then my site"
so it can't be the env?
Mar 28 23:06:26 mobileaps logger: Uploaded monitor/upload-status.json to https://(cleanedup).azurewebsites.net/
hmm I think I ahve something weird in there
there's a cut off line
Mar 28 23:11:43 mobileaps openaps: fined Boluses: undefined Target: 114 Deviation: 21 BGI: -5.9","tick":"+3"}},"created_at":"2016-03-29T03:11:35.562Z","_id":"56f9f267a0321840443693ae"}]No recent treatments to upload
Brian Bonner
@itsn0tm3
Mar 29 2016 03:17
ah lemme try run it line by line and see if that module still shows up in the same place
yep still in status-upload
Scott Leibrand
@scottleibrand
Mar 29 2016 03:18
Time to drill down and run it manually, and check the inputs.
Brian Bonner
@itsn0tm3
Mar 29 2016 03:19
it must be this one: remainder = []
I think I need to remove and re-add in the status-upload.json since I moved over to dev
?
hmm can't be that, I have that in another one of my reports
ooh maybe its teh device
ugh everything looks OK
[report "monitor/upload-status.json"]
suggested = enact/suggested.json
status = monitor/status.json
use = shell
reservoir = monitor/reservoir.json
reporter = JSON
battery = monitor/battery.json
clock = monitor/clock-zoned.json
json_default = True
device = ns-status
remainder = []
iob = monitor/iob.json
enacted = enact/enacted.json
ran all the report and all of them go through just fine
Brian Bonner
@itsn0tm3
Mar 29 2016 03:24
the only one that isn't there is mmtune.json but that's in [ ] meaning it's optional correct?
Scott Leibrand
@scottleibrand
Mar 29 2016 03:32
Look at the actual ns-status script. Its required arguments probably changed.
Run it on the command line without arguments
Brian Bonner
@itsn0tm3
Mar 29 2016 03:32
I did
Scott Leibrand
@scottleibrand
Mar 29 2016 03:32
and then manually add in the ones in the device and report to try to repro
Brian Bonner
@itsn0tm3
Mar 29 2016 03:33
usage:  [ 'node', '/usr/local/bin/ns-status' ] <clock.json> <iob.json> <suggested.json> <enacted.json> <battery.json> <reservoir.json> <status.json> [mmtune.json]
oh I see what you're saying, the order probably changed
Brian Bonner
@itsn0tm3
Mar 29 2016 04:33
blah I still have the same problem?
re-added both the device and the report
Brian Bonner
@itsn0tm3
Mar 29 2016 04:39
when I run ns-status manually, it works fine
pi@mobileaps:~/mobileaps $ openaps report invoke monitor/upload-status.json ns-status://JSON/shell/monitor/upload-status.json Could not require: /home/pi/mobileaps/[ { [Error: Cannot find module '/home/pi/mobileaps/['] code: 'MODULE_NOT_FOUND' } reporting monitor/upload-status.json
pi@mobileaps:~/mobileaps $ ns-status monitor/clock.json monitor/iob.json enact/suggested.json enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json {"device":"openaps://mobileaps","openaps":{"iob":{"netbasalinsulin":0.1,"activity":0.0085,"basaliob":0.327,"hightempinsulin":0.5,"bolussnooze":0,"iob":0.431,"timestamp":"2016-03-29T04:32:50.000Z"},"suggested":{"temp":"absolute","bg":141,"tick":"+13","eventualBG":159,"snoozeBG":146,"mealAssist":"On: 50%, 50%, Carbs: undefined Boluses: undefined Target: 110 Deviation: 25 BGI: -2","reason":"Eventual BG 159>=130, no temp, setting 2.232U/hr","duration":30,"rate":2.25,"timestamp":"2016-03-29T04:32:54.000Z"},"enacted":{"bg":141,"temp":"absolute","snoozeBG":146,"recieved":true,"reason":"Eventual BG 159>=130, no temp, setting 2.232U/hr","rate":2.25,"eventualBG":159,"timestamp":"2016-03-29T04:33:05.000Z","duration":30,"mealAssist":"On: 50%, 50%, Carbs: undefined Boluses: undefined Target: 110 Deviation: 25 BGI: -2","tick":"+13"}},"pump":{"clock":"2016-03-29T00:32:24","battery":{"status":"normal","voltage":1.26},"reservoir":132.7,"status":{"status":"normal","bolusing":false,"suspended":false,"timestamp":"2016-03-29T04:32:43.000Z"}}}
I think I'm missing something simple here but I dunno what it is. urgh.
Brian Bonner
@itsn0tm3
Mar 29 2016 04:56
openaps use ns-status shell monitor/clock-zoned.json monitor/iob.json enact/suggested.jso enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json
runs fine so that means the device is fine, must be the report then
not sure why tho
Ben West
@bewest
Mar 29 2016 05:08
can look at the report openaps report show --json monitor/upload-status.json
Brian Bonner
@itsn0tm3
Mar 29 2016 05:09
pi@mobileaps:~/mobileaps $ openaps report show --json monitor/upload-status.json {"type": "report", "name": "monitor/upload-status.json", "monitor/upload-status.json": {"suggested": "enact/suggested.json", "status": "monitor/status.json", "use": "shell", "reservoir": "monitor/reservoir.json", "clock": "monitor/clock-zoned.json", "battery": "monitor/battery.json", "reporter": "JSON", "json_default": "True", "device": "ns-status", "remainder": "[]", "iob": "monitor/iob.json", "enacted": "enact/enacted.json"}}
Ben West
@bewest
Mar 29 2016 05:11
ah great

{
  "type": "report",
  "name": "monitor/upload-status.json",
  "monitor/upload-status.json": {
    "suggested": "enact/suggested.json",
    "status": "monitor/status.json",
    "use": "shell",
    "reservoir": "monitor/reservoir.json",
    "clock": "monitor/clock-zoned.json",
    "battery": "monitor/battery.json",
    "reporter": "JSON",
    "json_default": "True",
    "device": "ns-status",
    "remainder": "[]",
    "iob": "monitor/iob.json",
    "enacted": "enact/enacted.json"
  }
}
Brian Bonner
@itsn0tm3
Mar 29 2016 05:13
looks the same to me
(altho I like your color formatting better ha)
so why is it failing for me?
Ben West
@bewest
Mar 29 2016 05:14
hmmmm
it's yours, I just repasted it
Brian Bonner
@itsn0tm3
Mar 29 2016 05:14
oh
Ben West
@bewest
Mar 29 2016 05:14
I don't like that remainder thingy
you said the use version was working?
Brian Bonner
@itsn0tm3
Mar 29 2016 05:15
yup you can see the cut and paste above
Ben West
@bewest
Mar 29 2016 05:15
if the use is working, let's remove this report
and copy paste from the use
Brian Bonner
@itsn0tm3
Mar 29 2016 05:15
what do you mean?
Ben West
@bewest
Mar 29 2016 05:15
use was: openaps use ns-status shell monitor/clock-zoned.json monitor/iob.json enact/suggested.jso enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json ?
so everything after openaps use ... (the ... portion)
is exactly the same as the end of the report add stuff
so openaps report add <name> <format> ...
the ... portion is exactly the same
that was done on purpose so you can copy/paste your working use into the report
Brian Bonner
@itsn0tm3
Mar 29 2016 05:17
oh thats cool, ok let me try it
Ben West
@bewest
Mar 29 2016 05:17
name of report was ?...
Brian Bonner
@itsn0tm3
Mar 29 2016 05:17
upload-status.json
Ben West
@bewest
Mar 29 2016 05:17
monitor/upload-status.json
Brian Bonner
@itsn0tm3
Mar 29 2016 05:17
yes that one
Ben West
@bewest
Mar 29 2016 05:17
and JSON type,
so...
openaps report add monitor/upload-status.json JSON ns-status shell monitor/clock-zoned.json monitor/iob.json enact/suggested.jso enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json
Brian Bonner
@itsn0tm3
Mar 29 2016 05:18
openaps report add monitor/upload-status.json JSON ...
Ben West
@bewest
Mar 29 2016 05:18
should do it hopefully
yeah
the ... is same as everything after use ...
bingo
Brian Bonner
@itsn0tm3
Mar 29 2016 05:19
ok removed the old one then added the new one in
lets see if it runs now
nope :(
pi@mobileaps:~/mobileaps $ openaps report add monitor/upload-status.json JSON ns-status shell monitor/clock-zoned.json monitor/iob.json enact/suggested.json enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json added ns-status://JSON/shell/monitor/upload-status.json pi@mobileaps:~/mobileaps $ openaps report invoke monitor/upload-status.json ns-status://JSON/shell/monitor/upload-status.json Could not require: /home/pi/mobileaps/[ { [Error: Cannot find module '/home/pi/mobileaps/['] code: 'MODULE_NOT_FOUND' } reporting monitor/upload-status.json
Ben West
@bewest
Mar 29 2016 05:20
run that openaps report show --ini monitor/upload-status.json again?
wonder if you have remainder in there again
Brian Bonner
@itsn0tm3
Mar 29 2016 05:20
yep still in there
[report "monitor/upload-status.json"]
suggested = enact/suggested.json
status = monitor/status.json
use = shell
reservoir = monitor/reservoir.json
clock = monitor/clock-zoned.json
battery = monitor/battery.json
reporter = JSON
json_default = True
device = ns-status
remainder = []
iob = monitor/iob.json
enacted = enact/enacted.json
let me remove it one more time and make sure it's actually removing the ini file
Ben West
@bewest
Mar 29 2016 05:21
ok, now I'm curious what the device looks like
nah, report doesn't add ini files
that's device
let's inspect the device:
Brian Bonner
@itsn0tm3
Mar 29 2016 05:21
oh
Ben West
@bewest
Mar 29 2016 05:21
device also has a show command
Brian Bonner
@itsn0tm3
Mar 29 2016 05:21
yep openaps device show ns-upload --ini
Ben West
@bewest
Mar 29 2016 05:21
openaps device show ns-status
yeah
--ini or --json for fun
for full defintion
Brian Bonner
@itsn0tm3
Mar 29 2016 05:22
pi@mobileaps:~/mobileaps $ openaps device show ns-status --ini --json {"extra": {"fields": "clock iob suggested enacted battery reservoir status", "cmd": "ns-status", "args": ""}, "type": "device", "name": "ns-status", "ns-status": {"vendor": "openaps.vendors.process", "extra": "ns-status.ini"}}
in theory running it through the device manually should mean the device is setup correctly?
Ben West
@bewest
Mar 29 2016 05:26
yeah, openaps use tests the device config, we're using the device interactively with use
Brian Bonner
@itsn0tm3
Mar 29 2016 05:27
so that means the device is fine and the report is broken?
Ben West
@bewest
Mar 29 2016 05:27
in theory, invoke just runs the use with all the config
I've been working on a guide that covers some of this theory of operation, I'd love feedback: http://bewest-openaps-docs.readthedocs.org/en/wip-guides/docs/openaps-guide/overview.html
basically you're doing the right debugging, I expected invoke to work in this scenario, the same exact way as the use
apparently some code in ns-status is trying to require/include something that is funny/fishy
Brian Bonner
@itsn0tm3
Mar 29 2016 05:30
I was using master on mobileaps before, then just moved over to dev and then started having that prolem
Ben West
@bewest
Mar 29 2016 05:30
from your traceback: require: /home/pi/mobileaps/[ { [Error: Cannot find module '/home/pi/mobileaps/['] code: 'MODULE_NOT_FOUND' } reporting monitor/upload-status.json
that means near the top of ns-status somewhere it's including stuff
or trying to
Brian Bonner
@itsn0tm3
Mar 29 2016 05:32
ah I think I know why then
var requireUtils = require('../lib/require-utils')
Ben West
@bewest
Mar 29 2016 05:32
maybe that last argument or someting?
Brian Bonner
@itsn0tm3
Mar 29 2016 05:33
I don't seem to have that
Ben West
@bewest
Mar 29 2016 05:33
ah ok
Brian Bonner
@itsn0tm3
Mar 29 2016 05:33
pi@mobileaps:/usr/local/lib $ ls node_modules python2.7 python3.4
Ben West
@bewest
Mar 29 2016 05:33
in your oref0 repo
Brian Bonner
@itsn0tm3
Mar 29 2016 05:33
oh in the repo itself?
Ben West
@bewest
Mar 29 2016 05:33
you just updated do dev?
Brian Bonner
@itsn0tm3
Mar 29 2016 05:33
yes
Ben West
@bewest
Mar 29 2016 05:33
yeah
do npm install once to actually install a development only copy
this will pull in the dependencies that have changed
hmmm
no, but it runs standalone
it runs fine as use and outside openaps
Brian Bonner
@itsn0tm3
Mar 29 2016 05:34
where do you want me to do npm install?
Ben West
@bewest
Mar 29 2016 05:34
maybe ~/src/oref0
Brian Bonner
@itsn0tm3
Mar 29 2016 05:35
oh I need to do it as root
ok done
Ben West
@bewest
Mar 29 2016 05:35
hmm, I doubt that fixed it, but definitely did not hurt
Brian Bonner
@itsn0tm3
Mar 29 2016 05:36
nope, same error still
pi@mobileaps:~/mobileaps $ !469
openaps report invoke monitor/upload-status.json
ns-status://JSON/shell/monitor/upload-status.json
Could not require: /home/pi/mobileaps/[ { [Error: Cannot find module '/home/pi/mobileaps/['] code: 'MODULE_NOT_FOUND' }
reporting monitor/upload-status.json
Ben West
@bewest
Mar 29 2016 05:36
pretty sure it's that remainder business
Brian Bonner
@itsn0tm3
Mar 29 2016 05:37
I checked my openaps.ini and I see remainder in there a few times
but let me go remove that line and see what happens
Ben West
@bewest
Mar 29 2016 05:37
yeah, pretty sure it will work if you remove that
or make it remainder =
Brian Bonner
@itsn0tm3
Mar 29 2016 05:37
ok
Ben West
@bewest
Mar 29 2016 05:37
or remove it
Brian Bonner
@itsn0tm3
Mar 29 2016 05:38
which do you prefer? :)
Ben West
@bewest
Mar 29 2016 05:38
erg, first try remainder =
Brian Bonner
@itsn0tm3
Mar 29 2016 05:38
ok
done, lets see if it works
yup that did it
Ben West
@bewest
Mar 29 2016 05:38
the error you got: require: /home/pi/mobileaps/[ { [Error: Cannot find module '/home/pi/mobileaps/['] code: 'MODULE_NOT_FOUND' } reporting monitor/upload-status.json had a hint
means it was looking for a file named [
Brian Bonner
@itsn0tm3
Mar 29 2016 05:39
pi@mobileaps:~/mobileaps $ !469
openaps report invoke monitor/upload-status.json
ns-status://JSON/shell/monitor/upload-status.json
reporting monitor/upload-status.json
I didn't add it in, the add report did that by itself
Ben West
@bewest
Mar 29 2016 05:39
so, sounds like there might be a bug there?
Brian Bonner
@itsn0tm3
Mar 29 2016 05:40
  468  openaps report add monitor/upload-status.json JSON ns-status shell monitor/clock-zoned.json monitor/iob.json enact/suggested.json enact/enacted.json monitor/battery.json monitor/reservoir.json monitor/status.json
that was how I added it in (shrugs)
Ben West
@bewest
Mar 29 2016 05:40
yeah, not a problem with your command
it has to do with the process type of vendor
Brian Bonner
@itsn0tm3
Mar 29 2016 05:40
ah
Ben West
@bewest
Mar 29 2016 05:40
ns-status is a process vendor, and I allow for it to take any number of remainder args, which is usually a list
but that list recording business is being done wrong I guess
or maybe you added it with an older version of openaps and it no longer does that
do you know the command used to add the device?
Brian Bonner
@itsn0tm3
Mar 29 2016 05:41
yeah I actually added it recently to make sure it wasn't the device
Ben West
@bewest
Mar 29 2016 05:42
oh I see
Brian Bonner
@itsn0tm3
Mar 29 2016 05:42
  433  openaps device add ns-status process --require "clock iob suggested enacted battery reservoir status" ns-status
hmm you have one place in your doc where you say openaps-use (among others), the - might be a bit confusing?
openaps
openaps-device
openaps-report
openaps-vendor
openaps-use
openaps-alias
oh, didn't realize that worked too
Ben West
@bewest
Mar 29 2016 05:47
they are identical
that's another feature, actually
Brian Bonner
@itsn0tm3
Mar 29 2016 05:48
a few lines down you actually use openaps use
so that was how I caught it
instead of openaps-use
Ben West
@bewest
Mar 29 2016 05:48
other authors can extend openaps with a tool called foo by naming their tool openaps-foo, then openaps foo will also work
Brian Bonner
@itsn0tm3
Mar 29 2016 05:50
makes sense
Ben West
@bewest
Mar 29 2016 05:50
hmm
definitely a bug
Brian Bonner
@itsn0tm3
Mar 29 2016 05:50
the 'inspecting the log' might freak out non-linux users tho heh
Ben West
@bewest
Mar 29 2016 05:50
openaps device add pong process --require "thing" echo
openaps report add blah.txt text pong shell --not-json-default foo bar
openaps report invoke blah.txt
$ cat blah.txt 
foo [  b a r  ]
bewest@bewest-MacBookPro:~/Documents/foobar$
:-(
Brian Bonner
@itsn0tm3
Mar 29 2016 05:52
that should have echoed foo bar right?
Ben West
@bewest
Mar 29 2016 05:53
yeah :-(
it's a bug in the shell use
Brian Bonner
@itsn0tm3
Mar 29 2016 05:54
:(
Ben West
@bewest
Mar 29 2016 05:59
ok
did you install openaps from source also?
I just pushed a commit to wip/bewest/exporting branch that fixes this issue
Brian Bonner
@itsn0tm3
Mar 29 2016 06:01
yes was from source
Ben West
@bewest
Mar 29 2016 06:02
in that case in your checkout for that, (maybe ~/src/openaps) you can git fetch origin git checkout wip/bewest/exporting
I think I bumped a version number in this branch, so you'll probably need to sudo python setup.py develop
Brian Bonner
@itsn0tm3
Mar 29 2016 06:04
ok done
want me to try removing the report and re-adding it in?
Ben West
@bewest
Mar 29 2016 06:05
yeah, that's precisely where it was broken
the broken bit was "when adding a report for the shell uses, it would add garbage in the remainder field"
Brian Bonner
@itsn0tm3
Mar 29 2016 06:07
looks good, the remainder field looks like remainder = after I readded it back in
Ben West
@bewest
Mar 29 2016 06:08
yuppers
or in my ping device
commit 87b3f82346bc2db35f1a7c456e5f4935b5af7c60
Author: Ben West <bewest@gmail.com>
Date:   Mon Mar 28 22:59:31 2016 -0700

    openaps-report add blah.txt text pong shell --not-json-default foo bar

          TODO: better change descriptions
          /usr/local/bin/openaps-report add blah.txt text pong shell --not-json-default f

diff --git a/openaps.ini b/openaps.ini
index 2390d29..bb80e8a 100644
--- a/openaps.ini
+++ b/openaps.ini
@@ -240,3 +240,11 @@ then =
 vendor = openaps.vendors.process
 extra = pong.ini

+[report "blah.txt"]
+use = shell
+reporter = text
+json_default = False
+thing = foo
+device = pong
+remainder = bar
+
Brian Bonner
@itsn0tm3
Mar 29 2016 06:10
hmm my loop is still getting stuck on something
Mar 29 02:09:54 mobileaps openaps: cat: entries.json: No such file or directory
and I still amusingly have this line which I don't know is from Mar 29 02:09:36 mobileaps this seems like a problem
Ben West
@bewest
Mar 29 2016 06:11
decocare
Brian Bonner
@itsn0tm3
Mar 29 2016 06:12
oh it's getting stuck on status-upload still
hmm
oh looks like ns-upload changed a bit
hmm no
looks like the openaps doc is wrong
Brian Bonner
@itsn0tm3
Mar 29 2016 06:20
the openaps doc: ns-upload $NIGHTSCOUT_HOST $API_SECRET devicestatus.json monitor/upload-status.json but the ns-upload from the command line says: ns-upload <NIGHTSCOUT_HOST|localhost:1337> <API_SECRET> [API-TYPE|entries.json] <monitor/entries-to-upload.json> [stdout|-]
blah keeps looking for entries.json no matter what I do
urgh maybe it's time for me to go to bed
just realized the ENV's arent in my bash
Brian Bonner
@itsn0tm3
Mar 29 2016 06:25
OK now it works just fine
Stephan
@MosiGitHub
Mar 29 2016 06:26
@bewest question concerning the remainder [] stuff... so I understand that this shouldend be in the ini file?I have it in the newer reports I made as well (meal, auto-sens, profile, suggested - I made them after updating openaps and in the older reports upload-status and iob.... is it sufficient to just delete this entires with nano?
Brian Bonner
@itsn0tm3
Mar 29 2016 06:29
thanks @bewest , good night
Ben West
@bewest
Mar 29 2016 07:16
@MosiGitHub yes, you can set remainder =
Stephan
@MosiGitHub
Mar 29 2016 07:39
@bewest thanks for your help
John Sjolund
@sjolundjohn
Mar 29 2016 10:48
Hi, I have now gotten to the stage in which I need to communicate with pump. Invoking 'open use "NAME" model'

Getting "Couldn't get a file descriptor referring to the console"

I have tried with Carelink stick in and not in

Tips?
Jim Matheson
@jmatheson
Mar 29 2016 14:52
Dexcom Clarity estimated my 2 week A1C @ 5.6 :)
Scott Leibrand
@scottleibrand
Mar 29 2016 14:53
:-D
JaysonEwer
@JaysonEwer
Mar 29 2016 14:55
Nice @jmatheson
Matthias Granberry
@mgranberry
Mar 29 2016 15:05
ugh, I had a breakfast I've had probably hundreds of times this morning and I'm going "sticky low." This whole "bolus for a meal with slow subcutaneous insulin" thing just doesn't work.
pretty sure my toddler brought back some kind of digestive-system-affecting virus
Scott Leibrand
@scottleibrand
Mar 29 2016 15:11
That is one benefit of using AMA: you'll be able to do a smaller meal bolus and rely on your loop to give you the rest of the insulin only if/when carb absoration ramps up sufficiently to justify it. If you get unexpectedly slow absorption, it will cut off insulin delivery until it speeds up.
But in the mean time, that sucks. :-(
Jim Matheson
@jmatheson
Mar 29 2016 15:34
feels like a lot of the answers lately have been “switch to AMA, it’s better”.
Scott Leibrand
@scottleibrand
Mar 29 2016 15:36
Yeah, as soon as we get enough testing with it, and can figure out some of the issues with long pumphistory (maybe getting it from NS?) I'll want to replace meal-assist with AMA in dev
and start working on getting everything but the basic conservative stuff set up to be off by default so we can merge to master.
Jim Matheson
@jmatheson
Mar 29 2016 15:38
easier setup would be nice too. i am still struggling to get it back up and running.
no specific place stuck, just finding the time to go through it piece by piece is taking a while.
Scott Leibrand
@scottleibrand
Mar 29 2016 15:47
Yeah. As we start to compartmentalize I want to fully automate setup of the read-only stuff, and make it much easier to set up the infrastructure for everything else in a standardized way so there's way less fiddling around with report plumbing.
Jason Calabrese
@jasoncalabrese
Mar 29 2016 16:10
I turned off autosens and the 24h history last night, still getting stuck loops, I have new next door neighbors, maybe they're a new source of interference
maybe I should build a lead wall between us
Scott Leibrand
@scottleibrand
Mar 29 2016 16:11
Chicken wire should do it. ;-)
have you done #78?
openaps/oref0#78
Jason Calabrese
@jasoncalabrese
Mar 29 2016 16:12
not yet, I did simplify my retry and made preflight sleep shorter, I'll try the ideas from 78 tonight
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 16:13
I am still trying to wrap my brain around #78
Scott Leibrand
@scottleibrand
Mar 29 2016 16:13
Get glucose. Enact. Get pumphistory. Enact. get settings and autosens stuff.
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 16:14
your gather is totally different than what i’ve been using.
Scott Leibrand
@scottleibrand
Mar 29 2016 16:14
When getting pumphistory, be sure to rm the old one, so repeated failures don't allow enacting based on really old data
the only thing I added in 78 was the enact after get-bg
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 16:15
the tought with the settings and auto sens is that we don’t really need any of that real time, so if it fails thats ok.
Scott Leibrand
@scottleibrand
Mar 29 2016 16:15
but all the other stuff is what makes it safe to do that.
Rigjt
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 16:15
yeah, it’s going back and decrypying the other things you’ve been doing that i dont have either
plus different file names etc
Jason Calabrese
@jasoncalabrese
Mar 29 2016 16:16
I'm thinking of going back to subg 0.5 and the old mmeowlink, I hate running old versions, but need to get overnight more reliable
Scott Leibrand
@scottleibrand
Mar 29 2016 16:16
we use 0.6 fwiw
Jason Calabrese
@jasoncalabrese
Mar 29 2016 16:17
I don't think mmtune is really helping, only thing I get from it that I care about is the rssi
Scott Leibrand
@scottleibrand
Mar 29 2016 16:17
you using the python one?
Jason Calabrese
@jasoncalabrese
Mar 29 2016 16:17
yeah, ruby was using a lot of space
Scott Leibrand
@scottleibrand
Mar 29 2016 16:17
my modified Ruby one really helps a lot for multiple rigs.
Maybe should port that to Python.
Or do it right with a completely passive listen first.
Jason Calabrese
@jasoncalabrese
Mar 29 2016 16:18
or node
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 16:18
@scottleibrand what is your mmtune do?
ie does it tune every time or do something else
Scott Leibrand
@scottleibrand
Mar 29 2016 16:18
it fails preflight if another rig is talking.
Sends a single model packet, and if what it hears back is any valid packet other than the expected response it shuts up.
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 16:19
and that is before or after tuning the frequency
Scott Leibrand
@scottleibrand
Mar 29 2016 16:19
So it doesn't stomp on the other rig. Before.
Jason Calabrese
@jasoncalabrese
Mar 29 2016 16:19
I really wanted my focus to be on openxshareble now
thought this stuff was behind me
was stable for weeks
Jason Calabrese
@jasoncalabrese
Mar 29 2016 16:26
it's preflight thats failing, so 78 wouldn't be much help for that
reports will always run in the order you define them, right? was wondering if something changed with that
Bill Stackpole
@billstackpole
Mar 29 2016 16:30
There is a way for me to add OpenAPS to NightScout - I started this process but was interrupted and can't seem to find the config info again (think it required the dev branch of NS) - can anyone point me to these docs so I can continue the process? Tnx.
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 16:30
yes, dev branch. if you switch to it on your fork you will find the instructions there too.
Bill Stackpole
@billstackpole
Mar 29 2016 16:32
just look in the dev branch in github?
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 16:34
Bill Stackpole
@billstackpole
Mar 29 2016 16:34
thank you!
Jason Calabrese
@jasoncalabrese
Mar 29 2016 16:36
also 78 will cause even more triple enacts, the root issue is in mmeowlink
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 16:42
@scottleibrand can you share your ini line for mmtune?
Sulka Haro
@sulkaharo
Mar 29 2016 17:00
So giving up on git for OpenAPS. Again out of inodes on the Edison
Ben West
@bewest
Mar 29 2016 17:00
it runs git gc --auto on a dev branch
git gc --auto cleans up spurious files made by tooling, apparently that's common/expected
Scott Leibrand
@scottleibrand
Mar 29 2016 17:01
@CrushingT1D openaps alias add mmtune "! bash -c \"cd ~/src/minimed_rf/ && ruby -I lib bin/mmtune $ttyport $serial >/dev/null\""
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 17:03
and that’s a modified version that watches for other device comms. and then also does a narrower range?
Scott Leibrand
@scottleibrand
Mar 29 2016 17:07
yeah, it only tunes over the range of frequencies my pumps actually use
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 17:11
does openaps.ini allow for // or # comment lines?
Stephan
@MosiGitHub
Mar 29 2016 18:07
this time I have a very generll question: is there a problem if I just edit the openaps.ini instead of removing a report for example and recreate a new one? What functions are okay for editing? alias and reports? Thx in advance
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 18:15
nope
you can edit anything.
Stephan
@MosiGitHub
Mar 29 2016 18:27
:+1:
Ben West
@bewest
Mar 29 2016 18:29
yes, putting a # at beginning should comment the INI out
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 18:40
thx
Stephan
@MosiGitHub
Mar 29 2016 19:06
@scottleibrand thanks for #78 - I adjusted my wait-loop. Sounds really nice :+1:
Scott Leibrand
@scottleibrand
Mar 29 2016 19:07
Problem with ini comments is they disappear if/when openaps rewrites the file.
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 19:07
argh! i just added a bunch of formatting :)
Ben West
@bewest
Mar 29 2016 19:13
if you edit the ini a lot and you care about the changes, you can git commit -avm 'manually save ini' to save it
JaysonEwer
@JaysonEwer
Mar 29 2016 19:13
This is a very silly question, but how do I go to the next page of the RTD repository? I don't see a next or back or anything. Do I just use my browser?
Ben West
@bewest
Mar 29 2016 19:13
then later on if you want to get it back, you can do git checkout d3adb33f -- openaps.ini
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 19:14
it only overrites if i do add/remove commands?
in general i like editing it by hand as it forces me to understand what i am doing
Ben West
@bewest
Mar 29 2016 19:14
hmmm that might be right
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 19:15
i am going to just stop doing those commands for now.
Jason Calabrese
@jasoncalabrese
Mar 29 2016 19:15
something else edits the ini while the loop is running, makes edits a huge pain
I keep it open and keep writting
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 19:15
yes, true. i get overrite errors a lot too
Ben West
@bewest
Mar 29 2016 19:16
yeah, scott has complained about that too
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 19:16
i just rewrote my ini. wonder how many erros i’ll have during my first test loop :))
Ben West
@bewest
Mar 29 2016 19:16
part of it was a bug that's been fixed in the exporting branch
it landed in dev awhile ago and is fixed in this topic branch
should probably merge it all
Dana Lewis
@danamlewis
Mar 29 2016 19:17
@JaysonEwer there is some nav in one of the left sections to go to the next page . But I saw an example that has buttons , hoping we can get that added. Will help a lot
Jason Calabrese
@jasoncalabrese
Mar 29 2016 19:17
thought I was current with dev, and I know I was fighting it last night
Ben West
@bewest
Mar 29 2016 19:17
@JaysonEwer different branches have slightly different layouts
Dana Lewis
@danamlewis
Mar 29 2016 19:18
@bewest btw looking at everything this afternoon
JaysonEwer
@JaysonEwer
Mar 29 2016 19:18
ah, ok. :-) I'm trying to find the HOW TO MOVE TO BLEADING EDGE DEV FOR OPENAPS and AMA and all the GOOD STUFF!! :-D
WOOOOHOO
Ben West
@bewest
Mar 29 2016 19:18
blob
Dana Lewis
@danamlewis
Mar 29 2016 19:19
You might find it easier to nav in github for now. Keep in mind the various branches are dev and haven't been vetted yet for cohesiveness, so using the one off guides for setup may be as easy for now
Where easy = relative
JaysonEwer
@JaysonEwer
Mar 29 2016 19:19
thanks, @danamlewis
Ben West
@bewest
Mar 29 2016 19:20
next/previous links show up under the related topics area, wherever that is
also, for switching branches in the docs, there's a dropdown/arrow
blob
Stephan
@MosiGitHub
Mar 29 2016 19:22
@bewest noted the git commands you posted - thanks, that is very helpful
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 19:30
any ideas what the typical error is when a message like this shows up ConfigParser.NoSectionError: No section: u'device "meal”’
there is a device for meal, so assuming it is something else related
ok, it is because i reference an extra ini file, but that file is currently empty (but exists)
JaysonEwer
@JaysonEwer
Mar 29 2016 19:35
@scottleibrand Are your quick scripts still applicable? https://github.com/openaps/docs/blob/master/scripts/quick-packages.sh
I've finally got a development box to work on to move everything to bleeding edge without breaking my production box. I'm looking for the cleanest path to upgrade my 0.0.9 to the latest of everything.
Ben West
@bewest
Mar 29 2016 19:39
ah, that's after you remove a device
or add a device
@CrushingT1D it can happen when the device's ini file doesn't match the openaps section... eg if you renamed a device, you need to name it the same in both places
JaysonEwer
@JaysonEwer
Mar 29 2016 19:57
I'm seeing the following error and am wondering if anyone else has seen this before?
pi@Ewer-Open-APS:~/Documents/openaps $ sudo easy_install -ZU setuptools sudo easy_install -ZU openaps
/usr/local/bin/easy_install: 3: /usr/local/bin/easy_install: __requires__: not found
/usr/local/bin/easy_install: 4: /usr/local/bin/easy_install: import: not found
from: can't read /var/mail/pkg_resources
/usr/local/bin/easy_install: 9: /usr/local/bin/easy_install: Syntax error: newline unexpected (expecting ")")
pi@Ewer-Open-APS:~/Documents/openaps $
Ben West
@bewest
Mar 29 2016 19:58
@JaysonEwer you have sudo easy_install -ZU an extra time in there
Dana Lewis
@danamlewis
Mar 29 2016 19:58
Doubled up on your pasting there
JaysonEwer
@JaysonEwer
Mar 29 2016 19:59
oops
I'm still getting an error:
pi@Ewer-Open-APS:~/Documents/openaps $ sudo easy_install -ZU setuptools
/usr/local/bin/easy_install: 3: /usr/local/bin/easy_install: __requires__: not found
/usr/local/bin/easy_install: 4: /usr/local/bin/easy_install: import: not found
from: can't read /var/mail/pkg_resources
/usr/local/bin/easy_install: 9: /usr/local/bin/easy_install: Syntax error: newline unexpected (expecting ")")
pi@Ewer-Open-APS:~/Documents/openaps $
which is also duplicated. Perhaps that's one of the built in safety mechanisms. :-D
JaysonEwer
@JaysonEwer
Mar 29 2016 20:06
The previous line in that document seems to work properly:
pi@Ewer-Open-APS:~/Documents/openaps $ sudo apt-get install python python-dev python-setuptools python-software-properties python-numpy python-pip nodejs-legacy npm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nodejs-legacy is already the newest version.
npm is already the newest version.
python is already the newest version.
python-dev is already the newest version.
python-numpy is already the newest version.
python-pip is already the newest version.
python-setuptools is already the newest version.
python-software-properties is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
pi@Ewer-Open-APS:~/Documents/openaps $ 
pi@Ewer-Open-APS:~/Documents/openaps $
Ben West
@bewest
Mar 29 2016 20:09
I see, it's typographical thing
there should be line break or code block there instead of inline code
it's actually two inline blocks with a tiny space between them
JaysonEwer
@JaysonEwer
Mar 29 2016 20:10
I think I may have broken something by upgrading my pi earlier today.
Ben West
@bewest
Mar 29 2016 20:11
probably not
sudo easy_install -ZU setuptools
sudo easy_install -ZU openaps
run them separately
JaysonEwer
@JaysonEwer
Mar 29 2016 20:11
pi@Ewer-Open-APS:~/Documents/openaps $ curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash -
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://mirrordirector.raspbian.org jessie InRelease       
Hit http://archive.raspberrypi.org jessie/main armhf Packages 
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Ign http://archive.raspberrypi.org jessie/main Translation-en_US   
Ign http://archive.raspberrypi.org jessie/main Translation-en      
Ign http://archive.raspberrypi.org jessie/ui Translation-en_US
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Reading package lists... Done                                                                                                                                                          
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  pypy-upstream
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git is already the newest version.
nodejs-legacy is already the newest version.
npm is already the newest version.
python is already the newest version.
python-dev is already the newest version.
python-numpy is already the newest version.
python-pip is already the newest version.
python-software-properties is already the newest version.
watchdog is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
/usr/bin/python: 1: /usr/bin/python: Syntax error: word unexpected (expecting ")")
/usr/local/bin/openaps: line 3: __requires__: command not found
/usr/local/bin/openaps: line 4: syntax error near unexpected token `'pkg_resources''
/usr/local/bin/openaps: line 4: `__import__('pkg_resources').run_script('openaps==0.0.9', 'openaps')'
pi@Ewer-Open-APS:~/Documents/openaps $
pi@Ewer-Open-APS:~/Documents/openaps $ sudo easy_install -ZU setuptools
/usr/local/bin/easy_install: 3: /usr/local/bin/easy_install: __requires__: not found
/usr/local/bin/easy_install: 4: /usr/local/bin/easy_install: import: not found
from: can't read /var/mail/pkg_resources
/usr/local/bin/easy_install: 9: /usr/local/bin/easy_install: Syntax error: newline unexpected (expecting ")")
pi@Ewer-Open-APS:~/Documents/openaps $
So, perhaps my problem is I want to move to the dev branch of openaps, but I didn't install from source to begin with.
@bewest Do you see above where it says, "The following packages have been kept back: pypy-upstream"
Ben West
@bewest
Mar 29 2016 20:15
shouldnt' be a problem
that last bit is disturbing though, indicates easy_install is not ok
JaysonEwer
@JaysonEwer
Mar 29 2016 20:15
do I need to clear out some cruft of some sort
I noticed git got upgraded earlier when I ran my updates on my pi, could that be contributing?
JaysonEwer
@JaysonEwer
Mar 29 2016 20:21
Here are the packages that got upgraded earlier today:
The following packages have been kept back:
  pypy-upstream
The following packages will be upgraded:
  git git-core git-man libavcodec56 libavformat56 libavresample2 libavutil54 libraspberrypi-bin libraspberrypi-dev
  libraspberrypi-doc libraspberrypi0 libswscale3 libx264-142 raspberrypi-bootloader raspberrypi-sys-mods raspi-config
16 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 75.4 MB of archives.
After this operation, 9,297 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Bill Stackpole
@billstackpole
Mar 29 2016 20:34
trying to grok: if I "openaps use" that touches my pump directly and reads / sets / changes. when I "openaps report add <blah blah>", adds lines to openaps.ini that describe a report. when I invoke the report it creates anohter file. @scottleibrand indicated that I should NOT be calling my pump directly with my enact command (im currently using "use pump blahblah") - he indicated I should be generating a report instead. My enact/suggested.json IS a report - which contains all of the requisite settings needed to modify my temp basal rate (when appropriate.) What am I missing? Once I have the enact/suggested.json in place, what additional report do I need to create (enact/enact.json?) to change the temp basal rate?
I think that I alwyas need a "use" command to chagne my temp basal rate.
Ben West
@bewest
Mar 29 2016 20:35
I wrote a guide to help understand the relationship between use and report
Ben West
@bewest
Mar 29 2016 20:36
it's still in squirreled away in a dev branch but you can get a peek at it here: http://bewest-openaps-docs.readthedocs.org/en/wip-guides/docs/openaps-guide/overview.html
it goes into a little more detail on that concept of what report does and how it's related to use
as you mentioned, use allows you to interact with the device
when you add a report, it saves that use for later
when you invoke the report, it runs the use and saves the output in the name of the report
Bill Stackpole
@billstackpole
Mar 29 2016 20:38
got that. openaps.ini has a number of these in it - each can be called individually and repeatedly.
I'm at the end (i think)
trying to decide what opeanps loop
should look like as a report
If I call it now,
it calls openaps enact
which is currently "using" my pump to set the json values to what is in enact/suggested.json
wait one and I'll post.
'''enact = use pump set_temp_basal enact/suggested.json
Ben West
@bewest
Mar 29 2016 20:40
most people are using a report for that
Bill Stackpole
@billstackpole
Mar 29 2016 20:40
so thats where I'm missing the idea
Ben West
@bewest
Mar 29 2016 20:40
remember, the way to save a use is to add it as a report
Bill Stackpole
@billstackpole
Mar 29 2016 20:40
but then how do I call that report to get the pump to execute the command if I don't use "use"?
JaysonEwer
@JaysonEwer
Mar 29 2016 20:40
@bewest I think i'm going to re-image my flash drive that I've been using on my development box back to the same state as my working rig. I'm wondering if I have a good image at this point. I thought I was good to go, but i'm going to try again. Thanks for taking a quick look at my outputs, i'll let you know if I run into the same error after doing the re-image.
Ben West
@bewest
Mar 29 2016 20:40
this is a new section that is still in progress but should help with this concept http://bewest-openaps-docs.readthedocs.org/en/wip-guides/docs/openaps-guide/overview.html
@billstackpole report invoke ...
Bill Stackpole
@billstackpole
Mar 29 2016 20:41
K - lemme read and try to grok and if I still don't get it I'll ask more...
Ben West
@bewest
Mar 29 2016 20:43
btw, almost all the commands in the guide can be run on mac/laptop
@billstackpole for any openaps use command
@billstackpole you can save it as a report by replacing openaps use ... with openaps report add <name> JSON ... the ... portions should be exactly the same
the part after the format is all exactly the same
that's so you can save a report by literally copy/pasting the exact same command, or mostly at least
Jason Calabrese
@jasoncalabrese
Mar 29 2016 21:23
doesn't see like COB with AMA decays till it gets out of the pump history window
caused a low temp to get canceled, and I think some high temps
feels like everything is a little more broken
Dana Lewis
@danamlewis
Mar 29 2016 21:28
for me, it does it based on observed decay, so in many instances my carbs in diyps appear to have decayed (based on a flat 30g/hr old school decay), but openaps is observing really slow decay or no carb activity for a while, so it’s a much longer activity. but that correlates with a rise later then it shows the decay matching then, so it’s working better for me than it was before.
Jason Calabrese
@jasoncalabrese
Mar 29 2016 21:29
currently including all carbs given since 10am, 4.5 hours ago
Scott Leibrand
@scottleibrand
Mar 29 2016 22:00
did you disable autosens?
AMA requires a long pumphistory to accurately calculate COB
Jason Calabrese
@jasoncalabrese
Mar 29 2016 22:03
meal.json is only using the 6hr history
only disabled it on nighttime rig so far
that needs the full 28hr history?
Scott Leibrand
@scottleibrand
Mar 29 2016 22:07
6h might be enough
it needs to know about the insulin activity at the time the carbs started absorbing
which means up to 2.5*DIA
but in practical terms most postprandial insulin activity comes from meal (pre)boluses
which means your pumphistory just needs to extend back to a bit more than 1.5*DIA
Jason Calabrese
@jasoncalabrese
Mar 29 2016 22:13
need a better way to test, would have liked to run this in dev for a little, but my dev loop doesn't know about the boluses/carbs, maybe need to sync
JaysonEwer
@JaysonEwer
Mar 29 2016 22:37
@bewest I've re-imaged my working PI and have restored that image on another SD card and i'm still getting the following error. Is there something I need to do to prevent openaps from being in use as I power down my working rig? It seems as though the openaps binary may be in use as I shutdown my rig to dd the SD card? Here is the error when I check to see if openaps --version gives me anything.
pi@Ewer-Open-APS:~ $ openaps --version
/usr/local/bin/openaps: line 3: __requires__: command not found
/usr/local/bin/openaps: line 4: syntax error near unexpected token `'pkg_resources''
/usr/local/bin/openaps: line 4: `__import__('pkg_resources').run_script('openaps==0.0.9', 'openaps')'
pi@Ewer-Open-APS:~ $
JaysonEwer
@JaysonEwer
Mar 29 2016 23:08
Does this have something to do with cloning my working rig? Do I need to re-initialize a new openaps repository on my Dev Pi?
Dana Lewis
@danamlewis
Mar 29 2016 23:12
(by the way, we are at #OpenAPS is (n=1)*45!)
JaysonEwer
@JaysonEwer
Mar 29 2016 23:13
:+1: Nice!
Dana Lewis
@danamlewis
Mar 29 2016 23:14
:)
Ben West
@bewest
Mar 29 2016 23:15
@JaysonEwer what happens for pydoc openaps?
JaysonEwer
@JaysonEwer
Mar 29 2016 23:16
pi@Ewer-Open-APS:~ $ pydoc openaps
/usr/bin/pydoc: line 3: import: command not found
/usr/bin/pydoc: line 6: syntax error: unexpected end of file
pi@Ewer-Open-APS:~ $ cd Documents/openaps/
pi@Ewer-Open-APS:~/Documents/openaps $ pydoc openaps
/usr/bin/pydoc: line 3: import: command not found
/usr/bin/pydoc: line 6: syntax error: unexpected end of file
pi@Ewer-Open-APS:~/Documents/openaps $
Thanks for the help, @bewest !
Julia Schober
@julza78
Mar 29 2016 23:17
👍📟🎡🎢 #45
JaysonEwer
@JaysonEwer
Mar 29 2016 23:18
@julza78 , Are you #45? Congratulations! I'm #31 :-D
Ben West
@bewest
Mar 29 2016 23:18
I'm finding that quite odd
Dana Lewis
@danamlewis
Mar 29 2016 23:19
@JaysonEwer nah, she’s a few back ;)
JaysonEwer
@JaysonEwer
Mar 29 2016 23:19
I supose you're a few back too, eh?
Dana Lewis
@danamlewis
Mar 29 2016 23:19
haha. just a few ;)
JaysonEwer
@JaysonEwer
Mar 29 2016 23:20
I'm not sure why I can't get my dev rig functioning, I should probably just build it clean from scratch.
but I wanted to make sure I had a functioning backup. :-/
Ben West
@bewest
Mar 29 2016 23:20
what happens if you try pydoc pkg_resources?
JaysonEwer
@JaysonEwer
Mar 29 2016 23:21
should I do that from the openaps folder?
or does it even matter?
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 23:21
I was thinking if we ever did tshirts we could customize them with a little # on the sleeve or something :)
Dana Lewis
@danamlewis
Mar 29 2016 23:21
@CrushingT1D the numbers aren’t precise, though
JaysonEwer
@JaysonEwer
Mar 29 2016 23:21
+1, @CrushingT1D
Ben West
@bewest
Mar 29 2016 23:21
just anywhere
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 23:21
don’t go changing my number @danamlewis
JaysonEwer
@JaysonEwer
Mar 29 2016 23:21
I know they're not precise, but they're still OUR NUMBER. :-D
Dana Lewis
@danamlewis
Mar 29 2016 23:22
but they’re not! not really!
JaysonEwer
@JaysonEwer
Mar 29 2016 23:22
hahah
Dana Lewis
@danamlewis
Mar 29 2016 23:22
@CrushingT1D it just takes one “row up” or “row down” command
JaysonEwer
@JaysonEwer
Mar 29 2016 23:22
Don't take that from me @danamlewis :-D
Ben West
@bewest
Mar 29 2016 23:22
or pydoc this
Dana Lewis
@danamlewis
Mar 29 2016 23:22
or the decision to reorg based on actual start date rather than submit date
ya’ll are the reason I can’t reorganize the spreadsheet to have a chronologically correct chart :p
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 23:22
you snooze you lose!
JaysonEwer
@JaysonEwer
Mar 29 2016 23:23
pi@Ewer-Open-APS:~/Documents/openaps $ pydoc pkg_resources
/usr/bin/pydoc: line 3: import: command not found
/usr/bin/pydoc: line 6: syntax error: unexpected end of file
pi@Ewer-Open-APS:~/Documents/openaps $ pydoc this
/usr/bin/pydoc: line 3: import: command not found
/usr/bin/pydoc: line 6: syntax error: unexpected end of file
pi@Ewer-Open-APS:~/Documents/openaps $
Dana Lewis
@danamlewis
Mar 29 2016 23:23
@CrushingT1D not a race, goober
JaysonEwer
@JaysonEwer
Mar 29 2016 23:23
:-D
Dana Lewis
@danamlewis
Mar 29 2016 23:23
Maybe I should make shirts and we just sharpie an x and add the next number of the total group number as we grow ;)
Ben West
@bewest
Mar 29 2016 23:23
yeah, so your python is somehow busted
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 23:23
yea, i agree with that.
JaysonEwer
@JaysonEwer
Mar 29 2016 23:23
:-/ Should I re-install python?
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 23:24
it’s like those dorky corporate tshirts “hackathon fall 2004”. if you weren’t there in ’04 then you dont have the shirt :)
JaysonEwer
@JaysonEwer
Mar 29 2016 23:24
@danamlewis @CrushingT1D Just add a clear plastic windowed pocket to the shirt and we can add a certified embossed number card to it. :-P
Dana Lewis
@danamlewis
Mar 29 2016 23:25
wow. geek much?! ;) pocket protector? :p
JaysonEwer
@JaysonEwer
Mar 29 2016 23:25
:-D
Ben West
@bewest
Mar 29 2016 23:25
it looks like python is actually running bash somehow
JaysonEwer
@JaysonEwer
Mar 29 2016 23:25
yeah, but it would be a built in pocket NUMBER PROTECTOR. ;-)
@bewest remember we ended up moving my openaps git repo, could that have something to do with it?
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 23:26
you are even too nerdy for me @JaysonEwer
Ben West
@bewest
Mar 29 2016 23:26
no
JaysonEwer
@JaysonEwer
Mar 29 2016 23:26
and we had to muck with the permissions
bad card?
image seems to be functioning properly
Ben West
@bewest
Mar 29 2016 23:26
try: python
should print >>>
JaysonEwer
@JaysonEwer
Mar 29 2016 23:27
aside from this, that is
k
Ben West
@bewest
Mar 29 2016 23:27
try typing print "hello"
hit enter
JaysonEwer
@JaysonEwer
Mar 29 2016 23:27
wooooah
Ben West
@bewest
Mar 29 2016 23:27
type ctrl-d to exit
well, if it's stll printing >>> at beginning
curious what happened though
should be really boring and just print hello again
JaysonEwer
@JaysonEwer
Mar 29 2016 23:28
pi@Ewer-Open-APS:~/Documents/openaps $ python
/usr/bin/python: line 1: syntax error near unexpected token `$'\001\001Ȩ\0044\314\3250\002\004\0054''
/usr/bin/python: line 1: `??????????
...
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????ELF4??04     (l8+l8,l444  TTTx8+x8+?>+?>-?>-??,Y?>+?>-?>-pppDDQ?tdR?td?>+?>-?>-$$/lib/ld-linux-armhf.so.3GNU GNU?T??z???*?|??)????'?Q     ??,???` 0? ?2B?)?҂@A??$&??qTB@4?? z???'
pi@Ewer-Open-APS:~/Documents/openaps $
Ben West
@bewest
Mar 29 2016 23:29
yeah
hmm
well that confirms it for sure
JaysonEwer
@JaysonEwer
Mar 29 2016 23:30
yep, is this an easy one to fix? Or should I just bail and build from scratch?
Ben West
@bewest
Mar 29 2016 23:31
dunno, I might try something like sudo apt-get install --reinstall python
I have no idea how it got into that state
JaysonEwer
@JaysonEwer
Mar 29 2016 23:31
I'm somewhat curious if this is related to the process I used to create my image or if its how I shutdown my rig? The rig I used to create the image appears to be working properly, but it has been functioning slightly less than perfectly for a few weeks, since the timechange occured.
Ben West
@bewest
Mar 29 2016 23:32
if there was some kind of corruption, the chances that it only effects one file on the system is miniscule
eg, if there was some corruption, it likely would not boot
JaysonEwer
@JaysonEwer
Mar 29 2016 23:33
yeah, thats interesting...same thing happened after the re-install
pi@Ewer-Open-APS:~/Documents/openaps $ sudo apt-get install --reinstall python
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 151 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main python armhf 2.7.9-1 [151 kB]
Fetched 151 kB in 2s (53.7 kB/s)                        
(Reading database ... 120683 files and directories currently installed.)
Preparing to unpack .../python_2.7.9-1_armhf.deb ...
Unpacking python (2.7.9-1) over (2.7.9-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up python (2.7.9-1) ...
pi@Ewer-Open-APS:~/Documents/openaps $ python
/usr/bin/python: line 1: syntax error near unexpected token `$'\001\001Ȩ\0044\314\3250\002\004\0054''
/usr/bin/python: line 1: `???...
???????????????ELF4??04     (l8+l8,l444  TTTx8+x8+?>+?>-?>-??,Y?>+?>-?>-pppDDQ?tdR?td?>+?>-?>-$$/lib/ld-linux-armhf.so.3GNU GNU?T??z???*?|??)????'?Q     ??,???` 0? ?2B?)?҂@A??$&??qTB@4?? z???'
pi@Ewer-Open-APS:~/Documents/openaps $
Ben West
@bewest
Mar 29 2016 23:34
that's pretty amazing
file /usr/bin/python
JaysonEwer
@JaysonEwer
Mar 29 2016 23:35
Do you know what that unexpected token is? It appears to be the same before and after. Is there a way to clear that?
Ben West
@bewest
Mar 29 2016 23:35
it means the binary is corrupt somehow
JaysonEwer
@JaysonEwer
Mar 29 2016 23:35
pi@Ewer-Open-APS:~/Documents/openaps $ file /usr/bin/python
/usr/bin/python: symbolic link to python2.7
pi@Ewer-Open-APS:~/Documents/openaps $
Ben West
@bewest
Mar 29 2016 23:36
file /usr/bin/python2.7
JaysonEwer
@JaysonEwer
Mar 29 2016 23:36
pi@Ewer-Open-APS:~/Documents/openaps $ file /usr/bin/python2.7
/usr/bin/python2.7: data
pi@Ewer-Open-APS:~/Documents/openaps $
Ben West
@bewest
Mar 29 2016 23:36
wow
wow
for comparison:
$ file /usr/bin/python2.7
/usr/bin/python2.7: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=502c59409208bd0bf5acfa9c497107ec487e3bd6, stripped
JaysonEwer
@JaysonEwer
Mar 29 2016 23:37
nice
:-D
let me show you the output of my working rig
pi@Ewer-Open-APS:~ $ file list /usr/bin/python2.7
list:               cannot open `list' (No such file or directory)
/usr/bin/python2.7: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=c25407fddc7a86e41aad162aa07c89e029ecc6f3, stripped
pi@Ewer-Open-APS:~ $
woops, wrong command
my bad
pi@Ewer-Open-APS:~ $ file /usr/bin/python2.7
/usr/bin/python2.7: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=c25407fddc7a86e41aad162aa07c89e029ecc6f3, stripped
pi@Ewer-Open-APS:~ $
Ben West
@bewest
Mar 29 2016 23:39
yeah, that's normal
basically, for some reason python is not installed on that broken one
I'd try removing it to see what happens
sudo apt-get remove python
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 23:40

trying to get auto sens working. Here is my report

[report "predict/auto-sens.json"]
profile = monitor/profile.json
use = shell
reporter = text
basal_profile = monitor/active-basal-profile.json
json_default = True
pumphistory = monitor/pump-history-28-zoned.json
device = auto-sens
remainder = []
insulin_sensitivities = monitor/insulin-sensitivities.json
glucose = monitor/glucose.json

I have tested all of those input json files and they exist and look ok to me (with full history 288 back on glucose and 28 hours of pump history).
The output file for auto-sens.json is empty though

JaysonEwer
@JaysonEwer
Mar 29 2016 23:40
so, when I power down my working rig to dd it, should I kill my cronjob first just to make sure there is not a job running as I'm powering down?
pi@Ewer-Open-APS:~/Documents/openaps $ sudo apt-get remove python
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  fonts-roboto gir1.2-atk-1.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-gmenu-3.0 gir1.2-gtk-3.0 gir1.2-pango-1.0 gnome-menus
  gtk2-engines-clearlookspix libboost-atomic1.55.0 libboost-filesystem1.55.0 libboost-program-options1.55.0 libboost-regex1.55.0 libboost-thread1.55.0
  libc-ares-dev libcwiid1 libfftw3-single3 libgnome-menu-3-0 libjs-node-uuid libjs-prettify libjs-underscore libpython-dev libpython2.7-dev
  libqscintilla2-11 libqscintilla2-l10n libqt4-network libqt4-xmlpatterns libqtwebkit4 librtimulib-dev librtimulib-utils librtimulib7 libruby1.9.1-dbg
  libscsynth1 libssh-4 libssl-dev libssl-doc libtcltk-ruby1.9.1 libv8-3.14-dev libwebpdemux1 libwebpmux1 libxfce4ui-1-0 libxfce4util-bin
  libxfce4util-common libxfce4util6 libxfconf-0-2 node-abbrev node-ansi node-ansi-color-table node-archy node-async node-block-stream node-combined-stream
  node-cookie-jar node-delayed-stream node-forever-agent node-form-data node-fstream node-fstream-ignore node-github-url-from-git node-glob
  node-graceful-fs node-inherits node-ini node-json-stringify-safe node-lockfile node-lru-cache node-mime node-minimatch node-mkdirp node-mute-stream
  node-node-uuid node-nopt node-normalize-package-data node-npmlog node-once node-osenv node-qs node-read node-read-package-json node-request node-retry
  node-rimraf node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent node-underscore node-which pimixer python-rtimulib python2.7-dev
  python3-pil python3-rtimulib python3-sense-hat raspberrypi-sys-mods ruby1.9.1-full ruby1.9.3 supercollider supercollider-common supercollider-ide
  supercollider-language supercollider-server supercollider-supernova xfce-keyboard-shortcuts xfconf
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  jackd1 libjack0 libzita-alsa-pcmi0 libzita-resampler1
Suggested packages:
  jack-tools meterbridge
The following packages will be REMOVED:
  alacarte gconf2 gksu gvfs-backends gyp idle idle-python2.7 jackd2 libgksu2-0 libjack-jackd2-0 libsmbclient lsb-release lxde lxde-common lxde-core
  lxsession minecraft-pi node-gyp nodejs-dev nodered npm omxplayer pipanel python python-apt python-chardet python-colorama python-dbus python-dev
  python-distlib python-gi python-gobject python-gobject-2 python-gpiozero python-html5lib python-minecraftpi python-ndg-httpsclient python-numpy
  python-openssl python-picamera python-pifacecommon python-pifacedigitalio python-pil python-pip python-pkg-resources python-pyasn1 python-pygame
  python-requests python-rpi.gpio python-sense-hat python-serial python-setuptools python-six python-software-properties python-spidev python-support
  python-talloc python-tk python-urllib3 python-wheel python3-minecraftpi raspberrypi-net-mods raspberrypi-ui-mods samba-libs sense-hat sonic-pi
  unattended-upgrades
The following NEW packages will be installed:
  jackd1 libjack0 libzita-alsa-pcmi0 libzita-resampler1
0 upgraded, 4 newly installed, 67 to remove and 0 not upgraded.
Need to get 325 kB of archives.
After this operation, 170 MB disk space will be freed.
Do you want to continue? [Y/n]
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 23:41
[device "auto-sens"]
vendor = openaps.vendors.process
extra = ini/auto-sens.ini
and then my ini is
[device "auto-sens"]
fields = glucose pumphistory insulin_sensitivities basal_profile profile
cmd = oref0
args = detect-sensitivity
Ben West
@bewest
Mar 29 2016 23:42
if you run something like sudo shutdown now, that stops everything cleanly
JaysonEwer
@JaysonEwer
Mar 29 2016 23:42
i've been using /sbin/shutdown -h now
-h halt
Ben West
@bewest
Mar 29 2016 23:43
@CrushingT1D what happens when running it via use vs running the report invoke?
there's an issue someone reported yesterday and I noticed, you have remainder = []
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 23:44
i was running report invoke
Ben West
@bewest
Mar 29 2016 23:44
do you have a version working with openaps use?
@JaysonEwer that looks worth a shot. FWIW, at this point, the stock image is probably more helpful/less hassle
JaysonEwer
@JaysonEwer
Mar 29 2016 23:45
yeah, that's what i'm thinking
Ben West
@bewest
Mar 29 2016 23:45
stock image comes with basic python installed
JaysonEwer
@JaysonEwer
Mar 29 2016 23:46
I noticed you were running 64bit python, should I try upgrading my working rig to 64-bit python and then imaging it?
Ben West
@bewest
Mar 29 2016 23:46
in theory it's fixable, but if it starts to feel like we're going down rabbit holes, we are
no
one thing I would do
if this one is configured on wifi the way you like it
I would save the /etc/wpa_supplicant/wpa_supplicant.conf file
JaysonEwer
@JaysonEwer
Mar 29 2016 23:47
Yeah, at this point, I will just start with a clean slate and get it to the point I want it, but I'll want to take an image of it at some point. I wish I knew what was going on that might be contributing to this wonkyness.
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 23:47
i don’t have an openaps use one going.
Ben West
@bewest
Mar 29 2016 23:47
ah, get it working with openaps use interactively
that will garantee you have the arguments right
then once the args are right, you add the report
the long tails on openaps use ... and openaps report add <name> <format> ... the ... is the same, so theory is you practice with use, and then once it's right you just change a few words at the beginning and keep everything at the end the same
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 23:51
good test i guess @bewest. I dont know how to reverse engineer them to a use command
Ben West
@bewest
Mar 29 2016 23:52
ah, do you have a copy of the add command you used?
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 23:53
no. i rewrote my whole ini, or at least all of the aliases so i understood them. i pieced everything together from various older ini versions i had lying around. I can’t seem to find the auto sens stuff anywhere on github or gist
Ben West
@bewest
Mar 29 2016 23:56
ah, gotcha
sure would be helpful if the report would print it's use
Jim is CrushingT1D
@CrushingT1D
Mar 29 2016 23:57
yeah, tried that
i think i just copied it from here (may have been a different location, but these were the steps i went through) http://bewest-openaps-docs.readthedocs.org/en/latest/docs/walkthrough/phase-2/Configure-Automatic-Sensitivity-Mode.html