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

30th
May 2016
Paul Martin
@Spazholio
May 30 2016 00:47
@bewest Do you have a quick example of a report that utilizes the ns device? For example, I’m not sure how I’d report-ify something like openaps use ns shell get entries.json 'count=10’.
Paul Martin
@Spazholio
May 30 2016 01:07
Disregard. Radically enough, R’ingTFM seems to have helped a bit.
Still curious how you’re tackling the whole “get glucose.json via NS or via CGM” thing.
However, when running this: openaps use ns shell format-recent-type tz entries monitor/glucose.json | json -a dateString | wc -l I get: TypeError: can't compare offset-naive and offset-aware datetimes
Tom Boudreau
@TomBoudr_twitter
May 30 2016 01:17
@scottleibrand i have the * parts for the cron schedule right. Its the env and path part thats eluding me. Thanks for giving me the next bit to research.
Paul Martin
@Spazholio
May 30 2016 01:18
@TomBoudr_twitter What do you have in there so far?
Tom Boudreau
@TomBoudr_twitter
May 30 2016 01:20
/5 * cd ~/tom2_openaps && openaps runset
i had all the *s in there markdown just erased them.
Paul Martin
@Spazholio
May 30 2016 01:20
Oh good. =)
Tom Boudreau
@TomBoudr_twitter
May 30 2016 01:20
star/5 star x4 then the command
Paul Martin
@Spazholio
May 30 2016 01:21
The rest of the line is close, but you can’t use a ~ in your crontab. You need to use an absolute path.
Tom Boudreau
@TomBoudr_twitter
May 30 2016 01:21
ok thats easy to fix then.
I knew it was something small
Paul Martin
@Spazholio
May 30 2016 01:22
Yep, nothing major. Then you need to get your PATH and other variables set up. Have you assigned those variables yet?
Tom Boudreau
@TomBoudr_twitter
May 30 2016 01:22
No.
Is that in the docs or is that a diy figure it out portion.
Paul Martin
@Spazholio
May 30 2016 01:24
Well, you need to set your PATH, NIGHTSCOUT_HOST, and API_SECRET variables. Two of those may be fairly self-explanatory. One of them should absolutely not be shared here. =)
Ben West
@bewest
May 30 2016 01:24
my recommendation is not to use environment variables
I just created a tool that creates cron job for you
Paul Martin
@Spazholio
May 30 2016 01:25
I knew if I told him the wrong info, that would summon you. :grin:
Ben West
@bewest
May 30 2016 01:25
openaps/oref0#126
you need PATH, there are several example jobs in the issue there
Paul Martin
@Spazholio
May 30 2016 01:25
Sorry for the confusion there, @TomBoudr_twitter. @bewest is definitely on the cutting-edge of what’s going on here. I’m a rev or two behind. =)
Ben West
@bewest
May 30 2016 01:25
the ns device means you don't need the environment variable
Paul Martin
@Spazholio
May 30 2016 01:26
Do you know why the command I pasted earlier is barfing on me?
Ben West
@bewest
May 30 2016 01:26
use can always be turned into a report by changing use into report add name JSON
Paul Martin
@Spazholio
May 30 2016 01:26
My monitor/glucose.json’s dateString field appears to be zoned, so…is that why it’s crashing?
Tom Boudreau
@TomBoudr_twitter
May 30 2016 01:26
I'm not using NS b/c i'm on all medtronic gear. Will try the tool anks @bewest
Ben West
@bewest
May 30 2016 01:26
@Spazholio for now, I'm setting aside "either cgm or NS"
I'm doing it a different way
Paul Martin
@Spazholio
May 30 2016 01:27
Trusting NS for everything?
Ben West
@bewest
May 30 2016 01:27
glucose data from cgm always go to raw-cgm/raw-glucose.json, then always get convered by units and zone into monitor/glucose.json
you have a thing that is switching it out from under you
so when you run a command you don't know what data it's working on
IIRC, your NS is not zoned/units applied by your cgm is
Paul Martin
@Spazholio
May 30 2016 01:28
I do NOW, but I’m game to go with something more flexible/better.
Ben West
@bewest
May 30 2016 01:28
I'd make it simple
just always use cgm
then, start working on using select and lsgaps to always get data
Paul Martin
@Spazholio
May 30 2016 01:28
Right now with my Pi3, I have my CGM constantly connected. But when I switch to Edison like I’m hoping to, that’s not really an option, is it?
Ben West
@bewest
May 30 2016 01:28
is it g4 with share?
Paul Martin
@Spazholio
May 30 2016 01:29
It is.
Ben West
@bewest
May 30 2016 01:29
then ble
I'm using g4 w/share ble to fetch glucose and upload it to NS
Paul Martin
@Spazholio
May 30 2016 01:29
Elaborate? I thought since the receiver was paired with my phone, that’s what it was using, and couldn’t be connected to two simultaneous devices?
Ben West
@bewest
May 30 2016 01:29
my g4 is paired with openaps
Paul Martin
@Spazholio
May 30 2016 01:30
Ohhhh, so I can’t use the receiver if I’m doing the BLE with my OpenAPS?
Ben West
@bewest
May 30 2016 01:30
openaps sends the data to NS
Paul Martin
@Spazholio
May 30 2016 01:30
Hrmm. That might not work for me. What about simulating that by only downloading CGM data from NS? I’m not even sure that’s possible, but….
Ben West
@bewest
May 30 2016 01:31
sure, but either way, you'd want to use the ns device:
openaps use ns shell get entries.json count=288 or similar
to save report.... openaps report add raw-ns/entries.json JSON ns shell get entries.json count=288
creating report from use is always the same
Paul Martin
@Spazholio
May 30 2016 01:32
Jumping back to basics for a second - in NS parlance, an “entry” is strictly something from the CGM?
And a “treatment” is something from my pump?
Ben West
@bewest
May 30 2016 01:32
I'm confused why ble wouldn't work for you
Paul Martin
@Spazholio
May 30 2016 01:33
I want to keep using my receiver so I can keep using Dexcom Share? My wife is using the share app to see my numbers.
So the receiver would be connected via BT to my phone, so it can’t be connected to OpenAPS at the same time, can it?
Oh, and my Pi3 no longer has BT. =/
Ben West
@bewest
May 30 2016 01:34
yeah, dunno how many connections it supports
Paul Martin
@Spazholio
May 30 2016 01:34
That’s kinda a biggie.
Ben West
@bewest
May 30 2016 01:34
that's werid though
could just upload to dexcom too
Paul Martin
@Spazholio
May 30 2016 01:35
I added a Slice of Radio, and with the Pi3, in order to do that I had to disable BT. Something about GPIO pins 14 and 15 having to be rejiggered.
Oh? You can upload to Dexcom manually?
Ben West
@bewest
May 30 2016 01:38
either way, in terms of "using data from cgm or NS", it's going to work by both devices always trying to gap sync against their own cache/device, and then selecting data from both files
so rather than moving a file around in alias, we'll keep filling two files for each, then combine them using tz select
Paul Martin
@Spazholio
May 30 2016 01:43
I need to read up on what tz select does.
Ben West
@bewest
May 30 2016 01:44
you can give it eg tz select --after now --before "15 minutes ago" ns/fetched-entries.json monitor/glucose-from-cgm.json
and will correctly combine the data assuming you give it right --date selector
Paul Martin
@Spazholio
May 30 2016 01:44
What if I assume that I don’t have my CGM connected, and that all my CGM data is definitely in NS?
Ben West
@bewest
May 30 2016 01:45
then it's always getting glucose from NS and ditch cgm stuff altogether
originally I was only getting glucose from NS
but then you must have wifi
Paul Martin
@Spazholio
May 30 2016 01:46
Yeah, I’ve been using my personal hotspot quite a bit.
If I can get BT re-enabled on the Pi, I might try the BLE approach.
Ben West
@bewest
May 30 2016 01:46
I like having the ble wireless connection with Nightscout wearables/monitoring
share doesn't show what's happening in NS anyway
means my phone is out of loop except as monitoring accessory
Paul Martin
@Spazholio
May 30 2016 01:47
Yeah, I do too. But that Slice of Radio threw BT out the window. Hoping that there’s an update later on that that will re-allow both serial on those ports AND BT to work at the same time.
Ben West
@bewest
May 30 2016 01:47
ah
or you can use the usb dongle
Paul Martin
@Spazholio
May 30 2016 01:48
Yeah, that’s an option. I think I have one sitting around.
Ben West
@bewest
May 30 2016 01:49
it's fine to use NS, there's an approach coming that tries to get data from multiple devices
so I think it's fine to try to fill multiple files with cgm data
one for NS
one for cgm
one for share maybe
Paul Martin
@Spazholio
May 30 2016 01:49
And then use the tz select option to parse ‘em all together and upload them?
Ben West
@bewest
May 30 2016 01:49
then use select to pull the most recent records from all of them...
yeah, that would be the final prep step, then upload the result
Paul Martin
@Spazholio
May 30 2016 01:50
The last parameters of that command you listed earlier - there can be as many files as necessary and it’ll merge them all?
Ben West
@bewest
May 30 2016 01:50
all the files need to be prepped to include the same --date field
yeah
as many as needed :-D
that's the magic there
is realizing it'll take many files
Paul Martin
@Spazholio
May 30 2016 01:51
Which —date field is/should be present across all files?
dateString?
Ben West
@bewest
May 30 2016 01:51
any
if sending to entries in NS, then dateString is preferred
although date should probably also be there
Paul Martin
@Spazholio
May 30 2016 01:51
Well, ultimately that’s what I’ll be doing.
Ben West
@bewest
May 30 2016 01:51
dateString has to be also zoned, and it's helpful to have already rezoned it all to same zone
select also take a --gaps gaps.json switch, in which it will do same thing, but for more than just --before, --after
lsgaps produces the needed input automatically, it's a list of start/end times where data was missing
so if there were multiple series of 20 min gaps or something, it'll actually fill all of them, rather than just catching up to the latest
Paul Martin
@Spazholio
May 30 2016 01:55
Well, both of my raw-ns and raw-cgm files have both date and dateString fields, so I should be ok. Ok, so logically in my loop - pull from NS, pull from CGM, zone ‘em both, then run the tz select command to splice everything together into monitor/glucose.json? High-level, does that sound about right?
Ben West
@bewest
May 30 2016 01:56
yeah, pull both into raw report area
move them into maybe monitor/ns-glucose.json, and monitor/cgm-glucose.json
use the tz rezone command
it's always good to just make sure they're definitely same zone and what not
I have an uploader that puts things in zulu/UTC time :-)
Paul Martin
@Spazholio
May 30 2016 01:57
In my ns-glucose-zoned.json file, some of my dateString entries look like "2016-05-28T23:02:55+00:00” whereas some look like "2016-05-28T18:50:31-04:00”. Is that a thing I care about?
Ben West
@bewest
May 30 2016 01:57
yeah, rezone will make it the same zone
Paul Martin
@Spazholio
May 30 2016 01:57
But that’s after it’s been rezoned.
Ben West
@bewest
May 30 2016 01:57
hmm, add --astimezone
that forces them all no matter what
also --date dateString, hehehe
Paul Martin
@Spazholio
May 30 2016 01:58
[report "raw-ns/ns-glucose-zoned.json"]
use = rezone
reporter = JSON
astimezone = True
date = timestamp dateString start_at end_at created_at                                                                                                                                                                                                                                                               
adjust = missing
input = raw-ns/ns-glucose.json
device = tz
timezone = EDT
Ben West
@bewest
May 30 2016 01:59
oh, hmm
adjust =...
hmm
Paul Martin
@Spazholio
May 30 2016 01:59
Oh, that’s not a good reply...
=)
Ben West
@bewest
May 30 2016 02:00
hmm, might try adjust = replace?
Paul Martin
@Spazholio
May 30 2016 02:00
Done. Loop going, I’ll check in a moment.
Ben West
@bewest
May 30 2016 02:00
hrm
that doesn't feel right
Paul Martin
@Spazholio
May 30 2016 02:03
There’s a reason for that. =)
Do you have an openaps report add statement that does exactly what you want it to? I’ll just remove the report I have and use that...
Ben West
@bewest
May 30 2016 02:04
yeah, I usually create that by copy/pasting the use exactly
so I get a working use and then make it a report
Paul Martin
@Spazholio
May 30 2016 02:05
Makes sense.
Ben West
@bewest
May 30 2016 02:05
otherwise I'd find it impossible to create/use, it'd be too much
Paul Martin
@Spazholio
May 30 2016 02:05
openaps use tz rezone --timezone "EDT" --adjust "replace" --date "timestamp dateString start_at end_at created_at" --astimezone raw-ns/ns-glucose.json
Ben West
@bewest
May 30 2016 02:06
rezone --astimezone --date dateString I use this on NS data in the nightscout tool itself
ah
that won't work
openaps use tz rezone --date dateString --astimezone raw-ns/ns-glucose.json
I'd try that
Paul Martin
@Spazholio
May 30 2016 02:07
The —timezone flag isn’t needed?
Ben West
@bewest
May 30 2016 02:07
nah, it doesn't traverse well across DST
Paul Martin
@Spazholio
May 30 2016 02:08
Hey there, that seemed to work.
Ben West
@bewest
May 30 2016 02:08
to turn it into report,
openaps report add monitor/ns-glucose.json JSON tz rezone --date dateString --astimezone raw-ns/ns-glucose.json
so after the use, it's exactly the same
err
Paul Martin
@Spazholio
May 30 2016 02:09
Oh, I’ve got that one hammered into my head by now. =)
Does it replace the report I already have of that exact same name? Or…?
Ben West
@bewest
May 30 2016 02:09
dunno
think sometimes it used to error
not sure what happens currently
Paul Martin
@Spazholio
May 30 2016 02:10
Eh. Easy enough to append -delete to the old report.
(so I can grep for the word delete later once I’m sure this works properly)
And I think my raw-cgm/glucose-zoned.json file is all looking good on the dateString front. So that’s good. The way it works now though, is if the CGM is connected, it doesn’t bother pulling the NS data. So I should likely rework that so it always pulls both, then combines them with tz select --after now --before "15 minutes ago” raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json and saves the output of that to monitor/glucose.json right?
Ben West
@bewest
May 30 2016 02:15
bingo
yeah, always do things is simpler than maybe do things
bingo bingo, achievement unlocked :-D
Paul Martin
@Spazholio
May 30 2016 02:16
And if either file is missing, it’ll just take the one that’s present as gospel and use everything in there, right?
Ben West
@bewest
May 30 2016 02:16
yeah, well, also
Paul Martin
@Spazholio
May 30 2016 02:16
I’m getting there, dammit! Baby steps and all that. =)
Ben West
@bewest
May 30 2016 02:16
if you do one more report for lsgaps
you can feed that as --gaps
and it'll only get the most recent data combined
with none duplicated
lsgaps takes same args, and creates a file/json
Paul Martin
@Spazholio
May 30 2016 02:17
How would that get slipstreamed in there?
Ben West
@bewest
May 30 2016 02:17
works basically same args and everything, scans multiple files
so lsgaps happens first to create gaps.json
then you add --gaps gaps.json to the select phase at the end
tz lsgaps --date dateString --after now --before "15 minutes ago” raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json
to create gaps.json
then it becomes: tz select --date dateString --gaps gaps.json raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json
need --date dateString on all of them though
Paul Martin
@Spazholio
May 30 2016 02:21
Ok, so create the two zoned files from NS and CGM, then run the lsgaps to get the gaps.json then just append that to the pre-established tz select report that spits out to monitor/glucose.json?
Ben West
@bewest
May 30 2016 02:21
yeah
if you use lsgaps, you can ditch the before/after stuff on select
lsgaps is building a list of before/after and saving it in gaps.json
Paul Martin
@Spazholio
May 30 2016 02:22
I wouldn’t have guessed that, but you saying it makes sense.
Ben West
@bewest
May 30 2016 02:22
so it's like you run select --before --after potentially many many times
notice in above how I moved the --before and --after to lsgaps part
it's in the -h, but it's pretty terse, there
Paul Martin
@Spazholio
May 30 2016 02:23
I did. Why did you choose “15 minutes ago” specifically? Just assuming that I’ll never be more than 3 loops out kind of thing?
Ben West
@bewest
May 30 2016 02:23
just an example
you can leave it out or choose something else
I do recommend --after now or similar though
doesn't really matter if you do before vs after
Paul Martin
@Spazholio
May 30 2016 02:24
But if I were to miss 4 loops (my loops run every 5 minutes) then there’s the potential for me to miss some data if there’s a gap?
Ben West
@bewest
May 30 2016 02:24
they are just supposed to be opposite ends of the timeline, whatever that means to you
Paul Martin
@Spazholio
May 30 2016 02:24
Ok.
Ben West
@bewest
May 30 2016 02:24
yeah, you might want 2 days or something for AMA, dunno
Paul Martin
@Spazholio
May 30 2016 02:25
Does that option take natural language? Can I just put “2 days ago” in there? Or does it have to be “2880 minutes ago”? =)
Ben West
@bewest
May 30 2016 02:26
try it out :-D
this is what use is for :-D
Paul Martin
@Spazholio
May 30 2016 02:26
Fair enough. =)
Ben West
@bewest
May 30 2016 02:26
you can also inline things:
Paul Martin
@Spazholio
May 30 2016 02:27
I swear, crontab -r REALLY should prompt. How has this not been fixed yet?
Ben West
@bewest
May 30 2016 02:28
openaps use tz lsgaps --before "yesterday" somedata.json | openaps use tz select --gaps - somedata.json this inlines it to pipe data from lsgaps into the --gaps - input
or you can use that |json -a dateString you found earlier to just list the dates
Paul Martin
@Spazholio
May 30 2016 02:28
Yeah, that’s what the command you gave me a while ago does. =)
Ben West
@bewest
May 30 2016 02:29
so by playing with --before --after you should be able to get it to include less or more data
you can try prepping some files with some gaps in them if you want to see it fill them
where two files have two different gaps in them
err, one gap each
but different time range missing
Paul Martin
@Spazholio
May 30 2016 02:30
Right.
Ben West
@bewest
May 30 2016 02:30
by playing with the args, you should be able to prove it's finding the gap and filling them correctly
that's what I did writing it, anyway :-)
Paul Martin
@Spazholio
May 30 2016 02:33
So…openaps use tz select --after now --before "15 minutes ago" raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json looks right, right?
Because it’s giving me
usage: openaps-use [-h] [--format {text,json,base,stdout}] [--output OUTPUT]
                   [--version]
                   device ...
