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

14th
May 2016
Paul Martin
@Spazholio
May 14 2016 00:03
I really need to get a second rig. I’m fairly nervous about borking my setup here. =)
Ben West
@bewest
May 14 2016 00:03
ah
I have just the thing for that
you have openaps import -l?
Paul Martin
@Spazholio
May 14 2016 00:06
I do.
Scott Leibrand
@scottleibrand
May 14 2016 00:06
another trick is to create a second openaps directory for development and testing
Ben West
@bewest
May 14 2016 00:07
openaps import -l | while read type ; do openaps $type show --json ; done | json -g | tee backup-loop.json
Paul Martin
@Spazholio
May 14 2016 00:10
I like both of those ideas. Would I just pipe backup-loop.json back into openaps import if I need to restore?
Ben West
@bewest
May 14 2016 00:10
yup
or just as arg
openaps import backup.json
there's no rush, if it's working
I'd focus on manually trying to play with lsgaps to backfill the stuff you wanted in there, shouldn't need any more config changes for that
Paul Martin
@Spazholio
May 14 2016 00:13
Yeah, that’s what I think I’ll do. I’m slowly starting to get how the whole thing works and how the pieces fit together. I’m pretty far from grokking it, but I’m getting a feel for it.
Ben West
@bewest
May 14 2016 00:24
I just created oref0 export-loop, which does pipe thingy you just did
Scott Leibrand
@scottleibrand
May 14 2016 00:26
would be nice to have an export-sharable-loop that strips secret data out of it
Ben West
@bewest
May 14 2016 00:27
I put most of it in oref0 already
nightscout auto...crud uses this technique to replace the secret args
with the template stuff, we're 80% there
the way it works now, is you need to add vendors and a few devices still
but basically all the ns/pump/oref0 reports and stuff are all automatically imported via the template
ns device autoconfigures itself
subg_rfspy I believe now supports autoscanning for the port
so we should be able to eliminate an arg there
Scott Leibrand
@scottleibrand
May 14 2016 00:31
doesn't the autoscan only work on USB?
Ben West
@bewest
May 14 2016 00:32
yeah, think so
a lot of the stuff that is easily importable now has template to go with it
some things like wired mmeowlink port, and how to handle glucose are still under flux and require some touches
Paul Martin
@Spazholio
May 14 2016 00:34
Out of nowhere, my preflight seems to be failing more and more often and leaving lots of cruft in my process list until the killall -g --older-than 10m openaps runs in cron. I’m using the TI stick, and while I know this is a long shot - any ideas?
Scott Leibrand
@scottleibrand
May 14 2016 00:34
that's pretty normal unfortunately. probably 900MHz interference or something
if you have a setup like mine it should retry after about 2 minutes. if you want you could reduce the 120s sleep as long as you only have one rig
Paul Martin
@Spazholio
May 14 2016 00:35
I’m going 30+ minutes between uploads to NS. And apparently it’s having issues generating temp_basal.json so nothing’s getting sent to the pump. =/
Scott Leibrand
@scottleibrand
May 14 2016 00:36
@bewest yeah, we still need to figure out a way to automatically try to get BG from a wired CGM, then fall back to NS or openxshareble as necessary, and do all the gap stuff and upload to NS. seems like that should be a fairly one-sized-fits-all algorithm once we build in all the capabilities
@Spazholio what is failing exactly?
Ben West
@bewest
May 14 2016 00:37
even then, it's still not that easy
we're quickly moving toward g5/ble vs cabled support
and the g5 support will require a daemon, it'll be different
Paul Martin
@Spazholio
May 14 2016 00:37
STARTING PREFLIGHT                                                                                                                                                                                                                                                                                                   
pump://JSON/read_clock/monitor/clock.json
subg_rfspy status: OK
Version: subg_rfspy 0.8
pump://JSON/mmtune/mmtune.json
subg_rfspy status: OK
Version: subg_rfspy 0.8
reporting mmtune.json
PREFLIGHT FAIL
cgm://JSON/oref0_glucose/raw-cgm/glucose.json
ns-glucose://text/shell/monitor/ns-glucose.json
reporting monitor/ns-glucose.json
GATHER COMPLETE
STARTING GET-SETTINGS
No handlers could be found for logger "mmeowlink.handlers.stick"
settings/model.json  raised  No acknowledgement from pump on wakeup. Is it out of range or is the battery too low?
Notice how the error messages from the TI stick communications are getting interspersed even after the PREFLIGHT FAIL? That seems…odd.
Scott Leibrand
@scottleibrand
May 14 2016 00:39
is your cron not checking properly for already-running processes?
I think by default mine checks for retry-loop: perhaps you forgot to change that to loop?
Paul Martin
@Spazholio
May 14 2016 00:39
Every 10 mins, it clears them out. I think that’s…hmm. I’ll check.
I think I was using an older preflight that I had working before. Does your preflight run mmtune every single iteration?
Scott Leibrand
@scottleibrand
May 14 2016 00:42
yes
Paul Martin
@Spazholio
May 14 2016 00:43
Yeah, I switched over to yours and it still fails. I’m going to try using the retry-loop instead of loop directly...
Paul Martin
@Spazholio
May 14 2016 01:09
Reset Pi, reset pump, re-work cron - things appear to be ok for the moment...
Brian Bonner
@itsn0tm3
May 14 2016 01:39
I'm noticing the same thing myself
I will get the "your pump doesn't seem to like you anymore" messages
I actually check to make sure all of my rigs are off except the one I'm using when that happens. unplugging and plugging the usb back in seems to solve it tho
was weird because I never saw it before until maybe a week or two ago
changing the battery on the pump fixed it but not sure if it was something else too
rebooting also helped at one point when it happened again later
I still need to narrow down what caused it tho, since I get it at home but not at work
Paul Martin
@Spazholio
May 14 2016 01:55
@bewest I ran your openaps use ns shell get entries.json count=1000 | openaps use tz rezone --astimezone --date dateString --date display_time - | openaps use tz lsgaps --date dateString --before now - | openaps use tz select --date dateString --gaps - monitor/glucose.json command on a dev copy of my openaps instance (thanks for the idea @scottleibrand!) and it returned what I think are accurate entries. Which is pretty stinking sweet. So thanks. =)
So now I should be able to dump that to a file, then upload it to NS as is, right?
Paul Martin
@Spazholio
May 14 2016 02:02
(and what does sgv stand for?)
Ben West
@bewest
May 14 2016 02:07
yes
sgv is serum glucose value
Paul Martin
@Spazholio
May 14 2016 02:11
So would that be something like openaps use ns shell upload whatever.json?
openaps use ns shell -h isn’t yielding much assistance.
Or wait, would it be openaps use ns shell upload entries whatever.json?
Ben West
@bewest
May 14 2016 02:26
close
openaps use ns shell upload entries.json prepared-entries.json
the last arg there is your file
Paul Martin
@Spazholio
May 14 2016 02:27
Ah! Ok, I need to pull some more entries from the CGM, but then I’ll give it a whirl.
Thanks.
Ok, the command worked, but it didn’t appear to fill in the gaps themselves on NS. Is there any way in NS to see the timestamp that NS is using for a specific entry? I want to make sure I have the right entries...
Like some sort of debug mode that I can enable or something?
Paul Martin
@Spazholio
May 14 2016 02:41
And another question (sorry for all of ‘em in a row) - I should be able to do something like openaps use cgm iter_glucose 5 or openaps use cgm oref0_glucose if I have my Dexcom plugged in, right? Because I can’t - it’s giving me a JSON error. Scrolling up, I could swear those are the exact commands we used once before...
Paul Martin
@Spazholio
May 14 2016 02:48
Disregard that last question. Apparently had a bum USB cable...
Paul Martin
@Spazholio
May 14 2016 03:01
HOLY HELL IT WORKED! HAHAHAHAHAHA! My OCD is sated!
Scott Leibrand
@scottleibrand
May 14 2016 03:09
:+1:
sweet! Now time to write that up before you forget how you did it. ;-)
Paul Martin
@Spazholio
May 14 2016 03:09
Oh, I already have a notes.txt. =)
Have a question about the black magic that you’ve provided for me though. The first part of the command gets the 1000 NS entries. I get that. The second part rezones them. I get that as well. However, if I’m reading the third part openaps use tz lsgaps --date dateString --before now - correctly, it’s saying “list the gaps using…something”. I get what the —before now does, but what does the —date dateString represent? The help message doesn’t indicate what it’s for. I know I’m piping in the results of the previous two commands into the third command, but the —date thing is throwing me.
Scott Leibrand
@scottleibrand
May 14 2016 03:31
that just identifies the name of the date field to use in the input data
"list the gaps in the data provided on stdin (-) by looking at the dateString field"
Paul Martin
@Spazholio
May 14 2016 03:35
Ahhhh, ok. And what does it determine a “gap” to be? 5 minutes? Does it analyze the JSON file to determine the average time between entries and then give the ones that don’t conform?
This isn’t strictly necessary information, I’m just curious.
Scott Leibrand
@scottleibrand
May 14 2016 03:36
I think ben said earlier a gap is anything shorter than 10 minutes, so at least one missing data point
(by default, and configurable)
Paul Martin
@Spazholio
May 14 2016 03:37
And then the next command openaps use tz select --date dateString --gaps - fromcgm.json is (I think) self-explanatory - “give me a JSON of all the items that fill in those gaps in stdin from the fromcgm.json file”.
Scott Leibrand
@scottleibrand
May 14 2016 03:38
that would be my interpretation as well
Paul Martin
@Spazholio
May 14 2016 03:40
furiously updates notes.txt
Paul Martin
@Spazholio
May 14 2016 03:47
I really don’t understand how mmtune works perfectly (meaning communication is taking place) but then the preflight fails immediately afterward...
JaysonEwer
@JaysonEwer
May 14 2016 04:03