openaps-use: error: unrecognized arguments: —after
Ben West
@bewest
May 30 2016 02:34
something like curl -gs my.nightscout/api/v1/entries.json'?count=100000&find[date][$gte]=0' | openaps use tz lsgaps --date dateString - will find gaps from entire year of NS
you need --date dateString
Paul Martin
@Spazholio
May 30 2016 02:35
Before the —after parameter?
Ben West
@bewest
May 30 2016 02:35
ah, for select, it's called --prev and --current instead
Paul Martin
@Spazholio
May 30 2016 02:37
openaps use tz select --current now --prev "15 minutes ago" raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json
That?
Ben West
@bewest
May 30 2016 02:37
so I'd go with this:
openaps use tz select --date dateString --current now raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json
--current and --prev are like scissors
nothing will exist outside these bouns
bounds
Paul Martin
@Spazholio
May 30 2016 02:38
No work.
Ben West
@bewest
May 30 2016 02:38
oh
--date dateString
:-)
Paul Martin
@Spazholio
May 30 2016 02:38
Hey! There we go. =)
Ben West
@bewest
May 30 2016 02:38
yeah, don't forget --date selector
same for lsgaps, don't forget the --date dateString
Paul Martin
@Spazholio
May 30 2016 02:40
Ok, if I do that with —current I get 591 entries. Do I not need the —prev flag the way it stands?
I was going to go 2 days back, since I use AMA.
Figure more data’s better than less.
Dan Piessens
@dpiessens
May 30 2016 02:47
@Spazholio funny I just logged in with the goal of doing the exact same thing you're doing :)
Paul Martin
@Spazholio
May 30 2016 02:47
I’m here to help! =)
Dan Piessens
@dpiessens
May 30 2016 02:49
would you mind posting the reports when you have it working? I'm too tired tonight and struggling with all my raw/formatted reports (good news is this is my dev Edison rig so I can screw it up)
Paul Martin
@Spazholio
May 30 2016 02:49
Sure thing. Although, I’m likely to forget so if I do, hit me up tomorrow and I’ll get ‘em to you.
I’m noticing an oddity when I throw that gaps.json into the tz select mix that seems to be problematic.
Dan Piessens
@dpiessens
May 30 2016 02:50
When it works I want to put a sequence diagram in as a PR so people can visualize what's happening here
Oh btw I figured out that the G5 can actually pair with multiple devices at once! I have it logging to an xDrip branch and my receiver at the same time
Paul Martin
@Spazholio
May 30 2016 02:52
@bewest When I add the —gaps monitor/gaps.json into the tz select statement, I only get 7 items. If I omit that, I get 591. I feel that 591 is closer to what I want….any ideas?
@dpiessens That’s interesting. Once I get my Edison up and running, I’ll see if the G4 can do the same.
Dan Piessens
@dpiessens
May 30 2016 02:53
Yeah I think based on the BT codes I found in xDrip for the G4 it won't do multiple devices, I think Dexcom messed up hosted mode on the receiver
Paul Martin
@Spazholio
May 30 2016 02:56
Ugh. This is the WORST kind of discrimination - the kind against ME.
Dan Piessens
@dpiessens
May 30 2016 03:01
Ha :) In the diabetes hardware world it comes standard, no charge
Paul Martin
@Spazholio
May 30 2016 03:03
At least I didn’t pay extra…I guess. =)
jaylagorio
@jaylagorio
May 30 2016 03:04
@dpiessens Wow, so close to home and so true.
Dan Piessens
@dpiessens
May 30 2016 03:07
Yeah, I know. There's a part of me that likes reverse engineering, but the fact that they can't release the specs is so irritating. We'll crack it eventually so just save us all the time :) OK I'm off to relax for a bit @Spazholio I'll ping you tomorrow about the reports if I don't see anything here.
Paul Martin
@Spazholio
May 30 2016 03:08
@dpiessens Sounds like a plan, man. I’ve got one more little thing to work out with @bewest and then I think I’ll have it nailed.
Lynne Butts
@flutelynne_twitter
May 30 2016 03:12
trying to find info on cron. added it, added the alias listed, but not sure where to go from this point. Tried searching "cron" in this room. I know it's late. I can ask again tomorrow.
Paul Martin
@Spazholio
May 30 2016 03:12
What’s the issue?
Lynne Butts
@flutelynne_twitter
May 30 2016 03:13
I guess the scheduling part. Where/how to add some sort of propositions for the pump.
Paul Martin
@Spazholio
May 30 2016 03:14
Well, cron’s just going to run whatever you tell it to on a given schedule. You’ll likely be setting up most things in several aliases, and then call something like openaps loop once in cron.
Ben West
@bewest
May 30 2016 03:15
@Spazholio the lsgaps stuff is to limit the redundancies
Lynne Butts
@flutelynne_twitter
May 30 2016 03:15
Ok. How do I read more about giving it a schedule?
Paul Martin
@Spazholio
May 30 2016 03:16
Does it make sense that adding the —gaps flag only gives me 6-7 items to add to monitor/glucose.json? That doesn’t feel right to me.
Ben West
@bewest
May 30 2016 03:17
yes
because it's limiting the amount of data
it's only going to result in the missing data from before
--gaps is providing a filter to reduce the data to only the stuff missing
GeoffWyche
@GeoffWyche
May 30 2016 03:18
@flutelynne_twitter 'man cron'?
Ben West
@bewest
May 30 2016 03:18
so yeah, you'd easily analyze several hundred and only wind up with a few that are "new" to upload
Paul Martin
@Spazholio
May 30 2016 03:19
So the 591 results were excessive, and the 6-7 ones are…ok, I see.
But…doesn’t monitor/glucose.json need to be sorta large for the whole AMA thing? Doesn’t it need a lot of data to do its thing? I might be misremembering...
GeoffWyche
@GeoffWyche
May 30 2016 03:21
@flutelynne_twitter cron isn't very user friendly. I think there's a gui for it, gnome-schedule?
Lynne Butts
@flutelynne_twitter
May 30 2016 03:23
@GeoffWyche Thanks. I did install gnome-schedule. Probably look at that tomorrow. Thought i remember seeing examples listed somewhere.
GeoffWyche
@GeoffWyche
May 30 2016 03:25
I expect there is a wikipedia page about cron too.
Lynne Butts
@flutelynne_twitter
May 30 2016 03:26
Yes, I used the link that was posted and learned some from that, just looking for how to use them here.
Ben West
@bewest
May 30 2016 03:26
I just made a cron helper openaps/oref0#126
fjungman
@fjungman
May 30 2016 03:27
@flutelynne_twitter Lynne, thanks for the tip! It was that I wasn't on the beta version, in fact mine was quite old, because I was running the master and not the dev branch, so none of my recent updates were being deployed. All is good now!
Ben West
@bewest
May 30 2016 03:27
@Spazholio the lsgap, select 1-2 step is specifically for when you are ready to upload the least amount of deduped data as possible to NS
fjungman
@fjungman
May 30 2016 03:27
FWIW, I like this new Azure interface...
Ben West
@bewest
May 30 2016 03:28
it might make sense for AMA to select without the --gaps to just combine them
Paul Martin
@Spazholio
May 30 2016 03:29
And then maybe run the —gaps command later to just upload the gaps I find?
Ben West
@bewest
May 30 2016 03:29
yeah
Paul Martin
@Spazholio
May 30 2016 03:31
Who is “primary” on AMA and auto-sens? Is that @scottleibrand?
Ben West
@bewest
May 30 2016 03:31
yeah, I thought it was still under dev/not ready for prime-time yet
it's not in dev yet
Jarred Yaw
@jyaw
May 30 2016 03:31
Issue with suggested.json... I can run oref0-determine-basal manually but my openaps report add enact/suggested.json command with the same inputs is still asking for the offline field and refuses to add the report. I re-ran the quick_packages.sh script, and still have the issue. Any pro tips or hints at a next step?
Paul Martin
@Spazholio
May 30 2016 03:32
Because I see that my auto-sens.json uses glucose.json as well as my pumphistory-24h.json, so I’m wondering exactly how it uses the glucose.json file.
It might not be ready for prime time, no.
Lynne Butts
@flutelynne_twitter
May 30 2016 03:41
@fjungman You're welcome! Glad it's good.
@bewest Thanks, I did look at that earlier, but I am still lost. I will try again tomorrow.
Paul Martin
@Spazholio
May 30 2016 03:49
@bewest When running openaps use tz select --date dateString raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json if the raw-cgm/glucose-zoned.json file doesn’t exist, should it fail gracefully, and just select everything in the raw-ns/ns-glucose-zoned.json file? I was going to clear out both of my raw directories prior to the loop running to make sure I’m not using old data, but that seems to be problematic. Do I not need to worry about having old data?
Ben West
@bewest
May 30 2016 03:52
no, shouldn't need to worry about it
Paul Martin
@Spazholio
May 30 2016 03:53
Ok, cool.
Ben West
@bewest
May 30 2016 03:53
select --prev ... --currentacts like scissors
Paul Martin
@Spazholio
May 30 2016 03:54
openaps use tz select --date dateString raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json I don’t have those flags in there. Do they need to be? Meaning, if I don’t have them, does it assume “grab everything”?
Ben West
@bewest
May 30 2016 03:55
yes, select combines, and then limits things via --gaps, --prev and --current
any before after --prev, and before --current
Paul Martin
@Spazholio
May 30 2016 04:01
And limiting it to the last hour’s worth of data or so seems logical so there’s less to upload…right? I mean, if the loop runs every 5 minutes, then pulling all the records each and every time is likely overkill, no?
Ben West
@bewest
May 30 2016 04:02
when uploading, the ideal is to upload only the data that the server doesn't have yet
that's what makes --gaps feature so interesting, it can determine only the records missing and prepare just those
Paul Martin
@Spazholio
May 30 2016 04:04
Well…hell, maybe only having 7 entries in there makes sense then. I’ll give it a run and see if NS looks weird when I wake up in the morning. Still curious how it’ll affect auto-sens.json though. Hmmmm.
Ben West
@bewest
May 30 2016 04:04
yeah, for uploading, you'd want only the 7 entries that are not already in NS
or 2, or 1, or whatever it happens to be
Paul Martin
@Spazholio
May 30 2016 04:05
Right.
Paul Martin
@Spazholio
May 30 2016 04:28
@bewest openaps report add monitor/gaps.json JSON tz lsgaps --date dateString --after now --before "15 minutes ago" raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json <— when running this as a use it works, but not after I added it as a report. What’d I whiff on?
[report "monitor/gaps.json"]
use = lsgaps
reporter = JSON
date = dateString
device = tz
input = ['raw-ns/ns-glucose-zoned.json', 'raw-cgm/glucose-zoned.json']
minutes = 10
And it’s showing minutes = 10 which seems peculiar. EIther way….help? =)
Jarred Yaw
@jyaw
May 30 2016 04:35
i was able to get the enact/suggested.json to generate using the "report invoke enact/suggested.json" command after modifying the openaps.ini file -> changed "offline = online" to "offline ="... still cant add the report using openaps report add with the new auto-sens syntax :( In other news though, I got the loop to complete... which is awesome!
Paul Martin
@Spazholio
May 30 2016 04:35
Oh, the error would probably help too: monitor/gaps.json raised 'Namespace' object has no attribute ‘no_timezone'
Paul Martin
@Spazholio
May 30 2016 05:20
Looks like openaps report add monitor/glucose.json JSON tz select --date dateString raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json isn’t working either. Is it the JSON in there? Does that need to be something else?
Matt Pressnall
@logichammer
May 30 2016 06:21
all of the sudden, getting monitor/iob.json coming back as an empty file and breaking things...ideas?
battery is fresh and 1.64v
the rest of my reports are coming back fne
fine
Paul Martin
@Spazholio
May 30 2016 06:26
Happens to me periodically. I just let the loop run again - sometimes a few times - and then it works. No idea why.
Jarred Yaw
@jyaw
May 30 2016 06:26
My loop is running tonight! Beyond excited to join yall. Woohoo!
Matt Pressnall
@logichammer
May 30 2016 06:27
Yeah...I"ve seen that too...lasting longer than normal...just changed the battery though so hopefully that will help
Paul Martin
@Spazholio
May 30 2016 06:27
@jyaw Congrats!
Matt Pressnall
@logichammer
May 30 2016 06:27
Congrats indeed!
makes life so much easier!
Alin Artiom Kenibasov
@ktomy
May 30 2016 10:23
Now I'm seeing this:
hm... error uploading...
so in NS page I can see "-1??" instead of bg value
I am uploading using openaps dexcom vendor
now i'll check mongo values
Alin Artiom Kenibasov
@ktomy
May 30 2016 10:30
and the reason is :{
"_id": {
"$oid": "574c13c88d78da15211c53bc"
},
"system_time": "2017-12-23T22:53:44",
"display_time": "2016-05-30T13:12:53",
"sgv": -1,
"dateString": "2016-05-30T13:12:53",
"date": 1464603173000,
"unfiltered": 144768,
"rssi": 152192,
"device": "openaps://cgm",
"filtered": 152192,
"type": "sgv"
I can't access openaps logs now to see why sgv is -1 but when i'll get home i'll see what happens
Jarred Yaw
@jyaw
May 30 2016 14:21
How do y'all handle the morning spike trend in general, I figured I'd just crank down my insulin sensitivity during that period of time?
I ask because my normal flat sensitivity was no match for the morning spike today, ended up having to bolus like crazy.
live4sw
@live4sw
May 30 2016 14:27
@jyaw I usually just have a very low carb breakfast or make sure to bolus well before I eat.
live4sw
@live4sw
May 30 2016 14:41
Though I do also have a higher I:C ratio at breakfast than the rest of the day.
Jarred Yaw
@jyaw
May 30 2016 14:52
Sure, thanks. I do that now. Usually works, sometimes not.... diabetes. haha.
live4sw
@live4sw
May 30 2016 15:09
I eventually just gave up on having more than 20g at breakfast unless i was already low
Jarred Yaw
@jyaw
May 30 2016 15:18
Ya I run in the mornings on most days so my standard breakfast is usually not an issue but I still have to do a good pre bolus to handle the 30g. Just wanting to better handle the off-nominal
Jason Calabrese
@jasoncalabrese
May 30 2016 15:21
Eating soon mode has been working great for breakfast, you set a temp target from NS, but it requires running ama
Paul Martin
@Spazholio
May 30 2016 16:01
Hey @bewest - whenever you have a moment, in addition to all the help you gave last night (and thanks for that) I seem to still be having an issue getting those tz select reports actually added as reports. They work fine as use statements, but not otherwise.
Lukasz Kaniowski
@lukasz-kaniowski
May 30 2016 17:37
hi guys, I'm getting error Could not parse carbratio_data. Feature Meal Assist enabled but cannot find required carb_ratios.. This works fine oref0-get-profile settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json settings/profile.json
It only fails if I invoke this as a report
this is my report definition
[report "settings/profile1.json"]
use = shell
bg_targets = settings/bg_targets.json
settings = settings/settings.json
basal_profile = settings/basal_profile.json
reporter = text
json_default = True
max_iob = preferences.json
device = get-profile
remainder = []
insulin_sensitivities = settings/insulin_sensitivities.json
Scott Leibrand
@scottleibrand
May 30 2016 17:42
There is an issue open for that.
openaps/oref0#124
That workaround work for you?
Scott Leibrand
@scottleibrand
May 30 2016 17:47
Would also be awesome if someone could do a PR to oref0 to make it warn instead of error on [] input there.
Ben West
@bewest
May 30 2016 17:48
error seems like the right thing
Lukasz Kaniowski
@lukasz-kaniowski
May 30 2016 17:48
ok, i've been on outdated version of openaps. updated now to 0.1.2 and re-added the report
now it's fine, reminder is empty field instead of []
jaylagorio
@jaylagorio
May 30 2016 17:50
@bewest Can I bother you for the XML in the firmware info DB on your G5 receiver?
Ben West
@bewest
May 30 2016 17:52
I don't have a g5
here's what I did for g5 support, mostly from @loudnate, actually v
bewest/dexcom_reader#1 here's some notes from earlier
jaylagorio
@jaylagorio
May 30 2016 17:56
Oh, that's super helpful - ProductId is what I want to key in on I think
ryanchen26
@ryanchen26
May 30 2016 18:00
Upon executing $ openaps gather-profile I get the error "ISF of -1 is not supported." My son's current ISF numbers range from 175-400. If I lower the ISF numbers in the pump to 100 the error doesn't occur. Known issue?
Nathan Racklyeft
@loudnate
May 30 2016 18:01
@jaylagorio I didn't scroll back to see what your initial goal was, but just remember that G4+Share receivers can receive a firmware upgrade to support the G5.
jaylagorio
@jaylagorio
May 30 2016 18:03
My initial goal is detecting the difference between the G4 and G5 receivers. When you upgrade a G4 receiver does the ProductId still say G4?
Nathan Racklyeft
@loudnate
May 30 2016 18:12
is that to determine how to parse the records?
or for a different reason?
jaylagorio
@jaylagorio
May 30 2016 18:13
Nope, to determine how to parse the records
If the VID/PID of a stock G5 receiver is different than a G4 receiver, upgraded or otherwise, that would be good to know as well
Nathan Racklyeft
@loudnate
May 30 2016 18:25
so I think you want to use the revision byte described here: https://github.com/bewest/dexcom_reader/pull/1#issuecomment-157866179
while productID might be correlated to the record format, it's not really the question you're asking
Scott Leibrand
@scottleibrand
May 30 2016 18:27
@bewest why punish the user for something that OpenAPS does (the [ ] stuff)?
Seems the better thing to do there is make openaps clean up after itself.
jaylagorio
@jaylagorio
May 30 2016 18:30
@loudnate You're right, that would be better. Are the different revision numbers in the G4 vs. G5 records listed out somewhere?
It looks like that particular page just has G4/Share2 values listed
Nathan Racklyeft
@loudnate
May 30 2016 18:32
I believe G5 is revision 3, but you'd have to ask someone to check (I loaned out my openaps rig)
jaylagorio
@jaylagorio
May 30 2016 18:33
For EGV records or all records?
Rob Kresha
@rkresha
May 30 2016 19:04
looking to see if someone could help me with nightscout. My app doesn't show the COB 3 purple lines forecast
my 'enable' setting include careportal rawbg iob basal cob bwp cage openaps pump food
'show_forecast' includes openaps ar2
using beta 0.9.0-beta3
I've got meal assist and auto-sens enabled
lmoynihan73
@lmoynihan73
May 30 2016 19:21
Newbie here. How do I type this symbol | into terminal? When I type it, this symbol ~ comes up instead? Stuck trying to set up my pi.
Rob Kresha
@rkresha
May 30 2016 19:21
the best thing to do is to get it up and running and then switch over to ssh2
shift + \ = |
Ben West
@bewest
May 30 2016 19:22
@scottleibrand has to to with being clear... it seems far nicer/kinder to recognize an error, stop and report correctly what the issue is, rather than adding guesses/implicit workarounds that sometimes work and sometimes not
as-is, that error will go away
it's not affecting new users, and as older users update their reports it's fixed
until then it's clearer an error, so it's nice that it gets highlighted as such
lmoynihan73
@lmoynihan73
May 30 2016 19:24
@rkresha on my screen it still shows up as ~ ??
Rob Kresha
@rkresha
May 30 2016 19:25
screenshot it
nm
that makes no sense
I'm guessing it has something to do with keyboard settings or something dunno
lmoynihan73
@lmoynihan73
May 30 2016 19:26
There are several keys that are reversed--like when I type @, " shows up instead. Will try another keyboard
GeoffWyche
@GeoffWyche
May 30 2016 19:26
@lmoynihan73 What kind of computer are you using, and what country are you from?
Scott Leibrand
@scottleibrand
May 30 2016 19:26
Yeah, if you use the UK keyboard settings you'll sometimes get that with US keyboards.
Rob Kresha
@rkresha
May 30 2016 19:26
I answered my own question. I was apparently only using meal assist, not AMA... had to run the following sudo npm install -g git://github.com/openaps/oref0.git'#advanced-meal-assist'
Scott Leibrand
@scottleibrand
May 30 2016 19:27
IMO easiest fix is to ssh into the Pi.
@rkresha exactly. Beat me to answering. ;-)
Rob Kresha
@rkresha
May 30 2016 19:27
winky face
Scott Leibrand
@scottleibrand
May 30 2016 19:27
@bewest ah, cool. So if it's already fixed in openaps, we maybe just need a more user friendly error message in oref0 then.
lmoynihan73
@lmoynihan73
May 30 2016 19:29
@GeoffWyche I am from US using logitech keyboard. My computer is MacBookPro, but problem is with keyboard attached to pi.
Ben West
@bewest
May 30 2016 19:29
it's mostly gone already
was fixed awhile ago
could see a faq with the message that shows up
lmoynihan73
@lmoynihan73
May 30 2016 19:30
@scottleibrand sorry newbie question: how do I ssh into the Pi?
Ben West
@bewest
May 30 2016 19:30
the error messages were tweaked in last oref0 release to be a lot more clear
could see a tool that looks for all reports with remainder = [] though...
GeoffWyche
@GeoffWyche
May 30 2016 19:31
It sounds like the RPi has the wrong idea about your keyboard. I ran into that a while ago... I can't exactly remember the solution, but it involved changing the RPi's idea of what keyboard I was using. Might be that you have a keyboard designed for another region, but you can tell the RPi to interpret your keyboard differently. I'll see what I can find.
Scott Leibrand
@scottleibrand
May 30 2016 19:32
@lukasz-kaniowski would you be willing to add an entry to the FAQ with the error you got and the fix?
@lmoynihan73 ssh is covered in the docs.
GeoffWyche
@GeoffWyche
May 30 2016 19:33
Scott Leibrand
@scottleibrand
May 30 2016 19:33
raspi-config has a keyboard locale thing. Not sure which one to select though.
lmoynihan73
@lmoynihan73
May 30 2016 19:33
AHA! I figured it out--wrong keyboard setting on Pi. Thank you!!
Scott Leibrand
@scottleibrand
May 30 2016 19:33
Might want to add that to the section of the docs that covers raspi-config.
@lmoynihan73 good opportunity for your first PR.
GeoffWyche
@GeoffWyche
May 30 2016 19:34
:-D
Ben West
@bewest
May 30 2016 19:34
ahhhh ok, looks like the templates are perpetuating the [] bug
lmoynihan73
@lmoynihan73
May 30 2016 19:34
@scottleibrand Yes, can't figure that out either...will keep trying. Determined to figure this out!
Ben West
@bewest
May 30 2016 19:35
This message was deleted
oh, actually it looks fine in the ini
Ben West
@bewest
May 30 2016 20:03
@Spazholio you found a bug in select having to do with how it saves args for reports :-)
I just fixed it, if you update openaps and openaps-contrib you'll be rewarded with some extra --cli fixes as well
mshafa
@mshafa
May 30 2016 20:11
Hello. I just joined this group from the Sacramento area. I think I may have completed phase 0 of the OpenAPS setup on Raspberry pie 3 as I got: openaps installed openaps 0.1.0. For the next phase of installing Nightscout, I am waiting for cell phone order to arrive. Could I move to phase 2 (Build a manual system) in the meantime? Also the Medtronic 723 pump recently gave a motor error. Should I look to buy another one, just in case?
Ben West
@bewest
May 30 2016 20:12
howdy @mshafa very good to see you
GeoffWyche
@GeoffWyche
May 30 2016 20:12
@mshafa welcome
Where did you see the motor error? in what context?
What cellphone did you order?
Scott Leibrand
@scottleibrand
May 30 2016 20:18
If the phone is just for uploading BG to Nightscout, then yes, you can skip ahead and come back to that part.
There are many ways to get BG data, depending on which hardware you have.
mshafa
@mshafa
May 30 2016 20:19
@GeoffWyche Thank you. My son got the M-err on his pump.
Scott Leibrand
@scottleibrand
May 30 2016 20:19
We usually recommend that people try to get a backup pump if they have any sort of errors or are worried about the pump dying for any reason.
Obviously that isn't super urgent as long as you have a working one, but it's a good insurance policy. :-)
mshafa
@mshafa
May 30 2016 20:19
I ordered Samsung S4 (not the mini).
@bewest Ben. It is great to see you. Thank you.
Marion Barker
@marionbarker
May 30 2016 20:26
Getting 503 website not available. Azure says it's fine, but no activity. Is there a link to how to fix?
Sorry - that was 403. This is just plain nightscout to try things out using G5 bridge
Ben West
@bewest
May 30 2016 20:32
for motor errors, I rewind the pump
I usually apply a little bit of pressure to the spindle as it's retracting/rewinding
then when it's priming, if possible use a new, fairly full reservoir
the motor's safety mechanisms are based around the amount and consistency of back-pressure as well as information about how far the motor has turned
unfortunately the sensor for how far the motor has turned and a few other things have some issues :-(
it's probably fine, but definitely keep an eye on it... if it increases or is accompanied by other errors I'd be concerned
I accidentally dropped mine other day, and it motor error'ed a few times, but went away, after rewinding, applying pressure it mostly went away
Ben West
@bewest
May 30 2016 20:37
happens if I let the reservoir run on empty for awhile
live4sw
@live4sw
May 30 2016 20:51
Quick q - are there any docs for regular meal assist? http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-6/Configure-Automatic-Sensitivity-Mode.html has a good discussion of auto sens, but it’s titled "Configuring Automatic Sensitivity and Meal Assist Mode” but doesn’t discuss configuring Meal Assist
Ben West
@bewest
May 30 2016 20:55
that part is optional and depends on code that isn't in dev yet
live4sw
@live4sw
May 30 2016 20:56
I thought there was regular meal assist which is now in master, and then advanced meal assist?
Ben West
@bewest
May 30 2016 20:56
we're going through docs again, hopeful to remove sections which say "make INI file like this"
I just tested usb-g5 support, and it's working well
jaylagorio
@jaylagorio
May 30 2016 21:01
@bewest How like or unlike the G4 over BLE is it? Or haven't you had a chance to try?
Paul Martin
@Spazholio
May 30 2016 21:02
@bewest I’m helping!
@bewest When updating openaps and openaps-contrib, what npm commands do I need to run afterward?
Is it just
npm install && \
sudo npm install -g && \
sudo npm link
Ben West
@bewest
May 30 2016 21:08
@jaylagorio g5 ble is totally different
none
although that helps too I guess
just updated dev
Paul Martin
@Spazholio
May 30 2016 21:08
I mean, I do that for oref0 so I figured steps would be the same for the others...
Ben West
@bewest
May 30 2016 21:08
hmm, no
oref0 is a node js project, it's the one that's different from the rest, actually
Paul Martin
@Spazholio
May 30 2016 21:09
I wasn’t aware of that. So doing those commands probably does less than nothing? =)
Ben West
@bewest
May 30 2016 21:10
so for oref0, if you have a local git repo (it sounds like you do), you'll need to go in there, git checkout dev; git pull origin; npm install; sudo npm install -g; will update it
that's the old-school recommendation though, for people who have git checkouts
Paul Martin
@Spazholio
May 30 2016 21:10
What’s the new hotness?
GeoffWyche
@GeoffWyche
May 30 2016 21:10
Sorry for the ignorance, how is oref0 the odd-man-out?
Ben West
@bewest
May 30 2016 21:11
new style is: sudo npm install -g git://github.com/openaps/oref0.git or sudo npm install -g git://github.com/openaps/oref0.git'#dev' for dev
openaps, openaps-contrib and almost everything else are all python projects
oref0 is node js project
so for those, old style, is again, go into git repo, git pull; sudo python setup.py develop to update something with a local git repo
Paul Martin
@Spazholio
May 30 2016 21:12
So where do the files live if I do it the new way? The old way, I could make a change, run the install commands, and test them out, so how would I do that the new way?
This is my first experience with a nodejs project, so I’m a little unfamiliar with the workflow.
Ben West
@bewest
May 30 2016 21:13
for development, you need a local repo and to link using npm install; sudo npm link; npm link .
for developing on the python project it's the same as above
GeoffWyche
@GeoffWyche
May 30 2016 21:13
(need an emoticon for "struggling to understand")
Ben West
@bewest
May 30 2016 21:14
new school way for non-development, just using/updating python projects: sudo pip install -U openaps openaps-contrib should work fine for both installs and updates
Paul Martin
@Spazholio
May 30 2016 21:14
:angry: :gun:
How’s that @GeoffWyche? =)
(it’s how I feel a lot of the time when I feel like I should know something here) =)
GeoffWyche
@GeoffWyche
May 30 2016 21:14
@Spazholio Yeah, that's pretty good :D
Ben West
@bewest
May 30 2016 21:15
to install a custom dev version, we can use an url: sudo pip install -U git+git://github.com/openaps/openaps.git'#dev', although this really shouldn't be needed most of the time
basically python projects use pip (or used to use easy_install)
while node projects use npm
live4sw
@live4sw
May 30 2016 21:15
How does sudo pip-install -U openaps openaps-contrib compare with sudo easy_install -ZU openaps from the docs?
Paul Martin
@Spazholio
May 30 2016 21:16
@bewest When I invoke this report openaps report add monitor/gaps.json JSON tz lsgaps --date dateString --after now --before "15 minutes ago" raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json I get monitor/gaps.json raised 'Namespace' object has no attribute ‘no_timezone’.
Ben West
@bewest
May 30 2016 21:16
it's the new school way
pip has been recommended for years, I've just been slow
hrm, that's with latest openaps-contrib?
if you have a local git repo somewhere, that basically always wins
live4sw
@live4sw
May 30 2016 21:17
Oh ok, but are the two commands intended to accomplish the same thing (upgrading openaps and all other supporting packages?). It’s a little confusing in the docs.
Ben West
@bewest
May 30 2016 21:17
so it's pretty sticky
Paul Martin
@Spazholio
May 30 2016 21:17
?
Correct. I went into ~/src/openaps-contrib and did a git pull. Is there anything else that needs to be done
It pulled stuff in.
Ben West
@bewest
May 30 2016 21:18
openaps has a bunch of dependencies it needs, both pip and easy_install will attempt to install as many dependencies as it can from https://pypi.python.org/pypi
pip is a bit smarter in that it can take an url and install from the url as well
live4sw
@live4sw
May 30 2016 21:18
Got it, thanks.
Ben West
@bewest
May 30 2016 21:18
the url will look like git+git://github.com/org/repo.git
it can take a branch on the end:
for pip: pip install git+git://github.com/org/repo.git@dev
so @branch-or-tag-or-committish
npm can do same trick, install from any url
so that's now preferred way, it's much easier than maintaining a local git repo and linking everything
if you create a local git repo, you have to maintain it by going in, managing git pull etc, and then re-install/re-linking if any new/deleted scripts or if the dependencies have changed
Paul Martin
@Spazholio
May 30 2016 21:21
So should I remove my ~/src dir and reinstall everything that way? Or is there something else I need to do in the interim other than the git pull?
Ben West
@bewest
May 30 2016 21:22
hmmm I've tried removing various directories and replacing it with pip install $url and it seems to work ok
should work for oref0 as well, think I've done that as well
it'd be nice to see PR in docs to switch it over so we can test it somewhere
I updated the openaps readme itself already
Paul Martin
@Spazholio
May 30 2016 21:23
So I should delete the ~/src/openaps-contrib dir, then run pip install git+git://github.com/openaps/openaps-contrib and all should be good?
Ben West
@bewest
May 30 2016 21:23
hmm
yeah
Paul Martin
@Spazholio
May 30 2016 21:23
Same with openaps?
Ben West
@bewest
May 30 2016 21:23
yeah, probably
Paul Martin
@Spazholio
May 30 2016 21:23
I think I’ll just move the dir out of the way instead of deleting it...
Ben West
@bewest
May 30 2016 21:24
I'd even just do sudo pip install -U openaps openaps-contrib
openaps-contrib is small enough that it's just always up to date, no dev branch
Paul Martin
@Spazholio
May 30 2016 21:24
Running now...
Completed, same error when I invoke the monitor/gaps.json report.
Ben West
@bewest
May 30 2016 21:25
openaps --version ?
Paul Martin
@Spazholio
May 30 2016 21:25
openaps 0.1.4-dev
Ben West
@bewest
May 30 2016 21:25
hmm
you should not be on -dev after that
Scott Leibrand
@scottleibrand
May 30 2016 21:26
@Spazholio @GeoffWyche please don't joke about suicide.
Ben West
@bewest
May 30 2016 21:27
sudo rm -Rf /usr/local/lib/python2.7/dist-packages/openaps /usr/local/lib/python2.7/dist-packages/openaps-0-*
sudo pip install -U openaps
hrm, actually
I think it's fine
think you just need to re-add the report
Paul Martin
@Spazholio
May 30 2016 21:28
@bewest I have several…well, they might be errors in the pip install command that I ran:
  Found existing installation: openaps-contrib 0.0.9
    Can't uninstall 'openaps-contrib'. No files were found to uninstall.
  Running setup.py install for openaps-contrib

    Skipping installation of /usr/local/lib/python2.7/dist-packages/openapscontrib/__init__.py (namespace package)
    Installing /usr/local/lib/python2.7/dist-packages/openaps_contrib-0.0.12-py2.7-nspkg.pth
  Could not find .egg-info directory in install record for openaps-contrib from https://pypi.python.org/packages/30/1b/230436678eef840f92961a491728d1e65748b67911baaa3b5b6387ecba2c/openaps-contrib-0.0.12.tar.gz#md5=0594872dd5daad77bc3d69cf9328751f in ./src/openaps-contributed
But it seems to still have installed. I’ll re-add the report first though.
Ben West
@bewest
May 30 2016 21:28
apparently current status is you can just re-add reports :-)
Paul Martin
@Spazholio
May 30 2016 21:29
Alas, same error.
Here’s what it looks like in openaps.ini:
[report "monitor/gaps.json"]
use = lsgaps
reporter = JSON
date = dateString
device = tz
input = ['raw-ns/ns-glucose-zoned.json', 'raw-cgm/glucose-zoned.json']
minutes = 10
Ben West
@bewest
May 30 2016 21:30
oh
hmmm
I didn't look at that one
Paul Martin
@Spazholio
May 30 2016 21:30
(also, that minutes = 10 thing still seems odd to me since I specified “15 minutes before”)
Ben West
@bewest
May 30 2016 21:30
oy, wincing
it's not you, it's me
Paul Martin
@Spazholio
May 30 2016 21:31
That only makes me feel a little better. =)
I mean, I know I’m helping by finding these things, but….still….sorry. =)
jaylagorio
@jaylagorio
May 30 2016 21:35
@bewest That's a shame. I took a quick look through the xDrip source for the beta that reads directly from the G5 transmitter instead of the receiver and it's all covered under AES. Is the receiver over BLE anything like the transmitter over BLE?
Ben West
@bewest
May 30 2016 21:38
@Spazholio try sudo pip install -U openaps-contrib again
re-add the report
from what I can tell, there is no BLE connectivity to the receiver
Paul Martin
@Spazholio
May 30 2016 21:39
Looks like it ran. Thanks!
Hichame Yessou
@hichameyessou
May 30 2016 21:48
Hello! Please, can someone explain me, how I'm supposed to upload the BG's on nighscout? Because with the alias openaps upload-recent-treatments it's just uploading the treatments, right?
jaylagorio
@jaylagorio
May 30 2016 21:50
You mean the receiver can't pair with anything else like the G4 receiver does? Wow, that is really different.
Ben West
@bewest
May 30 2016 21:52
the receiver seems to only pair with one thing at a time
so if it's paired with transmitter, apparently, it does not provide a way to turn on share/ble peripheral side
Paul Martin
@Spazholio
May 30 2016 21:52
Just got an odd error: BG data is too old, or clock set incorrectly. Your CGM time is Mon May 30 2016 21:47:49 GMT-0400 (EDT) but your system time is Mon May 30 2016 17:51:07 GMT-0400 (EDT). I know how to fix that error, but what it’s reporting for the CGM time is incorrect. I just checked the device, and that’s wrong - not even close to my actual CGM time.
Ben West
@bewest
May 30 2016 21:53
but that's what's in the file
Paul Martin
@Spazholio
May 30 2016 21:54
"dateString": "2016-05-30T16:56:44-04:00”
Oh, sorry, I thought you were asking.
Ok, so…how would one go about fixing this? This is a new one for me.
Ben West
@bewest
May 30 2016 21:55
there's a report generating that error
which one?
Paul Martin
@Spazholio
May 30 2016 21:57
raw-cgm/glucose.json is generated via openaps use cgm oref0_glucose --hours "25.0" --threshold “100"
Ben West
@bewest
May 30 2016 21:57
is that the report generating n the error?
Paul Martin
@Spazholio
May 30 2016 21:58
Zoned version via openaps use tz rezone --timezone "EDT" --adjust "missing" --date "timestamp dateString start_at end_at created_at" raw-cgm/glucose.json
Oh, I see. 1 second...
Ben West
@bewest
May 30 2016 21:58
there's a report invoke $x that will print that error
it's the --cli for that one we want
Paul Martin
@Spazholio
May 30 2016 22:00
It’s in the enact part of my loop. Give me a second to see which part. It’s either invoke enact/suggested.json or invoke enact/enacted.json
Ben West
@bewest
May 30 2016 22:01
probably first part
enacted is usually the python set_temp_basal which doesn't behave that way
Paul Martin
@Spazholio
May 30 2016 22:01
Yep.
Ben West
@bewest
May 30 2016 22:01
usually its one of the oref0 reports
Paul Martin
@Spazholio
May 30 2016 22:01
oref0-determine-basal://text/shell/enact/suggested.json
{"carbs":0,"boluses":0,"mealCOB":0}
Optional feature Auto Sensitivity enabled.  Could not find specified auto-sens: settings/auto-sens.json
[SyntaxError: Unexpected end of input]
BG data is too old, or clock set incorrectly.  Your CGM time is Mon May 30 2016 21:57:49 GMT-0400 (EDT) but your system time is Mon May 30 2016 18:01:21 GMT-0400 (EDT)
reporting enact/suggested.json
(disregard the auto-sens.json bit)
Ben West
@bewest
May 30 2016 22:01
yeah, show enact/suggested.json --cli
hmmm
that doesn't seem right
Paul Martin
@Spazholio
May 30 2016 22:02
openaps use oref0-determine-basal shell --not-json-default monitor/iob.json monitor/temp_basal.json monitor/glucose.json settings/profile.json settings/auto-sens.json monitor/meal.json []
Ben West
@bewest
May 30 2016 22:02
ah, can't ignore the auto-sens bit :-)
that.. also doesn't look quite right
Paul Martin
@Spazholio
May 30 2016 22:02
There are times when auto-sens.json isn’t there due to a faulty running during the last loop. It’s always worked regardless. Definitely never munged the CGM date. =)
Ben West
@bewest
May 30 2016 22:03
it won't any more
it has to be there or it will fail :-)
Paul Martin
@Spazholio
May 30 2016 22:03
Well…rats.
Ben West
@bewest
May 30 2016 22:03
always is better than sometimes
Paul Martin
@Spazholio
May 30 2016 22:04
I have the auto-sens.json running AFTER everything’s enacted, so I’m generally 5 mins behind. That way it wouldn’t hold up the loop, since it can take forever to run sometimes.
Alright, I’ll re-work that bit, see if it helps. Does that have anything to do with the time being all wonky?
jaylagorio
@jaylagorio
May 30 2016 22:07
@bewest Wow, that significantly changes my thoughts on when/whether to upgrade to a G5 now that I finally have G4 stuff down.
Are the USB comms at least similar/the same? Or did they layer needless encryption over that too?
Your repo didn't lead me to believe the USB changed much or at all
Paul Martin
@Spazholio
May 30 2016 22:13
@bewest Here’s the entirety of my ENACT section:
STARTING ENACT
pump://JSON/iter_pump_hours/settings/pumphistory-24h.json
reporting settings/pumphistory-24h.json
tz://JSON/rezone/settings/pumphistory-24h-zoned.json
reporting settings/pumphistory-24h-zoned.json
auto-sens://text/shell/settings/auto-sens.json
-+---++--=>>-Could not find glucose data