@bewest Here is the output of the "s ~/src/openaps-contrib" command:

pi@Ewer-Open-APS:~ $ ls ~/src/openaps-contrib
CHANGES.markdown  LICENSE  MANIFEST.in  openapscontrib  openaps_contrib.egg-info  README.md  setup.py
pi@Ewer-Open-APS:~ $

Does that look correct to you?

Paul Martin
@Spazholio
May 14 2016 04:04
In NS, should I be seeing all the temp basals that OpenAPS is setting? Like, when I hover on the yellow dots or something? I know I can see the rates up top if I set the “Render Basal” option, but I wouldn’t mind seeing what changes OpenAPS makes for each pass.
Scott Leibrand
@scottleibrand
May 14 2016 04:22
the way to see that is to scroll back in "retro" mode, and the openaps pill will update with information on the last decision it made prior to the selected time.
you should definitely enable render basal as well as the openaps pill
and if you end up turning on advanced meal assist and ENABLE purple line predictions, you'll also be able to display openaps' predictions of future BGs, and see previous predictions in retro mode as well.
Paul Martin
@Spazholio
May 14 2016 04:26
The OpenAPS pill is enabled. I assume that render basal is enabled by putting “basal” in my ENABLE var?
Scott Leibrand
@scottleibrand
May 14 2016 04:30
yeah, I think that's all. here's what I have:
env ENABLE="openaps pump basal pushover maker careportal iob bwp raw"
env SHOW_FORECAST="openaps ar2"
env DEVICESTATUS_ADVANCED=true
not using pushover and maker: I could remove those.
Paul Martin
@Spazholio
May 14 2016 04:34
What’s the SHOW_FORECAST="openaps ar2”?
Matt Pressnall
@logichammer
May 14 2016 04:34
@scottleibrand , super basic question but when I run your set up script, references to "$NIGHTSCOUT_HOST", etc will get addressed if I add that as a variable in my crontab, correct?
Or to my .bashrc?
AMA Time!
Scott Leibrand
@scottleibrand
May 14 2016 04:35
@logichammer for running in cron, NIGHTSCOUT_HOST needs to be set at the top along with PATH
@Spazholio SHOW_FORECAST = openaps enables the purple line. ar2 is the cyan cone you have now.
Matt Pressnall
@logichammer
May 14 2016 04:36
Gotcha and to call some of these commands ad hoc, I probably should add to my .bashrc I'd think...thanks!
Paul Martin
@Spazholio
May 14 2016 04:37
Hmmm. I don’t have the purple line, but I don’t know that I’m using AMA - aren’t those tied together?
Dana Lewis
@danamlewis
May 14 2016 04:37
@Spazholio they are tied together
Matt Pressnall
@logichammer
May 14 2016 04:37
Are you on grilled cheese, @Spazholio?
Dana Lewis
@danamlewis
May 14 2016 04:37
and you’d know if you configured AMA ;)
GLUTEN FREE grilled cheese, @logichammer ;)
Matt Pressnall
@logichammer
May 14 2016 04:38
ha!
Dana Lewis
@danamlewis
May 14 2016 04:38
I petitioned for the official name change and everything ;p
Paul Martin
@Spazholio
May 14 2016 04:38
Pretty sure I’m on Funnel Cake? I’m on 0.9.0-dev.
Matt Pressnall
@logichammer
May 14 2016 04:38
You gots to be on the grilled cheese, I believe... @jasoncalabrese , added the purple lines to that version.
Paul Martin
@Spazholio
May 14 2016 04:38
I mean, I’m all about more features. =) Is enabling AMA fairly straightforward?
Dana Lewis
@danamlewis
May 14 2016 04:39
No(t yet)
needs some more love and…you guessed it…documentation ;)
Paul Martin
@Spazholio
May 14 2016 04:39
What’s the simplest way to update NS? I’m game to update. =)
Dana Lewis
@danamlewis
May 14 2016 04:39
you have to be willing to regularly enter carbs at every consumption, too, to do AMA
Paul Martin
@Spazholio
May 14 2016 04:39
Simple git pull?
Matt Pressnall
@logichammer
May 14 2016 04:40
I ask my wife and it NS gets updated...it's pretty simple on my end :)
Dana Lewis
@danamlewis
May 14 2016 04:40
@Spazholio starts with meal assist first…then graduate to AMA..then comes the purple lines
I highly recommend getting a basic loop up and running first, i.e. walk before you crawl. but if you want to go from walking to running, that’s your choice. just beware the gaps in documentation and adjust patience levels accordingly :)
David Daniels
@ddaniels1
May 14 2016 04:41
whats the difference between meal assist and ama?
Dana Lewis
@danamlewis
May 14 2016 04:41
meal assist was our original attempt. AMA is a much smoother implementation of it.
Matt Pressnall
@logichammer
May 14 2016 04:42
@danamlewis showed me an example via her NS going against its predictions and where she ended up and AMA looks freaking awesome!
Dana Lewis
@danamlewis
May 14 2016 04:42
both have to be enabled, and see ^^ about requiring willingness to always enter carb, because it also comes with wtfassist and if you sporadically do carbs, you’ll alternatively trigger wtfassist instead of meal assist sometimes
Matt Pressnall
@logichammer
May 14 2016 04:42
Only reason I am in front of computer after 50 hours this week on a Friday night
that sentence was mangled...I'm also drinking to dull the pain
David Daniels
@ddaniels1
May 14 2016 04:45
My daughter's DIA feels more like 2 1/2 hours but the pump won't do that. 2 hours feels a bit short and may lead to insulin stacking. In the context of the loop any feeling on picking 2 vs 3 hours?
Dana Lewis
@danamlewis
May 14 2016 04:46
@ddaniels1 not sure it makes a big difference with openaps, that will likely impact boluses more than loop action
Paul Martin
@Spazholio
May 14 2016 04:48
@danamlewis Fair enough about that whole walking/running/pole-vaulting thing. =)
Dana Lewis
@danamlewis
May 14 2016 04:54
:)
Matt Pressnall
@logichammer
May 14 2016 04:54
does the API_SECRET in the cron need to be the hashed version of my password or plaintext?
David Daniels
@ddaniels1
May 14 2016 04:58
I think it may affect openaps because of the IOB calculation being based in part on DIA. If too short the IOB will be gone but in reality still there and BG dropping. with potential to overshoot the lower limit. probably better to stick with the longer and let the algorithm correct it down a little slower.
Dana Lewis
@danamlewis
May 14 2016 04:59
@ddaniels1 yes, I would lean longer. but I don’t think it makes that much difference in the grand scheme of things, compared to not looping.
Scott Leibrand
@scottleibrand
May 14 2016 05:00
@logichammer IIRC you want the hashed one.
Matt Pressnall
@logichammer
May 14 2016 05:01
Merci...that's the one I will start with then!
Scott Leibrand
@scottleibrand
May 14 2016 05:01
@Spazholio which openaps-sh branch did you start from? AMA might not be too big a leap for you given how fast you've been doing things so far. :-)
But upgrading will almost certainly break your loop until you get things configured right, so do it on a dev rig or when you have a few hours.
just having a dev loop directory isn't quite good enough, because the AMA report format is slightly incompatible with the dev one, so you might see the main loop fail when you checkout the advanced-meal-assist branch and do the npm install stuff.
once we release dev to master, we'll be working on making that upgrade path a bit smoother before merging the advanced-meal-assist branch to dev
Paul Martin
@Spazholio
May 14 2016 05:13
@scottleibrand Pretty sure I started with the mmeowlink. However, I may have started with one, then re-did it when you mentioned that you had a mmeowlink branch, and might have mixed and matched a few things. I honestly don’t recall. But given what you’re saying, I think I’d rather wait until I have my dev rig up and running, and then I’d be happy to help you test out your upgrade path. =)
Scott Leibrand
@scottleibrand
May 14 2016 05:14
all: could use some input on https://github.com/openaps/oref0/pull/112#issuecomment-219201291 - do we want openaps to set the current basal as temp by default across the board (as has been true in dev for a few months now)? or leave it off by default (as in master)? or have it on by default only if meal-assist or auto-sens is enabled (which kinda require it to do much good)? input please! :-)
Paul Martin
@Spazholio
May 14 2016 05:18
Since I’m not sure what you mean by “set[ting] the current basal as temp”, my input will likely be minimal. =) Is there a feature that sets the temp basal to the same rate as my regular basal or something?
Matt Pressnall
@logichammer
May 14 2016 05:21
Hmmm...failing EARLY...because my cron is trying to call this @scottleibrand
mmeowlink/bin/mmeowlink-any-pump-comms.py
but that tool looks like it has been refactored away:
https://github.com/oskarpearson/mmeowlink
@oskarpearson, what is the equivalent command? Thanks!
Or is this the custom version of mmeowlink that can detect any activity and not in the dev branch?
NM..found the right branch
JaysonEwer
@JaysonEwer
May 14 2016 05:33
@scottleibrand So I jumped in earlier today/yesterday to upgrade to the latest oref0 which broke my loop pretty good. :-/ I guess I shouldn't have done that. :-D As I'm not quite sure what i'm even looking at with respect to messages at this point. :-/
I was working with @bewest , but then had to go to a meeting with my wife, so I didn't get to finish working with Ben earlier.
Scott Leibrand
@scottleibrand
May 14 2016 05:34
@Spazholio it's not really a feature, and more of a change in default behavior in dev. it will set your current basal as a temp if there's no temp running, which allows it to set a "current basal" that's actually calculated (due to meal assist or auto-sensitivity) to be different from what the pump is currently running. but it also means that it's easy to see at a glance in NS when the loop was running and when it wasn't, since there's always a temp set if the loop has been running within the last 30m.
@JaysonEwer so where are you now?
and, I thought it was a date. ;-)
Matt Pressnall
@logichammer
May 14 2016 05:35
@JaysonEwer, I have done that before...you probably do this and I know I do now, image your working pi so if you ever jack it up, you can restore easily...
JaysonEwer
@JaysonEwer
May 14 2016 05:35
Do you have any thoughts on the following error message:
pi@Ewer-Open-APS:~/Documents/openaps $ openaps use pump model
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 47, in __call__
    self.configure_parser(self.parser)
  File "/home/pi/src/openaps/bin/openaps-use", line 31, in configure_parser
    available = devices.get_device_map(self.config)
  File "/home/pi/src/openaps/openaps/devices/__init__.py", line 21, in get_device_map
    for device in Device.FromConfig(vendors, conf):
  File "/home/pi/src/openaps/openaps/devices/device.py", line 77, in FromConfig
    vendor = vendors.lookup(config.get(candidate, 'vendor').split('.').pop( ), config)
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 27, in lookup
    return get_map(config)[name]
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 22, in get_map
    vendors = all_vendors(config)
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 36, in all_vendors
    return get_vendors( ) + find_plugins(config)
  File "/home/pi/src/openaps/openaps/vendors/__init__.py", line 16, in find_plugins
    return [ v.get_module( ) for v in vendors ]
  File "/home/pi/src/openaps/openaps/vendors/plugins/vendor.py", line 19, in get_module
    return importlib.import_module(self.name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named openapscontrib.timezones
pi@Ewer-Open-APS:~/Documents/openaps $
Yes, it was a data/meeting. :-D
JaysonEwer
@JaysonEwer
May 14 2016 05:36
We had an archery lesson to attend which we did as a date. ;-)
Probably not. Let me check that out.
Scott Leibrand
@scottleibrand
May 14 2016 05:37
we did archery once. no lesson really though. but it was fun. :-)
I would actually just run quick-src.sh again if ben isn't around to tell you exactly which thing to try next. it basically does all the things. :)
JaysonEwer
@JaysonEwer
May 14 2016 05:38
yeah, I"m wondering if its a permissions thing as I ended up having to elevate to root in order for it to run properly?
Scott Leibrand
@scottleibrand
May 14 2016 05:39
in that case I would do a sudo rm -rf of anything in ~/src/ that is giving you perms problems, and let it re-clone it for you.
C-Ville
@C-Ville
May 14 2016 05:39
@all developpers for making this happen and to all in this channel keeping up motivation by showing how much effort you put in while setting up the rig. Got on pump therapy on tuesday and hooked up the loop on wednesday. 3rd overnite today.
Dana Lewis
@danamlewis
May 14 2016 05:40
I saw @C-Ville - congrats! :) :confetti_ball:
JaysonEwer
@JaysonEwer
May 14 2016 05:40
Ok, that's fair. regarding L26-L30 above....do I need to issue those command from my openaps inited directory or does it matter?
JaysonEwer
@JaysonEwer
May 14 2016 05:41
gotit
Scott Leibrand
@scottleibrand
May 14 2016 05:41
it all makes perfect sense if you speak fluent bash. ;-)
Dana Lewis
@danamlewis
May 14 2016 05:42
@JaysonEwer check slack when you get a chance btw
JaysonEwer
@JaysonEwer
May 14 2016 05:42
I see these Jedi mind tricks your playing on me....RTFM...young padawan.
will do, @danamlewis Thanks
Matt Pressnall
@logichammer
May 14 2016 05:59
Dang, @scottleibrand ! Getting up to speed using your crontab / "loop" is freaking easy now that I know which version of mmeowlink to set up...
And now, it won't clobber other TI sticks! Need to check into enabling MA and AMA but things are looking good...and EASY to get up and running!
Dana Lewis
@danamlewis
May 14 2016 06:01
Hooray!
(But document all the things, please :))
Matt Pressnall
@logichammer
May 14 2016 06:01
Only a couple of things but yes, taking notes to update the docs
Dana Lewis
@danamlewis
May 14 2016 06:02
:+1: :)
Matt Pressnall
@logichammer
May 14 2016 06:02
seriously, I could set up a new one in like 5 minutes knowing everything now
cruising!
Dana Lewis
@danamlewis
May 14 2016 06:02
:)
Ben West
@bewest
May 14 2016 06:03
did you find the just added export thingy?
Matt Pressnall
@logichammer
May 14 2016 06:03
I F'ing love whoever did this: PUMP_WARN_BATT_V !!!
Which export thing? For crontab or .bashrc / .profile? yes, good there!
and it was the hashed version of PW
Dana Lewis
@danamlewis
May 14 2016 06:07
@bewest for your Friday night viewing pleasure: https://twitter.com/catsofvr/status/731360943767097345
JaysonEwer
@JaysonEwer
May 14 2016 06:08
@bewest Are you a fan of pictures of what "presents" the outdoor cat has deposited on the front porch steps?
Matt Pressnall
@logichammer
May 14 2016 06:10
@scottleibrand , last question of the night: MA is controlled by including meal.json as part of "enact/suggested.json"...what about AMA? Anyway to tell in the log when it is working...should I wake Ella up and give her some cookies to bolus for and see what happens? ONly joking on that last one.
Scott Leibrand
@scottleibrand
May 14 2016 06:16
You have to have some other stuff set up as well to get all the extra glucose and pump history...
Matt Pressnall
@logichammer
May 14 2016 06:17
That sounds like something for another night then...is there any place to find out what I need to add? I started with this:
So I am running your "loop"
Actually, the openaps says "ama enacted" so I have it magically, yes?
I love magic!
openaps pill says it I mean
Dana Lewis
@danamlewis
May 14 2016 06:23
:fireworks:
I'm going to bed but please let me know if I am wrong...I think I just magically have AMA working. If not, catch you later and hopefully I can figure it out.
Dana Lewis
@danamlewis
May 14 2016 06:26
:
Wait, is your rig named AMA?
Matt Pressnall
@logichammer
May 14 2016 06:27
shit
yes
Dana Lewis
@danamlewis
May 14 2016 06:27
I think that's what's reporting enacted
Sorry.
Matt Pressnall
@logichammer
May 14 2016 06:27
no worries...more to do but that's cool
night folks and thanks a ton!
Dana Lewis
@danamlewis
May 14 2016 06:27
I was going to say, it seems to require more work for ppl to switch up.
Night :)
Matt Pressnall
@logichammer
May 14 2016 06:28
ha!
seemed TOO easy
Scott Leibrand
@scottleibrand
May 14 2016 06:28
Your ama rig doesn't appear to be running AMA. Those meal assist percentages went away in AMA.
Matt Pressnall
@logichammer
May 14 2016 06:28
OK...need to tweak some stuff in openaps.ini I'm sure
Scott Leibrand
@scottleibrand
May 14 2016 06:28
You probably need to do the npm install stuff after switching to the AMA branch, and then fix all the stuff that breaks. ;-)
JaysonEwer
@JaysonEwer
May 14 2016 06:29
@scottleibrand @bewest I've made some progress. I re-ran the script and the loop started to work, however, I do have one permissions error:
pi@Ewer-Open-APS:~/Documents/openaps $ openaps report invoke monitor/iob.json 
calculate-iob://JSON/shell/monitor/iob.json
monitor/iob.json  raised  [Errno 13] Permission denied
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-report", line 82, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/home/pi/src/openaps/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/home/pi/src/openaps/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/home/pi/src/openaps/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/home/pi/src/openaps/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/home/pi/src/openaps/openaps/vendors/process.py", line 97, in main
    proc = subprocess.Popen(command, stdout=PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied
pi@Ewer-Open-APS:~/Documents/openaps $ ls -alhr monitor/
total 64K
-rw-r--r-- 1 pi pi   58 May 14 02:24 temp_basal.json
-rw-r--r-- 1 pi pi 2.6K May 14 02:25 pumphistory.json
-rw-r--r-- 1 pi pi  41K May 14 02:27 glucose.json
-rw-r--r-- 1 pi pi   21 May 14 02:24 clock.json
drwxr-xr-x 8 pi pi 4.0K May 13 13:29 ..
drwxr-xr-x 2 pi pi 4.0K May 14 02:25 .
pi@Ewer-Open-APS:~/Documents/openaps $
Matt Pressnall
@logichammer
May 14 2016 06:29
ok if I hit you (or who else can I ask) later with questions?
like next week, I think
Dana Lewis
@danamlewis
May 14 2016 06:30
Yep
Matt Pressnall
@logichammer
May 14 2016 06:30
new puppy tomorrow and then beat the bridge
are you guys going?
Dana Lewis
@danamlewis
May 14 2016 06:30
Warning though: we'll be on EU time week of 23rd through June 1 ;)
Matt Pressnall
@logichammer
May 14 2016 06:30
Ella and I are doing the 8K...have a team of like 40 I think
Dana Lewis
@danamlewis
May 14 2016 06:30
No, but that's awesome! :)
Matt Pressnall
@logichammer
May 14 2016 06:30
gotcha and that sound fun!
ok night for reals
JaysonEwer
@JaysonEwer
May 14 2016 06:31
@scottleibrand @bewest Does that mean I need to run that permissions fix again?
Scott Leibrand
@scottleibrand
May 14 2016 06:44
Not sure why it's giving you perms errors given the perms you pasted...
May be some other .git or temp file?
you could sudo chown pi.pi -R *...
JaysonEwer
@JaysonEwer
May 14 2016 06:54
how do I look for a temp file?
Scott Leibrand
@scottleibrand
May 14 2016 06:56
No idea, which is why I suggested changing ownership on everything in your homedir.
JaysonEwer
@JaysonEwer
May 14 2016 06:56
sorry, yes, I did that
Scott Leibrand
@scottleibrand
May 14 2016 07:02
Try running oref0-calculate-iob manually?
JaysonEwer
@JaysonEwer
May 14 2016 07:04
[report "monitor/iob.json"]
profile = settings/profile.json
use = shell
clock = monitor/clock.json
reporter = JSON
json_default = True
pumphistory = monitor/pumphistory.json
device = calculate-iob
remainder =
Does the above look correct?
I don't see an oref0-calcuate-iob. Is that a report that I need to generate?
Scott Leibrand
@scottleibrand
May 14 2016 07:09
No, it's just a command. Type it.
And give it the same arguments your report has.
JaysonEwer
@JaysonEwer
May 14 2016 07:10
pi@Ewer-Open-APS:~/Documents/openaps $ oref0-calculate-iob
-bash: oref0-calculate-iob: command not found
pi@Ewer-Open-APS:~/Documents/openaps $
Scott Leibrand
@scottleibrand
May 14 2016 07:12
Not sure you have oref0 installed properly then.
Did you end up running quick-src?
JaysonEwer
@JaysonEwer
May 14 2016 07:13
so is this the type of stuff you were looking for when you asked for folks to install the new oref0 :-D
or is there something non-standard with my setup these days?
Scott Leibrand
@scottleibrand
May 14 2016 07:13
no, this is just screwy
JaysonEwer
@JaysonEwer
May 14 2016 07:13
:-(
Scott Leibrand
@scottleibrand
May 14 2016 07:13
type oref0- and then tab tab
JaysonEwer
@JaysonEwer
May 14 2016 07:14
I think I might have a frankenOPEN-APS.
Scott Leibrand
@scottleibrand
May 14 2016 07:14
see what you do have installed.
JaysonEwer
@JaysonEwer
May 14 2016 07:15
pi@Ewer-Open-APS:~/Documents/openaps $ oref0- 
auto-sense.ini             enact/                     model.json                 pumphistory.json
basal_profile.json         get-profile.ini            monitor/                   pump.ini
bg_targets.json            .git/                      ns-status.ini              pump_settings.json
calculate-iob.ini          glucose.json               ns-upload.ini              read_status.json
cd                         last_four_cgms_hours.json  openaps.ini                settings/
cgms.ini                   last_four_pump_hours.json  oref0.ini                  setuptools-21.0.0.zip
clock.json                 max_iob.json               oref0-mint-max-iob.sh      tz.ini
determine-basal.ini        minimed_rf/                pump-history.json          upload/
pi@Ewer-Open-APS:~/Documents/openaps $ oref0-
Scott Leibrand
@scottleibrand
May 14 2016 07:16
No space after the -
JaysonEwer
@JaysonEwer
May 14 2016 07:17
tab tab is not working
Scott Leibrand
@scottleibrand
May 14 2016 07:18
Then you don't have oref0 installed in your path at all. Need to reinstall it.
Try quick-src or quick-packages again?
JaysonEwer
@JaysonEwer
May 14 2016 07:19
can those be mixed?
Scott Leibrand
@scottleibrand
May 14 2016 07:19
not really. Go with whichever works at this point.
JaysonEwer
@JaysonEwer
May 14 2016 07:19
I'm wondering I think i may have started with packages a long time ago and then when I moved to dev, I ended up using src
Scott Leibrand
@scottleibrand
May 14 2016 07:19
The last one you run should control.
So it's fine to run them both.
JaysonEwer
@JaysonEwer
May 14 2016 07:19
do I need to do an uninstall?
ok
Scott Leibrand
@scottleibrand
May 14 2016 07:20
Nah
JaysonEwer
@JaysonEwer
May 14 2016 07:20
k
so this is what I should right, right:
```
sudo curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-src.sh | bash -
Scott Leibrand
@scottleibrand
May 14 2016 07:21
Is that what the docs say?
Nope
they say not to use sudo
JaysonEwer
@JaysonEwer
May 14 2016 07:24
ok, so when I ran it earlier in the day, after you asked us to help test it, I was getting errors that said something needed to be run as root
I have those messages saved if its helpful to look at them. so then I thought you said to run it as root
Scott Leibrand
@scottleibrand
May 14 2016 07:25
Yeah, was worth a try. Now that we fixed perms shouldn't have to.
JaysonEwer
@JaysonEwer
May 14 2016 07:26
ok
Scott Leibrand
@scottleibrand
May 14 2016 07:26
This is probably an artifact of doing something earlier with sudo that you shouldn't have.
JaysonEwer
@JaysonEwer
May 14 2016 07:26
yeah
Using /usr/local/lib/python2.7/dist-packages/smmap-0.9.0-py2.7.egg
Finished processing dependencies for openaps-contrib==0.0.6
fatal: destination path 'oref0' already exists and is not an empty directory.
Already up-to-date.
Scott Leibrand
@scottleibrand
May 14 2016 07:27
Almost wish we ran everything as root like yocto does.
JaysonEwer
@JaysonEwer
May 14 2016 07:27
The script hangs there.
Scott Leibrand
@scottleibrand
May 14 2016 07:27
There should be npm stuff happening next
takes a few minutes.
Will get a spinner before long.
JaysonEwer
@JaysonEwer
May 14 2016 07:28
it was hung there for a VERY long time, i eventually ctrl+C it and then it "finishes"
but i'm sure that's not correct.
Scott Leibrand
@scottleibrand
May 14 2016 07:29
What happens immediately after the Ctrl-C?
JaysonEwer
@JaysonEwer
May 14 2016 07:32
Using /usr/local/lib/python2.7/dist-packages/smmap-0.9.0-py2.7.egg
Finished processing dependencies for openaps-contrib==0.0.6
fatal: destination path 'oref0' already exists and is not an empty directory.
Already up-to-date.
^Cinstalled /etc/udev/rules.d/80-medtronic-carelink.rules
installed /etc/udev/rules.d/80-dexcom.rules
Installing bash completion script /etc/bash_completion.d/python-argcomplete.sh
openaps 0.1.1-dev
pi@Ewer-Open-APS:~/Documents/openaps $
JaysonEwer
@JaysonEwer
May 14 2016 07:37
it appears npm install is the step that is hanging
I'm monitoring top to see if npm is doing anything...It does appear at the top periodically, but it doesn't appear to be hung.
Scott Leibrand
@scottleibrand
May 14 2016 07:40
If it doesn't make any progress after 5-10m you might want to re-run it with more verbosity. Check -h or man pages for options.
What kind of Pi is this?
JaysonEwer
@JaysonEwer
May 14 2016 07:40
pi 2B+
Scott Leibrand
@scottleibrand
May 14 2016 07:40
k
JaysonEwer
@JaysonEwer
May 14 2016 07:41
all the other npm commands are preceeded with sudo, except for that first one. Does it also need sudo?
Scott Leibrand
@scottleibrand
May 14 2016 07:43
No, that is intentional.
But you can try the others and see if they do any better. They might be sufficient on their own...
at least until you update the repo and have to run them again to update the installed versions.
JaysonEwer
@JaysonEwer
May 14 2016 07:47
There we go, that's a little better:
pi@Ewer-Open-APS:~/Documents/openaps $ oref0-
oref0-calculate-iob       oref0-fix-git-corruption  oref0-meal                oref0-raw
oref0-detect-sensitivity  oref0-get-profile         oref0-mint-max-iob        oref0-reset-git
oref0-determine-basal     oref0-html                oref0-normalize-temps     oref0-reset-usb
oref0-find-insulin-uses   oref0-ifttt-notify        oref0-pebble              
pi@Ewer-Open-APS:~/Documents/openaps $ oref0-
I think it wasn't linked
let me see if the loop runs now
YAY!! :fireworks:
Thank you, @scottleibrand !!
Have a good night. I'm going to bed!
Scott Leibrand
@scottleibrand
May 14 2016 07:53
Sweet. Sleep well, with nice and flat BGs. :-)
JaysonEwer
@JaysonEwer
May 14 2016 07:54
@jaysonewer searches for flat emoji....
:zzz:
Scott Leibrand
@scottleibrand
May 14 2016 07:58
:arrow_right:
JaysonEwer
@JaysonEwer
May 14 2016 13:03
➖➖➖➖〰〰〰I found a couple good flat lines on my mobile.😀
C-Ville
@C-Ville
May 14 2016 13:05
@JaysonEwer this even shows slight oscillations in the feedback loop :-)
JaysonEwer
@JaysonEwer
May 14 2016 13:27
:-). Yep. I woke up to 80➡️ So that's good! :-). Thanks again @scottleibrand !
swainoe
@swainoe
May 14 2016 19:04
This message was deleted
JaysonEwer
@JaysonEwer
May 14 2016 20:36
@scottleibrand I ran the script again, I like the addition of the spinner prior to the npm updates. 👍
Scott Leibrand
@scottleibrand
May 14 2016 20:37
I didn't do that. It's an npm thing.
JaysonEwer
@JaysonEwer
May 14 2016 20:39
Oh, ok, so for some reason it just wasnt doing it last night for me.
Saskia
@Missdazzle
May 14 2016 21:21
@/all I just wanted to drop by and say hello (before I come out with all my questions…)! I´m a semi-old lady from Germany with my English gotten a little rusty but unbounded ambition to work my way through your excellent documentation. I definitely want to loop, too! (who wouldn´t though…) A few months ago I didn´t even have a CGM. But then I met this guy (you call him (n=1)*35) who has the deep urge to make everybody happy first with cgm and now with learning to do the loop. He talks about it all the time! But actually I´m very happy about meeting him because now my HbA1c is a whole lot better than it was before. And we do have so much fun in germanLOOP, too. At first I worked my way through the German gitbook to set up my NS. That was really something! But I was very proud when I made it. I don´t know very much about computers besides using it for shopping and communication ;) but I learned a lot. And as I´m the lucky one with the appropriate Medtronic pump I practically HAVE TO go on. At first when I took a glimpse at your documentation I thought it might as well be written in Chinese. But during the last days I made my way through adding and invoking reports and surprisingly it is a lot of fun!!! Well before this turns out being a book I´ll let you go now. Have a wonderful day! Chris
Matthias
@ceben80
May 14 2016 21:25
Welcome @Missdazzle
Saskia
@Missdazzle
May 14 2016 21:25
@ceben80 Hello stranger... ;)
Toby Canning
@TC2013
May 14 2016 22:02
@Missdazzle Welcome! It is great to have you join the community.
Dana Lewis
@danamlewis
May 14 2016 22:20
:) @Missdazzle nice to meet you!
Saskia
@Missdazzle
May 14 2016 22:24
Thanks! It´s late at night around here, so I´m going to get some sleep - maybe dreaming about aliases... Good night!
Matthias
@ceben80
May 14 2016 22:27
Night, my Loop is running :+1: starting with 95 into the night