/home/pi/src/oref0/lib/determine-basal/cob-autosens.js:50
        avgDelta = avgDelta.toFixed(2);
                            ^
TypeError: Object -13.33 has no method 'toFixed'
    at detectSensitivityandCarbAbsorption (/home/pi/src/oref0/lib/determine-basal/cob-autosens.js:50:29)
    at Object.<anonymous> (/home/pi/src/oref0/bin/oref0-detect-sensitivity.js:73:5)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
reporting settings/auto-sens.json
oref0-determine-basal://text/shell/enact/suggested.json
{"carbs":0,"boluses":0,"mealCOB":0}
Optional feature Auto Sensitivity enabled.  Could not find specified auto-sens: settings/auto-sens.json
[SyntaxError: Unexpected end of input]
BG data is too old, or clock set incorrectly.  Your CGM time is Mon May 30 2016 22:07:50 GMT-0400 (EDT) but your system time is Mon May 30 2016 18:12:45 GMT-0400 (EDT)
reporting enact/suggested.json
[{"msg":"Optional feature Auto Sensitivity enabled.  Could not find specified auto-sens: settings/auto-sens.json","error":{}},{"msg":"BG data is too old, or clock set incorrectly.  Your CGM time is Mon May 30 2016 22:07:50 GMT-0400 (EDT) but your system time is Mon May 30 2016 18:12:45 GMT-0400 (EDT)"}]
No action required
ENACT COMPLETE
Ben West
@bewest
May 30 2016 22:19
so your autosens is creating an error
Paul Martin
@Spazholio
May 30 2016 22:19
Yep. It’s a new one too. =)
Ben West
@bewest
May 30 2016 22:23
sudo pip install -U openaps, I tweaked how --cli works again :-)
still a few issues, but fewer
Paul Martin
@Spazholio
May 30 2016 22:24
Oh, it’s not an error in oref0?
Running now...
Ben West
@bewest
May 30 2016 22:24
oh, this?
this is some kind of error
but there will be fewer issues printing the --cli args
Paul Martin
@Spazholio
May 30 2016 22:24
Ok, one sec. I’ll kick the loop off again.
Ben West
@bewest
May 30 2016 22:25
we just want show --cli
specifically, at least settings/auto-sens.json is generating an error
so openaps report show settings/auto-sens.json --cli
Paul Martin
@Spazholio
May 30 2016 22:25
openaps use auto-sens shell --not-json-default monitor/glucose.json settings/pumphistory-24h-zoned.json settings/insulin_sensitivities.json settings/basal_profile.json settings/profile.json []
Ben West
@bewest
May 30 2016 22:26
gr
so few issues there
one is that remainder = [] not sure how you got that
maybe from docs
Paul Martin
@Spazholio
May 30 2016 22:27
I blame Bush.
(but it’s probably from the docs)
Ben West
@bewest
May 30 2016 22:27
you don't seem to be running latest though
and that's other issue
Paul Martin
@Spazholio
May 30 2016 22:27
Oh?
Latest…what?
oref0? If so, I’m running AMA.
(as a Redditor, that acronym still throws me off…)
Ben West
@bewest
May 30 2016 22:31
openaps
Paul Martin
@Spazholio
May 30 2016 22:31
Oh.
Ben West
@bewest
May 30 2016 22:31
I actually just updated it about 15 minutes ago
Paul Martin
@Spazholio
May 30 2016 22:31
openaps 0.1.4-dev. And it’s located in /usr/bin/local/openaps if that helps.
Would the entire output from the sudo pip install -U openaps command help?
Ben West
@bewest
May 30 2016 22:33
nah
so, I'm working on someone's rig
openaps report add predict/auto-sens.json JSON auto-sens shell monitor/glucose.json monitor/pump-history-28-zoned.json monitor/insulin-sensitivities.json monitor/active-basal-profile.json monitor/profile.json
pi@murse:~/aps $ openaps report show  predict/auto-sens.json --cli
openaps use auto-sens shell monitor/glucose.json monitor/pump-history-28-zoned.json monitor/insulin-sensitivities.json monitor/active-basal-profile.json monitor/profile.json
Paul Martin
@Spazholio
May 30 2016 22:34
I removed the remainder bit from my report, just so’s you know.
Ben West
@bewest
May 30 2016 22:35
and that seems to work fine
it had a remainder = [] prior and did not work
Paul Martin
@Spazholio
May 30 2016 22:36
Hmm. I just re-invoked it and it appears to die at the same point.
Ben West
@bewest
May 30 2016 22:36
0.1.4 proper or 0.1.5-dev will fix the --cli stuff
Paul Martin
@Spazholio
May 30 2016 22:36
auto-sens://text/shell/settings/auto-sens.json
-+---++--=>>-Could not find glucose data

/home/pi/src/oref0/lib/determine-basal/cob-autosens.js:50
        avgDelta = avgDelta.toFixed(2);
                            ^
TypeError: Object -13.33 has no method 'toFixed'
    at detectSensitivityandCarbAbsorption (/home/pi/src/oref0/lib/determine-basal/cob-autosens.js:50:29)
    at Object.<anonymous> (/home/pi/src/oref0/bin/oref0-detect-sensitivity.js:73:5)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
reporting settings/auto-sens.json
Ben West
@bewest
May 30 2016 22:36
yeah, looks like there were mutiple issues
that's still auto-sens
openaps report show settings/auto-sens.json --cli
Paul Martin
@Spazholio
May 30 2016 22:37
openaps use auto-sens shell --not-json-default monitor/glucose.json settings/pumphistory-24h-zoned.json settings/insulin_sensitivities.json settings/basal_profile.json settings/profile.json
Ben West
@bewest
May 30 2016 22:37
mine doesn't print --not-json-default and yours does, but think it's because you're using 0.1.4-dev
and that's just cosmetic
but it's saying can't get glucose data
which is monitor/glucose.json
or did you make a new file for that?
Paul Martin
@Spazholio
May 30 2016 22:38
I am still running that, yes. I just re-ran the sudo pip yadda yadda and I’m still on 0.1.4-dev
Ben West
@bewest
May 30 2016 22:38
think you have a local git repo that is linked somewhere
Paul Martin
@Spazholio
May 30 2016 22:38
No, monitor/glucose.json is still the right file.
Ben West
@bewest
May 30 2016 22:38
perhaps ~/src/openaps
Paul Martin
@Spazholio
May 30 2016 22:38
It’s quite possible. I still have my ~/src directory.
I can delete the ~/src/(opeanps|openaps-contrib) dirs just to make sure it’s not looking back at them?
Ben West
@bewest
May 30 2016 22:41
hmm, think so, but I think there's still another directory too
usually there's some directories under /usr/local/lib/python2.7/dist-packages/ as well
when I delete the local directories and re-install via pip it seems to work for me
Paul Martin
@Spazholio
May 30 2016 22:42
So…just delete anything openaps-related in that dir? I see a few.
Ben West
@bewest
May 30 2016 22:42
yeah, sure
Paul Martin
@Spazholio
May 30 2016 22:42
Nothing that indicates 0.1.5 though.
Ben West
@bewest
May 30 2016 22:43
no, you want 0.1.4 which is the released version of 0.1.4-dev
Paul Martin
@Spazholio
May 30 2016 22:43
Ok, moving the dirs out of the ~/src directory seemed to have helped. I’m now on openaps 0.1.4.
Ben West
@bewest
May 30 2016 22:43
the "latest" currrently is 0.1.5-dev, but in general people should not need a -dev version unless they're helping to test a new/advanced feature that isn't ready for release
great
try that --cli again
should be more correct
there's still and issue with --date haven't fixed yet
Paul Martin
@Spazholio
May 30 2016 22:44
openaps use auto-sens shell monitor/glucose.json settings/pumphistory-24h-zoned.json settings/insulin_sensitivities.json settings/basal_profile.json settings/profile.json
Ben West
@bewest
May 30 2016 22:44
great
so it's looking at monitor/glucose.json
Paul Martin
@Spazholio
May 30 2016 22:44
Correct.
Ben West
@bewest
May 30 2016 22:44
I don't have this set up, so I can't tell you how it's supposed to work
Paul Martin
@Spazholio
May 30 2016 22:45
Well, the issue appears to be something wonked in oref0?
Ben West
@bewest
May 30 2016 22:45
but if it's claiming an error about glucose, it's got to be something about monitor/glucose.json
Paul Martin
@Spazholio
May 30 2016 22:45
auto-sens://text/shell/settings/auto-sens.json
-+---++--=>>-Could not find glucose data

/home/pi/src/oref0/lib/determine-basal/cob-autosens.js:50
        avgDelta = avgDelta.toFixed(2);
                            ^
TypeError: Object -13.33 has no method 'toFixed'
    at detectSensitivityandCarbAbsorption (/home/pi/src/oref0/lib/determine-basal/cob-autosens.js:50:29)
    at Object.<anonymous> (/home/pi/src/oref0/bin/oref0-detect-sensitivity.js:73:5)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
reporting settings/auto-sens.json
It can’t find the toFixed method?
Ben West
@bewest
May 30 2016 22:45
it's looking at the monitor/glucose.json doing someting with some average thing based on the glucose data
and failing
head monitor/glucose.json
Paul Martin
@Spazholio
May 30 2016 22:46
[
  {
    "direction": "Flat", 
    "trend": 4, 
    "dateString": "2016-05-30T22:07:50-04:00", 
    "sgv": 77, 
    "device": "share2", 
    "date": 1464646070000, 
    "_id": "574cba224adc61af4af87779", 
    "type": "sgv",
Ben West
@bewest
May 30 2016 22:47
ah, noglucose field maybe
dunno
Paul Martin
@Spazholio
May 30 2016 22:47
No no no...
It’s there, it just got cut off:
[                                                                                                                                                                                                                                                                                                                    
  {
    "direction": "Flat",.
    "trend": 4,.
    "dateString": "2016-05-30T22:07:50-04:00",.
    "sgv": 77,. 
    "device": "share2",.
    "date": 1464646070000,.
    "_id": "574cba224adc61af4af87779",.
    "type": "sgv",.
    "glucose": 77
  },.
Ben West
@bewest
May 30 2016 22:47
would have to look at the auto-sens code in lib/determine-basal/cob-autosens.js
ryanchen26
@ryanchen26
May 30 2016 22:50
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
* * * * * killall -g --older-than 10m openaps
* * * * * cd /home/pi/aps && openaps loop
* * * * * cd /home/pi/aps && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' || openaps retry-loop ) 2>&1 | tee -a /var/log/openaps/loop.log
based on previous posts it seems like this is the way to go for the crontab but it doesn't work. help?
Ben West
@bewest
May 30 2016 22:51
mine's a little simpler
SHELL=/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

*/5 * * * * (cd /home/edison/openaps && time openaps do-everything ) 2>&1 | logger -t openaps-loop
Paul Martin
@Spazholio
May 30 2016 22:56
auto-sens://text/shell/settings/auto-sens.json
=+>>-Could not find glucose data
Would that seem to indicate that it’s the 6th item in monitor/glucose.json that’s causing issues?
Ben West
@bewest
May 30 2016 22:57
sorry, I have no idea
Paul Martin
@Spazholio
May 30 2016 22:58
Do you know what character is used for commenting inside the openaps.ini?
Ben West
@bewest
May 30 2016 22:59
#
but your comment will disappear
Paul Martin
@Spazholio
May 30 2016 23:00
Trying to disable auto-sens for a moment.
It…what?
Ben West
@bewest
May 30 2016 23:00
next time you add/remove or make changes to openaps.ini via the tools, the comments will most likely be removed
Paul Martin
@Spazholio
May 30 2016 23:00
Argh.
Ok.
Ben West
@bewest
May 30 2016 23:01
but you can also git revert $hash change
so if you make a change for , you can do git show and note the hash
or do git tag mybefore-controversy
then you can do git revert $hash
or git revert mybefore-controversy
kind of wish I had used yaml insetad of ini
Paul Martin
@Spazholio
May 30 2016 23:04
Ok…I’ve “fixed” the problem.
My monitor/glucose.json doesn’t just contain glucose data - it contains lots of things from NS as well. If I tell my auto-sens.json report to look ONLY at my raw-cgm/glucose-zoned.json file, then it runs correctly.
Ben West
@bewest
May 30 2016 23:06
ah interesting
can filter it I guess
Paul Martin
@Spazholio
May 30 2016 23:06
However…I still get:
oref0-determine-basal://text/shell/enact/suggested.json
{"carbs":0,"boluses":0,"mealCOB":0}
{"ratio":0.89}
BG data is too old, or clock set incorrectly.  Your CGM time is Mon May 30 2016 23:02:49 GMT-0400 (EDT) but your system time is Mon May 30 2016 19:06:08 GMT-0400 (EDT)
reporting enact/suggested.json
[{"msg":"BG data is too old, or clock set incorrectly.  Your CGM time is Mon May 30 2016 23:02:49 GMT-0400 (EDT) but your system time is Mon May 30 2016 19:06:08 GMT-0400 (EDT)”}]
It still thinks the time is off on the CGM. This is totally new as of today, before I started making changes. It started happening while I was out shopping with the missus.
Ben West
@bewest
May 30 2016 23:07
oref0 device-helper clean-nightscout-glucose 'json -f $1 -c "this.sgv"' | openaps import
Paul Martin
@Spazholio
May 30 2016 23:08
While happy to run that command, could you give mea quick heads up as to what it does? =)
Ben West
@bewest
May 30 2016 23:08
oref0 device-helper clean-nightscout-glucose 'json -f $1 -c "this.sgv"' this prints json blob describing a new openaps device called clean-nightscout-glucose
the openaps import actually creates the device
then you can run the data via that to eliminate non-sgv records
eg: openaps use clean-nightscout-glucose shell monitor/glucose.json to prepare glucose for auto-sens
the $1 is the argument after shell
you can try with fun things like echo to see how it works: oref0 device-helper say-hello 'echo "HELLO $*"'
then openaps use say-hello shell HAHAHAHA
Paul Martin
@Spazholio
May 30 2016 23:12
That first command didn’t work:
Traceback (most recent call last):
  File "/usr/local/bin/openaps-import", line 26, in <module>
    class ImportToolApp (cli.ConfigApp):
  File "/usr/local/bin/openaps-import", line 37, in ImportToolApp
    MAP = get_importable( )
  File "/usr/local/bin/openaps-import", line 21, in get_importable
    mod = entry.load( )
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 2228, in load
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 2245, in require
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 834, in resolve
pkg_resources.VersionConflict: (dexcom-reader 0.0.8 (/home/pi/src/dexcom_reader), Requirement.parse('dexcom_reader>=0.1.8'))
Do I need to upgrade dexcom_reader?
Ben West
@bewest
May 30 2016 23:12
hmmm
interesting
yeah
same, rm the directories
same for decocare/decoding-carelink
Paul Martin
@Spazholio
May 30 2016 23:12
And I still have that in ~/src. Should I do the pip method instead?
Ben West
@bewest
May 30 2016 23:13
pip won't do anything if ~/src/foo is already linked
Paul Martin
@Spazholio
May 30 2016 23:13
Right, I’ll get rid of ~/src/dexcom_reader and then sudo pip install -U dexcom_reader?
Ben West
@bewest
May 30 2016 23:13
yeah
might need to check that /usr/local/lib/python2.7/dist-packages/ area too
Paul Martin
@Spazholio
May 30 2016 23:14
k
sudo pip install -U decoding-carelink? Or is it called something else?
Ben West
@bewest
May 30 2016 23:16
decocare
actually
just
sudo pip install -U openaps should update everything automatically
that's the whole point of packaging properly :-)
Paul Martin
@Spazholio
May 30 2016 23:17
Running...
And oref0 device-helper clean-nightscout-glucose 'json -f $1 -c "this.sgv"' | openaps import should work afterward?
Ben West
@bewest
May 30 2016 23:18
think so...
Paul Martin
@Spazholio
May 30 2016 23:18
Traceback (most recent call last):
  File "/usr/local/bin/openaps-import", line 89, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/bin/openaps-import", line 77, in run
    candidates = json.load(args.input)
  File "/usr/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting , delimiter: line 1 column 232 (char 231)
=/
Ben West
@bewest
May 30 2016 23:18
ah different error
Paul Martin
@Spazholio
May 30 2016 23:19
Progress, of a sort. =)
Ben West
@bewest
May 30 2016 23:19
$ oref0 device-helper clean-nightscout-glucose 'json -f $1 -c "this.sgv"'
{"clean-nightscout-glucose": {"vendor": "openaps.vendors.process", "extra": "clean-nightscout-glucose.ini"}, "type": "device", "name": "clean-nightscout-glucose", "extra": {"fields": "", "cmd": "bash", "args": "-c \"json -f $1 -c "this.sgv"\" -- "}}
did you delete ~/src/oref0 too?
Paul Martin
@Spazholio
May 30 2016 23:20
It’s moved out of the way, yes. Updated a bit ago via npm
That command worked, btw. Appears to be the openaps import that has an issue.
Ben West
@bewest
May 30 2016 23:20
hmm
I see extra space in there maybe
Paul Martin
@Spazholio
May 30 2016 23:22
Oh?
Ben West
@bewest
May 30 2016 23:22
ah
I see
hehe
oref0 device-helper clean-nightscout-glucose 'json -f $1 -c this.sgv'
was a quotes issue
maybe needs some work work in the future
Paul Martin
@Spazholio
May 30 2016 23:23
Ok cool, that worked.
Ben West
@bewest
May 30 2016 23:23
oref0 device-helper clean-nightscout-glucose "json -f \$1 -c 'this.sgv'" is also good
should be able to give it that openaps use clean-nightscout-glucose shell monitor/glucose.json
Paul Martin
@Spazholio
May 30 2016 23:24
Ok so now that I have that device in there, I should be able to run that against monitor/glucose.json and feed THAT info into the settings/auto-sens.json file to get it to behave?
Ben West
@bewest
May 30 2016 23:24
maybe
openaps use clean-nightscout-glucose shell monitor/glucose.json | tee temp-glucose.json
Paul Martin
@Spazholio
May 30 2016 23:24
Well, that’s better than what I’ve BEEN getting. =)
Ben West
@bewest
May 30 2016 23:25
then take the --cli and just try the use with temp-glucose.json instead of monitor/glucose.json to see what happens
Paul Martin
@Spazholio
May 30 2016 23:26
C’mon, c’mon….finish without errors….
SCORE!
Ben West
@bewest
May 30 2016 23:26
well if you haven't seen errors yet, that's a good sign
usually it finishes fast with error, right?
ah, maybe not... I see a commit that delays and warns :-(
Paul Martin
@Spazholio
May 30 2016 23:26
Not really.
Usually takes about 30s+ to run.
Ben West
@bewest
May 30 2016 23:27
and then error?
usually when there's an error it errors faster, I thought
Paul Martin
@Spazholio
May 30 2016 23:27
Nope, this time it worked just fine.
Ben West
@bewest
May 30 2016 23:27
right, the point being about when there is an error
so the fact that it's 10 seconds in means the previous problem is solved
Paul Martin
@Spazholio
May 30 2016 23:27
It errored very fast last time. I suspect because that file is riddled with non-sgv entries.
Ben West
@bewest
May 30 2016 23:28
yeah, so that seems to fix that problem, auto-sens doesn't like non-glucose stuff in there
should probably open issue on oref0
Paul Martin
@Spazholio
May 30 2016 23:28
Ok, so I suspect I don’t want to muck with changing the monitor/glucose.json since everything and its brother uses it. So I should create a new monitor/auto-sens-glucose.json instead?
Ben West
@bewest
May 30 2016 23:29
yeah, prepare something just for auto-sens
Paul Martin
@Spazholio
May 30 2016 23:29
Yeah, I’ll open something on oref0 later. Low BG + dinner + broken loop = I’ll be back in a bit. =)
Ben West
@bewest
May 30 2016 23:29
I'd do oref0-monitor/auto-sens-prepped-glucose.json
or similar
Paul Martin
@Spazholio
May 30 2016 23:30
I don’t even have an oref0-monitor dir. Is that used for something? Is that a new standard dir?
Ben West
@bewest
May 30 2016 23:30
sure
Paul Martin
@Spazholio
May 30 2016 23:30
Of course it is. headdesk =)
Ben West
@bewest
May 30 2016 23:31
if you use oref0 template, you'll wind up an oref0-monitor and oref0-predict and other stuff
Paul Martin
@Spazholio
May 30 2016 23:31
Oh, I haven’t run that yet. I’ll do that when I set up a new rig.
Ben West
@bewest
May 30 2016 23:31
I mean, you're not doing standard stuff at this point :-)
Paul Martin
@Spazholio
May 30 2016 23:31
But it was standard a week or so ago! =)
Ben West
@bewest
May 30 2016 23:31
in my mind auto-sens is not standard yet, etc...
Paul Martin
@Spazholio
May 30 2016 23:31
Ok, point taken.
Ben West
@bewest
May 30 2016 23:32
it's bunch of people figuring out what works, you're doing stuff no one else is quite doing :)
the reports need to be organized so you can fix it when you go in later
Paul Martin
@Spazholio
May 30 2016 23:32
That usually means I’m ahead of the curve, or I’m doing something fundamentally incorrectly. =)
Ben West
@bewest
May 30 2016 23:33
for me, after maintaining lot of software projects, we're new enough that we're still uncovering best-use practices
my recommendations are to use lots of directories and descriptive names to help yourself out later
Paul Martin
@Spazholio
May 30 2016 23:33
Oh yeah, I’m definitely seeing that. I kinda like it, tbh.
Ben West
@bewest
May 30 2016 23:34
monitor and settings started wearing on me, so I started adapting with raw-pump and oref0-monitor, oref0-predict, and oref0-enacted and similar
your new openaps makes it so that the report writer creates the directory if it's the first time and missing
so you can create new report directories on the fly now without worrying about mkdir
Paul Martin
@Spazholio
May 30 2016 23:35
Nice.
I’m running the refactored loop now…waiting to see if it finishes.
Ben West
@bewest
May 30 2016 23:36
yeah, the stuff you're doing is fine... with stuff like this, little things like oref0 device-helper make it easy to turn a tiny bit of bash into openaps alias without worrying about as many quotes
once it's a device, you can use and report with it
Paul Martin
@Spazholio
May 30 2016 23:37
Ugh, I’m barfing on pumphistory-24h.json. Happens sometimes.
Any thoughts on the CGM time being all wonky?
That’s gonna break everything regardless of all this new neat stuff we just implemented.
Eric Luhrs
@eluhrs
May 30 2016 23:38
@Spazholio I just got you question about the powerboost 1000c used in my OpenAPS case (http://www.thingiverse.com/thing:1525618). Since 18650 lithium ion cells are available in larger sizes (mine is 3400mAh), I wanted a faster charger than the one that comes with the Edison. The powerboost 1000c is almost 10x faster at 1000mA. It also avoids the Edison's 6 hour (?) charge limit allows you to use the device while it is being charged. I don't think the basic charger does that (though I ordered one for a smaller Pi Zero-based rig I'm starting to work on, so I'll soon find out).
Ben West
@bewest
May 30 2016 23:38
enact/suggested.json is the bad report?
Paul Martin
@Spazholio
May 30 2016 23:39
Hang on...
Ben West
@bewest
May 30 2016 23:39
it's looking at monitor/glucose.json or a different file?
ddaniels1
@ddaniels1
May 30 2016 23:39
Fried my Edison over the weekend. Just set a new one up, git cloned the directory and running into an error when test running monitor/ns-glucose.json
Ben West
@bewest
May 30 2016 23:39
same process again, openaps report show enact/suggested.json --cli
Paul Martin
@Spazholio
May 30 2016 23:39
I think auto-sens was breaking the time (somehow) because now it’s running just fine.
Argh.
ddaniels1
@ddaniels1
May 30 2016 23:39
edison@doubled:~/Documents/try5$ openaps report invoke monitor/ns-glucose.json
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/edison/src/openaps/bin/openaps-report", line 82, in <module>
    app( )
  File "/home/edison/src/openaps/openaps/cli/__init__.py", line 47, in __call__
    self.configure_parser(self.parser)
  File "/home/edison/src/openaps/bin/openaps-report", line 50, in configure_parser
    available = devices.get_device_map(self.config)
  File "/home/edison/src/openaps/openaps/devices/__init__.py", line 21, in get_device_map
    for device in Device.FromConfig(vendors, conf):
  File "/home/edison/src/openaps/openaps/devices/device.py", line 77, in FromConfig
    vendor = vendors.lookup(config.get(candidate, 'vendor').split('.').pop( ), config)
  File "/home/edison/src/openaps/openaps/vendors/__init__.py", line 27, in lookup
    return get_map(config)[name]
  File "/home/edison/src/openaps/openaps/vendors/__init__.py", line 22, in get_map
    vendors = all_vendors(config)
  File "/home/edison/src/openaps/openaps/vendors/__init__.py", line 36, in all_vendors
    return get_vendors( ) + find_plugins(config)
  File "/home/edison/src/openaps/openaps/vendors/__init__.py", line 16, in find_plugins
    return [ v.get_module( ) for v in vendors ]
  File "/home/edison/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
Paul Martin
@Spazholio
May 30 2016 23:39
I need you to stop invoking black magic when you’re coding this stuff up, k? =)
Ben West
@bewest
May 30 2016 23:40
@Spazholio sounds to me like it's likely it was never running quite right
@Spazholio like moving that glucose file around seemed to make things work sometimes and fail others
ddaniels1
@ddaniels1
May 30 2016 23:40
@bewest any idea on this error?
Ben West
@bewest
May 30 2016 23:40
now everything's starting to be more consistent, work same way every time
@ddaniels1 sudo pip install openaps-contrib
openaps vendor add openapscontrib.timezones
the latter report was saying that auto-sens was no good and couldn't continue i beileve
the first report was auto-sens itself
ddaniels1
@ddaniels1
May 30 2016 23:42
Why would I get that error? Installed dev is that it?
Ben West
@bewest
May 30 2016 23:42
@ddaniels1 think it just has to do with starting over, it's easy to overlook installing openaps-contrib maybe
Paul Martin
@Spazholio
May 30 2016 23:54
@bewest Quite possible. I’m going to integrate your tz select report and then the auto-sens report, and see if it still works.
@eluhrs Thanks! I ordered one of each because sometimes you just get into an electronics spending spree and think, “Why not?"
Paul Martin
@Spazholio
May 30 2016 23:59
@eluhrs Also, I’m interested in the 3D printable case you designed. Do you have a recommended vendor that does quality work (that’s preferably not too expensive)? We have a 3D printer at my college, but I’m not sure what kind of quality it is.