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

10th
Feb 2016
Scott Leibrand
@scottleibrand
Feb 10 2016 00:00
longer DIA will cause it to "wait and see" longer, up to a point. eventually you could trigger a shorter-frequency oscillation if it gets too long, I suspect. haven't observed that though.
ISF is probably the better thing to tune, if DIA doesn't look obviously wrong, as higher ISF will always cause the OpenAPS to react more conservatively, running fewer / less extreme high temps and low temps both
where we saw the strongest "limit-cycle oscillations" was when IOB was completely broken (like from the y2k16 bug) and we were just responding to BG overnight without any knowledge of previous temps. it still kept BG in range, so better than turning the system off, but it cycled between like 90 and 140 all night.
JaysonEwer
@JaysonEwer
Feb 10 2016 00:11
The other thing I have noticed is I'm on Lisinopril for my Blood pressure, if I stop taking my Lisinopril, I need more insulin, if I take Lisinopril I need less. I stopped taking it for a while and back in Nov my Dr recommended that I start it back up. I did, but I attribute some of the lows to that. I just need to keep an eye on it and adjust accordingly. :-/
Scott Leibrand
@scottleibrand
Feb 10 2016 00:12
I wonder if openaps/oref0#58 would help with that
JaysonEwer
@JaysonEwer
Feb 10 2016 00:25
Awesome, I just read that thread, looks like it may be able to help. I'm not sure if you remember my discussion about how sometimes my Blood sugar level will drop drastically and then bounce right back up. I hope that isn't adrenaline, doing that. I've heard of diabetics killing their adrenal glands due to too much improper insulin use. Forcing the body into a fight or flight mode and kicking in the adrenaline to survive.
Dragan Maksimovic
@dm61
Feb 10 2016 00:52
Good points about ISF tuning - I've been thinking about daytime and nighttime "modes" which could be done simply by adjusting aggressiveness of OpenAPS via ISF. I am also planning to raise the safety limits on max temp allowed (and on max-iob) - I have seen situations where a larger temp would clearly work better without increasing risks. Of course, I would not recommend this in general, especially not for kids - it's better to keep the ultra-safe limits. On that note, I can say that over the past month I haven't seen any lows that I could attribute to OpenAPS temps - I think OpenAPS could earn FDA approvals :smirk:
JaysonEwer
@JaysonEwer
Feb 10 2016 00:56
😎👍
Dana Lewis
@danamlewis
Feb 10 2016 01:01
:) @dm61
Toby Canning
@TC2013
Feb 10 2016 01:10
@scottleibrand Do you have Dana using openaps/oref0#58?
Dana Lewis
@danamlewis
Feb 10 2016 01:36
@TC2013 yes, I'm using
Toby Canning
@TC2013
Feb 10 2016 01:36
What do you think so far?
Dana Lewis
@danamlewis
Feb 10 2016 01:41
So far, not bad, needs some more work to tweak..but honestly so many confounding variables in the last two weeks (rigs multiplying like rabbits, changes to preflights to prevent them from stomping, etc., better range) it's hard to say how signficant a change overall. Seeing a few instances where I was running higher (not resistant, but 20 points over target) that it was setting granularly higher temps that seemed to help without resulting in a major drop later.
re: running & stuff, what's been working for me is temping before I go run (to reduce positive IOB, if any), and then I've been carrying the Edison/Rileylink that's done really well during the runs and after. I finally remembered to try changing my targets on my pump, so today switched from 105 to 135 and it did exceptionally well keeping me perfectly in range. where perfect = something like 110-120.
Dana Lewis
@danamlewis
Feb 10 2016 02:17
@TC2013 looking back, it also looks like #58 helped last night with a 10-20% sensitivity mode overnight last night (from running yesterday) and likely was what prevented me dropping below 80.
I thought before going to bed about putting on pattern A manually, so in retrospect, that was probably an ideal test run for it & sensitivity mode.
I imagine it’ll do the same tonight. Need an easier way to be able to see when it’s in play, though.
Toby Canning
@TC2013
Feb 10 2016 02:21
We are doing the manual adjustment by switching basal patterns right now. But I'm slow to switch because it takes me much longer to see a pattern than it would a computer.
I'll give it a try soon when work slows down and I can pay more attention
Dana Lewis
@danamlewis
Feb 10 2016 02:23
Yea. I'm super slow to accept when I'm resistant, so this seems to be helping in that regard (beating us humans)
:+1:
Clayton McCook
@cdmccook
Feb 10 2016 02:23
Hey all. Let me preference this by saying I am a total dilettante with very little background so huge apologies in advance and thank you for your patience. I just got our RPi2 and went through the setup this afternoon with no troubles whatsoever. Thank you so much for the excellent instructions. I'm at the point in Phase 0 where I am trying to install openaps following the instructions in the heading "Using the Package Manager." I have entered the correct command (curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash -) numerous times and taken care to do so correctly, but I keep getting error messages. The last two lines say "E: Unmet dependencies. Try 'apt-et -f install' with no packages (or specify a solution)," and the last line says "bash: line 13: openaps: command not found" Again, apologies for my lack of experience and thanks in advance for any help or guidance you can offer.
Scott Leibrand
@scottleibrand
Feb 10 2016 02:25
Might want to open up that script in a browser and start pasting things in one by one to see which is failing.
Clayton McCook
@cdmccook
Feb 10 2016 02:28
will do
Dana Lewis
@danamlewis
Feb 10 2016 03:30
does anyone know if the pediatric version of the g4 ever got approval for the 505 algorithm? Regardless, can anyone confirm what the MARD is on the pediatric receiver? Not finding good info...
Dana Lewis
@danamlewis
Feb 10 2016 03:41
wondering if @TC2013 , @sulkaharo , @jasoncalabrese, other parents know ^^
Jason Calabrese
@jasoncalabrese
Feb 10 2016 03:43
I dint think it did, probably because Dexcom didn't feel like it since the g5 was on the way
Jason Curry
@mccgm
Feb 10 2016 04:03
So...I have all my treatment upload aliases working correctly. I'm not sure if I should put them in my main loop or as a separate cron job. any suggestions?
Jason Calabrese
@jasoncalabrese
Feb 10 2016 04:06
I have the treatment upload in the main loop and status upload as a separate cron, but they could both be in the main loop
I have status upload outside so I can see the rig has network even if it can't talk to the pump
Jason Curry
@mccgm
Feb 10 2016 04:07
It seems like there could be a potential conflict if the times end up overlapping
Jason Calabrese
@jasoncalabrese
Feb 10 2016 04:07
The status upload doesn't need the pump, just uses existing files
Jim Matheson
@jmatheson
Feb 10 2016 04:19
@jasoncalabrese i was just looking at this as well. thinking about doing status upload at the start and end of the loop maybe?
my loop gets BG from NS, so if i have no network i am dead in the water anyway
Scott Leibrand
@scottleibrand
Feb 10 2016 04:30
if status upload is quick, that's a good idea
problem with running it on its own schedule is if you rm files before refreshing them
Jason Curry
@mccgm
Feb 10 2016 04:30
@jmatheson Same here
Scott Leibrand
@scottleibrand
Feb 10 2016 04:31
(then the status upload will fail if it runs during those refreshes)
Jason Curry
@mccgm
Feb 10 2016 04:31
Could run it dependent on a grep
Scott Leibrand
@scottleibrand
Feb 10 2016 04:33
yeah
Jim Matheson
@jmatheson
Feb 10 2016 04:35
i would love to know if loop is working and separately if the rig is online or not. in the end this is a hack to see if the rig is online I guess. should make a separate pill or pill setting that just pings server every so often to say it’s alive.
got my loop back online just in time to temp up so i dont have to correct :)
Toby Canning
@TC2013
Feb 10 2016 04:40
@danamlewis Dexcom never released a 505 update for the pediatric G4
I'm pretty sure MARD is 11 on it for adults, but worse for children
I personally don't think there is a physiological difference that causes the difference in MARD for children but perhaps poorer BG calibration technique and habits
I think the study I saw showed MARD at 13 for children
Dana Lewis
@danamlewis
Feb 10 2016 04:44
@TC2013 thanks - aligns with what I rememebr hearing for kids. Adult 505 yields 9% and a noticeable improvement. stinks that kids aren't getting it :( unless they get an adult receiver.
Toby Canning
@TC2013
Feb 10 2016 04:44
Yeah, we got the doc to prescribe the adult receiver
Jason Calabrese
@jasoncalabrese
Feb 10 2016 04:45
Status upload doesn't fail for missing files anymore
I thought it was all the same with the g5
Ali Mazaheri
@amazaheri
Feb 10 2016 04:51
same for G5 for sure
Sulka Haro
@sulkaharo
Feb 10 2016 05:06
Afaik the EU receivers are still old pre-505 algo
JaysonEwer
@JaysonEwer
Feb 10 2016 05:17
Does my G4 with share require the upgrade to 505 firmware? I upgraded my G4 without share to 505, but it looked like the G4 w/share was already newer firmware?
Aaron Michelson
@Aaybob
Feb 10 2016 05:18
@scottleibrand and @danamlewis I hear you. If it worked I might dedicate a big portion of my life to it. But it failed to work. I am still eager for a commercial product. I just have met with so much failure that I can't justify spending time on it. Maybe if I take a step back and not use the pump so I don't feel like I'm dying to keep it running. And leave it to professionals.
Jason Curry
@mccgm
Feb 10 2016 05:32
Suddenly, I'm getting lots of errors when I try to upload. Most of it is "Document Moved". Any clue what went wrong?
Dana Lewis
@danamlewis
Feb 10 2016 05:38
@JaysonEwer guess it depends on when you got your share? check the version number. if it's got 505 showing in it, you're fine
JaysonEwer
@JaysonEwer
Feb 10 2016 05:49
@danamlewis it says SW10586 on share and SW10505 on the older G4 that I just upgraded. It seems to me that the share is already newer than the older one?
Dana Lewis
@danamlewis
Feb 10 2016 05:54
Hm. My second share is the same (586) but i don't remember if we upgraded it or not
Scott Leibrand
@scottleibrand
Feb 10 2016 05:54
I think anything 505 or newer should be fine.
JaysonEwer
@JaysonEwer
Feb 10 2016 06:01
That's what I was thinking, Scott. I'm glad there's at least one other data point that matches mine out there. Thank you.
Ben West
@bewest
Feb 10 2016 06:04
alright, finally got scheduling features working on the daemon
just need the openaps-do stuff now to make it all work, one major feature to go
Jim Matheson
@jmatheson
Feb 10 2016 06:08
:+1: excited for you to :shipit:
Ben West
@bewest
Feb 10 2016 06:12
now we get to worry about memory leaks and things
Ben West
@bewest
Feb 10 2016 06:21
so far, the scheduler is accurate to within 100ms or so
eyim
@eyim
Feb 10 2016 06:29
@danamlewis http://www.dexcom.com/dexcom-g4-platinum-performance shows the before and after MARD 13% vs 9% Although doesn't say pediatric
Ben West
@bewest
Feb 10 2016 06:30
actually, it's much more precise, this is hitting target well within 10ms
Jason Calabrese
@jasoncalabrese
Feb 10 2016 06:32
what happens if there's a an overlapping schedule
will it wait?
Ben West
@bewest
Feb 10 2016 06:32
so far this is just about arranging for schedules to trigger at the right time
triggers/schedules are namespaced, so you can have several schedules running independently at the same time, all the events will trigger/fire
should actually test that
the input is stuff like openaps schedule add do-loop "every 5 minutes"
Dana Lewis
@danamlewis
Feb 10 2016 06:34
@eyim Thanks. They don't show Mard on their pediatric page, which is weird. Oh well. Got enough detail for what I needed.
Jason Calabrese
@jasoncalabrese
Feb 10 2016 06:35
Screen Shot 2016-02-09 at 10.30.18 PM.png
since not everyone is over on the mmeowlink room
showing the selected freq and best rssi
Dana Lewis
@danamlewis
Feb 10 2016 06:35
:+1:
Jason Calabrese
@jasoncalabrese
Feb 10 2016 06:36
anything I should add for the first pass?
eyim
@eyim
Feb 10 2016 06:40

@danamlewis I think this is the pediatric study. http://www.accessdata.fda.gov/cdrh_docs/pdf12/P120005S031b.pdf

I could have swore they got it approved but never released the software update for the G4 as they were pushing everyone instead onto the G5. I was about to spring the $500 for a new adult 505 receiver when I thought I read that pediatric got approved for it but they never released the software. But can't find the press release now

Jim Matheson
@jmatheson
Feb 10 2016 06:44
Has anyone seen this before? monitor/pump-history.json raised CRC does not match page data
eyim
@eyim
Feb 10 2016 06:45
Yes I have. I see it a lot when my multiple rigs step on each other
Not sure that is the cause though. Just my guess
Jim Matheson
@jmatheson
Feb 10 2016 06:45
hm. i only have one rig going.
Scott Leibrand
@scottleibrand
Feb 10 2016 06:45
yeah, CRC checks will fail if it gets a rig transmission at the same time as a pump transmission
but it can also occur with any sort of 900MHz noise
Jim Matheson
@jmatheson
Feb 10 2016 06:46
crap.
Scott Leibrand
@scottleibrand
Feb 10 2016 06:46
?
Jim Matheson
@jmatheson
Feb 10 2016 06:47
rig is sitting 6 inches from me, wondering if there is noise.
eyim
@eyim
Feb 10 2016 06:47
I think it happens when I have my loop running from a crontab and then manually kick off a loop myself as well
all from the same device
Jim Matheson
@jmatheson
Feb 10 2016 06:47
i have no loop going and am running a command by hand, so i dont think i am stepping on myself.
Ben West
@bewest
Feb 10 2016 06:47
this is with the carelink stick?
Jim Matheson
@jmatheson
Feb 10 2016 06:47
TI
it also said No handlers could be found for logger "mmeowlink.handlers.stick"
assume that’s unrelated though
Jim Matheson
@jmatheson
Feb 10 2016 06:59
seems like it is working again now. got some better logging of each step of my loop so will monitor. i’ve been having some spotty issues but was not sure exactly where the breakdown had been. Hopefully it’s not a radio issue.
Scott Leibrand
@scottleibrand
Feb 10 2016 07:00
handlers are not an issue: that warning is just a TODO for someone who wants to set them up. :)
Jim Matheson
@jmatheson
Feb 10 2016 07:02
yeah, realized that after i pasted it in here :) remember you told someone else the same thing at some point recently
Jason Calabrese
@jasoncalabrese
Feb 10 2016 07:04
I'm still getting empty enacted.json files
Scott Leibrand
@scottleibrand
Feb 10 2016 07:08
I got one too; not sure why
Jason Calabrese
@jasoncalabrese
Feb 10 2016 07:14
messing with my enact alias
Jason Calabrese
@jasoncalabrese
Feb 10 2016 07:32
I think it's something with the json -e
think I'm going to rip that out and set it to true in ns-status
Oskar Pearson
@oskarpearson
Feb 10 2016 07:42
I've created an issue for the 'No handlers could be found for logger' thing
Ben West
@bewest
Feb 10 2016 08:03
I tried solving it a few days ago but failed
the logic is there in the setup_medtronic_logging to replace all the handlers for the decocare log root
it sets up a handler for syslog and assigns decocare's log handler to that
hmm I did something in decocare to help I think not sure
I tried setting up mmeowlink but it didn't work, not sure but I think the vendors thing needs to get a child logger from the root logger
so logging.getLogger(__name__) maybe does the trick not sure
maybe something with getting root logger then getting child off of that
Oskar Pearson
@oskarpearson
Feb 10 2016 08:08
@bewest I could try changing everything to use whatever = logging.getLogger(decocare.__name__)
Ben West
@bewest
Feb 10 2016 08:08
oh
Oskar Pearson
@oskarpearson
Feb 10 2016 08:08
?
Ben West
@bewest
Feb 10 2016 08:08
hmm that's clever
hmm
not sure it's the right thing
but I think it will work and seems easy and no real downside
hmm
maybe get a root logger off that
Ben West
@bewest
Feb 10 2016 08:10
oh
actually
Oskar Pearson
@oskarpearson
Feb 10 2016 08:10
In the world of python, I'd super trust your code over mine ;)
Ben West
@bewest
Feb 10 2016 08:10
logging.getLogger(decocare.__name__).getChild(__name__)
add that to all you rmodules
err
there we go
use that to get the loggers in your modules
then it'll all get routed via decocare's logging
eg
shouldn't need to though
Oskar Pearson
@oskarpearson
Feb 10 2016 08:15
Thanks so much!
Jim Matheson
@jmatheson
Feb 10 2016 18:00
I have been having trouble losing ssh connection to my edison. It seems like the device is still connected to my wifi, but can’t seem to get in which forces me to reboot. i dont see anything obvious in the syslog. any ideas?
Matteo Neri
@francescaneri
Feb 10 2016 18:01
Hi to all, how do I check that the configuration of raspberry pi is correct to talk with NS see PLUG - IN Pump?
Jason Calabrese
@jasoncalabrese
Feb 10 2016 18:02
I had issues like that, I'm using a script @TC2013 found, https://github.com/TC2013/edison_wifi
with that wifi has been reliable, between home and hotspot
Jim Matheson
@jmatheson
Feb 10 2016 18:03
nice
my problem is i am just sitting at home and i am not seeing the edison bounce between the hotspot or anything.
Jason Calabrese
@jasoncalabrese
Feb 10 2016 18:05
I saw that too
would hook up a console cable, restart the network and it would be fine
had another cron that helped some, but this script is better
Jim Matheson
@jmatheson
Feb 10 2016 18:10
did you add two entries to your cron?
not sure I understand the second one
Jason Calabrese
@jasoncalabrese
Feb 10 2016 18:15
the 2nd 1 is to force a switch to home wifi
Jim Matheson
@jmatheson
Feb 10 2016 18:15
what does the shell script do
Jason Calabrese
@jasoncalabrese
Feb 10 2016 18:15
the wifi switch isn't so reliable
the script basically pings some remote site, you could use your NS site, google, etc
if it can't connect it restarts the network
Jim Matheson
@jmatheson
Feb 10 2016 18:16
i see
Jason Calabrese
@jasoncalabrese
Feb 10 2016 18:17
but has a lockfile and some other details that seem to work good
Jim Matheson
@jmatheson
Feb 10 2016 18:17
and then switches networks to home when needed
Jason Calabrese
@jasoncalabrese
Feb 10 2016 18:17
I'd start with just wifi.sh
and add the wifi switch after some testing
it was working great, but recently stopped for me
Jim Matheson
@jmatheson
Feb 10 2016 18:17
cool, will see how we go. and sounds like the second cron entry is what i can modify if i want to have multiple “home” networks to switch to over the hotspot
Jason Calabrese
@jasoncalabrese
Feb 10 2016 18:18
but I'm having issues with home wifi anyway
yeah, thats part of my issue, I have 2 home networks, but really should have an extender, but that stopped working
Jim Matheson
@jmatheson
Feb 10 2016 18:19
yeah, i have and extender too that i recently hooked back up. the edison was having trouble in the bedroom without it.
Jason Calabrese
@jasoncalabrese
Feb 10 2016 18:20
wifi range on the edison doesn't seem as good as the dongle on the pi
but with the script works fine
Jim Matheson
@jmatheson
Feb 10 2016 18:20
agree
ticking off issues. hopefully will be back up and running today. going on 12 hours loopless right now
Jason Calabrese
@jasoncalabrese
Feb 10 2016 18:21
damn, after the fixes last night we've been stable
thought I was going to have to send the pi to school today, really glad I didn't have to
Jim Matheson
@jmatheson
Feb 10 2016 18:23
i did not do a good job keeping the pi setup as a backup. should do that.
Jason Calabrese
@jasoncalabrese
Feb 10 2016 18:27
I have it under his bed still, with the crons commented out
Scott Leibrand
@scottleibrand
Feb 10 2016 18:30
do-network-stuff || ( sudo ifdown wlan0; sudo ifup wlan0 )in cron might be sufficient`
I've accumulated a bunch of stuff: not sure what helps most: || ( sudo ifdown wlan0; sudo ifup wlan0; ps aux | grep -v grep | grep -q "dhclient wlan0" && sudo killall dhclient; sudo dhclient wlan0 -r; sudo dhclient wlan0; killall -g --older-than 10m ssh )
Jason Calabrese
@jasoncalabrese
Feb 10 2016 18:31
the script above seems better, had something a lot like that
but killall -g --older-than 10m ssh might help me
a stuck tunnel today
eyim
@eyim
Feb 10 2016 18:33
I'm struggling with the wifi on the edison as well. Two days in a row it has cut out at school with no reason. Thanks for the tip on the script. I will try that
Scott Leibrand
@scottleibrand
Feb 10 2016 18:36
I think the dhclient stuff is now redundant with the ifdown/ifup stuff
Aaron Michelson
@Aaybob
Feb 10 2016 19:04
@scottleibrand and @danamlewis I'm doing better now. I stopped focusing too much on the project and cleaned the house. I added two lines to my crontab to kill openaps process longer than ten minutes and to refresh git repository. Dragon1 at tudiabetes had given me his crontab weeks ago and had explained it but I kept simplifying so as to understand what was programmed. And although I'm not seeing "basal" in NS I am using it to run my pebble watch which I had sorely missed after giving up my G5. And most importantly the system ran all night and I awoke with normal BG. A work friend said "if it aint broke don't fix it" or something like that. And I went online and am having delivered a clip designed to protect the RPi2 from loosing its micro card. Also looking at log files is fine but maybe you could send me the script Dana used to format them just as a starting point for me.
Dana Lewis
@danamlewis
Feb 10 2016 19:08
@Aaybob glad you’re doing better, and getting BGs on the watch is great!
I’m not sure what script you are talking about, formatting what? Can you clarify?
Aaron Michelson
@Aaybob
Feb 10 2016 19:08
And I may have wanted to contribute to "docs" but never got the git stuff clear enough to use it.
Dana Lewis
@danamlewis
Feb 10 2016 19:09
@Aaybob I use the github web interface to work with the docs. Doesn’t have to be done command line - it’s much easier on the web.
Aaron Michelson
@Aaybob
Feb 10 2016 19:12
Before you used NS basal function you looked at (its not easier enough for me) a line of unix that showed when and how much the basal changed...so there was one line with a dozen data points that you would look at in the morning. I think it says and shows example in your blog or story somewhere. There was a picture of it, a NS graph with a line of text below it.
eyim
@eyim
Feb 10 2016 19:12
Hmm ran https://github.com/TC2013/edison_wifi script and says no WiFi_Check.pid - I know the network is up because I am SSH into the edison via wifi. There is no pid file in the script. Is that okay or did I miss something?
./wifi.sh: line 61: ~/src/edison_wifi/WiFi_Check.pid: No such file or directory
Performing Network check for wlan0
Network connection down! Attempting reconnection.
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/fc:c2:de:34:41:21
Sending on   LPF/wlan0/fc:c2:de:34:41:21
Sending on   Socket/fallback
DHCPRELEASE on wlan0 to 172.17.2.254 port 67
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/fc:c2:de:34:41:21
Sending on   LPF/wlan0/fc:c2:de:34:41:21
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPOFFER from 172.17.2.254
DHCPACK from 172.17.2.254
bound to 172.17.2.45 -- renewal in 2939 seconds.

Current Setting:
          inet addr:172.17.2.45  Bcast:172.17.2.255  Mask:255.255.255.0

rm: cannot remove ‘~/src/edison_wifi/WiFi_Check.pid’: No such file or directory
Dana Lewis
@danamlewis
Feb 10 2016 19:15
Ohhhh. Gotcha @Aaybob . That’s something we have built into #DIYPS to show hourly net basal amounts that I want to build into Nightscout as a report. (It’s not a script that’s extractable from DIYPS.) I can explain the idea for anyone in more detail who wants to write it into Nightscout reports to make it available sooner. (It’s one of many many things on my long to-do list. )
Jim Matheson
@jmatheson
Feb 10 2016 19:15
good call @eyim. I am getting similar errors.
Dana Lewis
@danamlewis
Feb 10 2016 19:17
@Aaybob assuming you are talking about one of these: https://twitter.com/danamlewis/status/682626971285762048
Jim Matheson
@jmatheson
Feb 10 2016 19:22
it is looking for a pid in the edison_wifi directory, but there is not one there. @TC2013 what are we missing?
i dont have wpa_cli either
guess maybe we need to install that
Jim Matheson
@jmatheson
Feb 10 2016 19:27
or maybe it’s not running
Jason Calabrese
@jasoncalabrese
Feb 10 2016 19:28
maybe not passing it the remote host to look for?
Jim Matheson
@jmatheson
Feb 10 2016 19:29
i assume you should be able to run wpa_cli status
eyim
@eyim
Feb 10 2016 19:33
to pass it the remote host I was just doing this:
edison@alanedison2:~/src/edison_wifi$ sudo ./wifi.sh google.com
added google.com to the end. Is there some other way to do it?
Nyadach
@Nyadach
Feb 10 2016 19:36
anyone mind if I ask a daft noob question?
eyim
@eyim
Feb 10 2016 19:38
Go ahead. This is the place! :)
Nyadach
@Nyadach
Feb 10 2016 19:39
Keep getting this, but the directory is there as clock, and pumphistory invoked to the directly fine, but iob.json won't generate and comes back with this: openaps report invoke monitor/iob.json
monitor/iob.json raised [Errno 2] No such file or directory
even tried creating a empty iob.json in the directory, but won't generate one when invoked
Scott Leibrand
@scottleibrand
Feb 10 2016 19:40
Try running it manually.
oref0-calculate-iob
Nyadach
@Nyadach
Feb 10 2016 19:43
generates info ok
eyim
@eyim
Feb 10 2016 19:43
This message was deleted
Nyadach
@Nyadach
Feb 10 2016 19:44
{"iob":2.389081868,"activity":0.006138888888888889,"bolusiob":2/097256672}
Scott Leibrand
@scottleibrand
Feb 10 2016 19:45
It's helpful if you paste your commands and their output. You can put ``` (three backticks) on a separate line before and after the paste to get it to format nicely.
Nyadach
@Nyadach
Feb 10 2016 19:47
{"iob":2.389081868,"activity":0.006138888888888889,"bolusiob":2/097256672}
Jim Matheson
@jmatheson
Feb 10 2016 19:48
@eyim looking at the script it is just trying to delete the lockfile if it exists. but the fact that it does not exist is expected.
so not actually an error
Scott Leibrand
@scottleibrand
Feb 10 2016 19:48
@Nyadach are you really getting a / in the bolusiob?
but more relevant to this issue is what exactly the command line was you used to get that
eyim
@eyim
Feb 10 2016 19:49
@jmatheson Yep I agree but any idea what the lockfile is there for or how it gets generated?
Scott Leibrand
@scottleibrand
Feb 10 2016 19:49
and how your monitor/iob.json report is configured (whether it's passing the same arguments)
Jim Matheson
@jmatheson
Feb 10 2016 19:49
it looks like it creates it itself so that you dont accidentally run it twice
so the creation is failing too i guess
Nyadach
@Nyadach
Feb 10 2016 19:50
when I ran: oref0-calculate-iob monitor/pumphistory.json settings/profile.json monitor/clock.son {"iob":2.389081868,"activity":0.006138888888888889,"bolusiob":2/097256672} if that's what you mean or? another bolus iob?
the clock and pumphistory are writing ok to the directory
openaps report invoke monitor/iob.json monitor/iob.json raised [Errno 2] No such file or directory Traceback (most recent call last): File "/usr/local/openaps-report", line 4, in <module> _import_('pkg_resources' ).run script('openaps==0.0.9', 'openaps-report') File "build/bdist.linux.armv7l/egg/pkg_resources/__init__.py", line 724, in run_script File "build/bdist.linux.armv7l/egg/pkg_resources/__init__.py", line 1649, in run_script File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/ scripts/openaps-report", line 82, in <module> app( ) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/c li/__init__.py", line 44, in __call__ self.run(self.args) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/ scripts/openaps-report". line 75, in run File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/c li/subcommand.py", line 50, in __call__ return self.method.main(args, app) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/r eports/invoke.py", line 40, in main output = task.method(args, app) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/u ses/use.py", line 45, in __call__ output = task.method(args, app) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/v endors/process.py", line 81 in main 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 2] No such file or directory
Scott Leibrand
@scottleibrand
Feb 10 2016 19:52
"bolusiob":2/097256672 is invalid output
Jim Matheson
@jmatheson
Feb 10 2016 19:52
@eyim if i set lockfile='/home/edison/src/edison_wifi/WiFi_Check.pid'
then the error goes away
Scott Leibrand
@scottleibrand
Feb 10 2016 19:52
it should be "bolusiob":2.097256672 probably
Jim Matheson
@jmatheson
Feb 10 2016 19:53
not sure why, but the ~ to use home is not working
Scott Leibrand
@scottleibrand
Feb 10 2016 19:53
@jmatheson is it running in cron?
Nyadach
@Nyadach
Feb 10 2016 19:53
reran it, that was me pasting it wrong...warned on the noob part
Jim Matheson
@jmatheson
Feb 10 2016 19:53
it is, but we were trying to test from command line
Scott Leibrand
@scottleibrand
Feb 10 2016 19:53
@Nyadach k, thought that was cosmetic
next question is how your monitor/iob.json report is configured
and how the calculate-iob or similar device it uses is configured
@jmatheson huh, ~ usually works from CLI, but not cron. odd.
Nyadach
@Nyadach
Feb 10 2016 19:54
working down the setup guide so hopefully as it is in there
Jim Matheson
@jmatheson
Feb 10 2016 19:55
yeah, not sure what’s up with that.
Nyadach
@Nyadach
Feb 10 2016 19:55
@scottleibrand what would you like me to paste in for the configuration?
Scott Leibrand
@scottleibrand
Feb 10 2016 19:56
if you have the openaps report add and similar commands you used to create them in your history, that'd be easiest
eyim
@eyim
Feb 10 2016 19:56
@jmatheson Yep that seems to fix it. Maybe the ~/src is needed if running from cron
Jim Matheson
@jmatheson
Feb 10 2016 19:57
and i guess my wpa_cli status works if i sudo wpa_cli status
Scott Leibrand
@scottleibrand
Feb 10 2016 19:57
or we could use the new openaps report show monitor/iob.json --json stuff
Jim Matheson
@jmatheson
Feb 10 2016 19:57
hard code will for sure work both ways, it’s just hard coded wich is not optimal
assume it works without the sudo in cron, so all good
Jason Calabrese
@jasoncalabrese
Feb 10 2016 20:01
the ~ wouldn't work in the cron
I'm using an absolute path
also I have it in my root cron
sudo crontab -e
eyim
@eyim
Feb 10 2016 20:02
Does this script have to be run from root cron?
Guess it doesn't hurt to do that
Jason Calabrese
@jasoncalabrese
Feb 10 2016 20:14
I think you'd need sudo's without running it from the root cron
Nyadach
@Nyadach
Feb 10 2016 20:27
Not overly sure what you mean by the history, but hope pasting the openaps.ini file has them all in no?
[device "pump"]
vendor = openaps.vendors.medtronic
extra = pump.ini

[device "cgms"]
vendor = openaps.vendors.dexcom
extra = cgms.ini

[report "last_four_pump_hours.json"]
device = pump
hours = 4.0
use = iter_pump_hours
reporter = JSON

[alias]
last_four_hours = report invoke last_four_pump_hours.json last_four_cgms_hours.json
gather-profile = report invoke settings/settings.json settings/bt_targets.json settings/insulin_sensitivities.json settings/basal_profile.json settings/profile.json
monitor-pump = report invoke monitor/clock.json monitor/temp_basal.json monitor/pumphistory.json monitor/iob.json
monitor-cgm = report invoke monitor/glucose.json

[report "read_battery_status.json"]
device = pump
use = read_battery_status
reporter = JSON

[report "read_carb_ratios.json"]
device = pump
use = read_carb_ratios
reporter = JSON

[report "read_selected_basal_profile.json"]
device = pump
use = read_selected_basal_profile
reporter = JSON

[report "read_status"]
device = pump
use = read_status
reporter = JSON

[device "oref0"]
vendor = openaps.vendors.process
extra = oref0.ini

[device "get-profile"]
vendor = openaps.vendors.process
extra = get-profile.ini

[device "calculate-iob"]
vendor = openaps.vendors.process
extra = calculate-iob.ini

[device "determine-basal"]
vendor = openaps.vendors.process
extra = determine-basal.ini

[report "settings/settings.json"]
device = pump
use = read_settings
reporter = JSON

[report "settings/bg_targets.json"]
device = pump
use = read_bg_targets
reporter = JSON

[report "settings/insulin_sensitivities.json"]
device = pump
use = read_insulin_sensitivies
reporter = JSON

[report "settings/basal_profile.json"]
device = pump
use = read_basal_profile
reporter = JSON

[report "settings/profile.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 max_iob.json
device = get-profile
remainder = []
insulin_sensitivities = settings/insulin_sensitivities.json

[report "monitor/pumphistory.json"]
device = pump
hours = 4.0
use = iter_pump_hours
reporter = JSON

[report "monitor/clock.json"]
device = pump
use = read_clock
reporter = JSON

[report "monitor/iob.json"]
profile = settings/profile.json
use = shell
reporter = text
json_default = True
pumphistory = monitor/pumphistory.json
clockoref0 = monitor/clock.json
device = calculate-iob
remainder = []

[report "monitor/temp_basal.json"]
device = pump
use = read_temp_basal
reporter = JSON

[report "monitor/glucose.json"]
device = cgms
count = 5
use = iter_glucose
reporter = JSON

[report "enact/suggested.json"]
profile = settings/profile.json
use = shell
temp_basal = monitor/temp_basal.json
reporter = text
json_default = True
device = determine-basal
And the noob forgot the space !
Eric
@ecc1
Feb 10 2016 20:36
I think @scottleibrand meant your shell history. Just type "history" and it will show your previous commands; useful for cutting and pasting into scripts or re-executing.
Nyadach
@Nyadach
Feb 10 2016 20:38
pi@raspberrypi:~ $ history 1 sudo raspi-config 2 sudo bash 3 wpa_passphrase "nPancreas" "d4N42010aps" >> /etc/wpa_supplicant/wpa_supplicant.conf 4 sudo bash 5 raspi-config 6 sudo raspi-config 7 reboot 8 sudo apt-get update && sudo apt-get -y upgrade 9 reboot 10 sudo bash 11 wpa_passphrase "nPancreas" "d4N42010aps" >> /etc/wpa_supplicant/wpa_supplicant.conf 12 sudo bash wpa_passphrase "nPancreas" "d4N42010aps" >> /etc/wpa_supplicant/wpa_supplicant.conf 13 sudo bash 14 cd /path/to/sd/card/etc/network/interfaces 15 cd /etc/network/interfaces 16 sudo bash 17 ifconfig 18 sudo nano /etc/network/interfaces 19 sudo nano etc/wpa_supplicant/wpa_supplicant.conf 20 reboot 21 lfconfig 22 sudo lfconfig 23 sudo lsconfig 24 lsconfig 25 sudo bash 26 lsconfig 27 isconfig 28 /sbin/ifconfig 29 lsb_release -a 30 sudo raspi-config 31 sudo bash -c 'echo "options 8192cu rtw_power_mgnt=0 rtw_enusbss=0" >> /etc/modprobe.d/8192cu.conf 32 reboot 33 sudo bash -c 'echo "options 8192cu rtw_power_mgnt=0 rtw_enusbss=0" >> /etc/modprobe.d/8192cu.conf 34 sudo bash -c 'echo "options 8192cu rtw_power_mgnt=0 rtw_enusbss=0" >> /etc/modprobe.d/8192cu.conf 35 sudo bash -c 'echo "options 8192cu rtw_power_mgnt=0 rtw_enusbss=0" >> /etc/modprobe.d/8192cu.conf 36 sudo bash -c 'echo "options 8192cu rtw_power_mgnt=0 rtw_enusbss=0" >> /etc/modprobe.d/8192cu.conf 37 sudo bash -c 'echo "options 8192cu rtw_power_mgnt=0 rtw_enusbss=0" >> 38 /etc/modprobe.d/8192cu.conf' 39 sudo bash -c 'echo "options 8192cu rtw_power_mgnt=0 rtw_enusbss=0" >> /etc/modprobe.d/8192cu.conf' 40 sudo nano /etc/modprobe.d/8192cu.conf 41 sudo modprobe bcm2708_wdog 42 sudo bash -c 'echo "bcm2708_wdog" >> /etc/modules' 43 sudo apt-get install watchdog 44 sudo update-rc.d watchdog defaults 45 sudo nano /etc/watchdog.conf 46 sudo service watchdog start 47 sudo apt-get update && sudo apt-get -y upgrade 48 curl -s https://raw.hithubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - 49 curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - 50 sudo apt-get install python python-dev python-setuptools python-software-properties python-numpy python-pip nodejs-legacy npm 51 sudo easy_install -ZU setuptools sudo easy_install -ZU openaps 52 sudo apt-get install python python-dev python-setuptools python-software-properties python-numpy python-pip nodejs-legacy npm 53 sudo easy_install -ZU setuptools sudo easy_install -ZU openaps 54 sudo openaps-install-udev-rules 55 sudo activate-global-python-argcomplete 56 sudo easy_install -ZU setuptools sudo easy_install -ZU openaps 57 curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - 58 npm update -g yo 59 npm update -y update 60 sudo apt-get npm 61 sudo apt-get install npm 62 sudo apt-get install json 63 curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - 64 sudo apt-get install git 65 sudo activate-global-python-argcomplete 66 git config --global user.email "allan@nyadach.com" 67 git config --global user.name "Allan" 68 su curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - 69 sudo curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - 70 sudo -s curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - 71 sudo npm cache clean -f 72 sudo npm install -g n 73 sudo n stable 74 sudo n 75 node -v 76 sudo -s curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - 77 sudo apt-get update && sudo apt-get -y upgrade 78 ls
75 node -v 76 sudo -s curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - 77 sudo apt-get update && sudo apt-get -y upgrade 78 ls 79 setuptools-19.6.2.zip 80 extract setuptools-19.6.2.zip 81 sudo extract setuptools-19.6.2.zip 82 cd 83 openaps init my_openaps 84 ls 85 cd my_openaps 86 ls 87 cat openaps.ini 88 openaps device add pump medtronic 366491 89 openaps device add cgms dexcom 90 ls 91 cat openaps.ini 92 cat pump.ini 93 openaps use pump model 94 openaps use pump -h 95 openaps use cgms inter_glucose 1 96 openaps use cgms iter_glucose 1 97 ls 98 openaps report add last_four_hours.json JSON pump iter_pump_hours 4 99 openaps report remove last_four_hours.json 100 openaps report add last_four_pump_hours.json JSON pump iter_pump_hours 4 101 ls 102 openaps report remove iter_glucose_hours 4 103 openaps use cgms iter_glucose_hours 4 104 openaps remove last_four_pump_hours.json JSON pump iter_pump_hours 4 105 openaps remove last_four_pump_hours.json 106 openaps remove last_four_cgms_hours.json 107 cat openaps.ini 108 ls 109 openaps remove last_four_cgms_hours.json 110 openaps report remove last_four_cgms_hours.json 111 cat openaps.ini 112 openaps report invole last_four_pump_hours 113 openaps report invole last_four_pump_hours.json 114 openaps report invoke last_four_pump_hours.json 115 ls 116 ls -l 117 openaps report add last_four_cgms_hours.json JSON cgms iter_glucose 4 118 openaps report invoke last_four_cgms_hours.json 119 sudo nano last_four_cgms_hours.json 120 sudo nano openaps.ini 121 openaps report invoke last_four_cgms_hours.json 122 openaps use cgms -h 123 sudo nano openaps.ini 124 openaps report invoke last_four_cgms_hours.json 125 sudo nano last_four_cgms_hours.json 126 openaps report invoke last_four_cgms_hours.json 127 sudo nano last_four_cgms_hours.json 128 ls -l 129 openaps alias add last_four_hours "report invoke last_four_pump_hours.json last_four_cgms_hours.json" 130 openaps last_four_hours 131 sudo nano openaps.ini 132 sudo nano pump.ini 133 openaps last_four_hours 134 ls -l 135 openaps alias show 136 sudo shutdown 137 ls 138 cd my_openaps 139 ls 140 sudo shutdown 141 ls 142 cd my_openaps 143 ls 144 openaps last_four_hours 145 openaps use pump -h 146 openaps use cgms -h 147 openaps last_four_hours 148 openaps report add read_clock.json <pump> read_clock 149 openaps report add read_clock.json pump read_clock 150 openaps report add read_clock.json <pump> read_clock
Ben West
@bewest
Feb 10 2016 20:40
ah
last few report add have some problems
Nyadach
@Nyadach
Feb 10 2016 20:40
151 openaps report add read_clock.json JSON <pump> read_clock 152 openaps report add read_clock.json JSON pump read_clock 153 sudo nano read_clock.json 154 openaps report invoke read_clock 155 sudo nano openaps.ini 156 openaps report invoke read_clock 157 openaps use cgms -h 158 openaps use pump -h 159 openaps use pump read_clock 160 openaps report invoke read_clock.json 161 sudo nano read_clock.json 162 openaps report add read_battery_status.json JSON pump read_battery_status 163 openaps report invoke read_battery_status.json 164 openaps report add read_settings.json JSON pump read_settings 165 openaps report invoke read_settings.json 166 openaps report add read_carb_ratios.json JSON pump read_carb_ratios 167 openaps report invoke read_carb_ratios.json 168 openaps report add read_selected_basal_profile.json JSON pump read_selected_basal_profile 169 openaps report invoke read_selected_basal_profile.json 170 openaps report add read_insulin_sensitivities.json JSON pump read_insulin_sensitivities 171 openaps report invoke read_insulin_sensitivities.json 172 openaps report add read_bg_targets.json JSON pump read_bg_targets 173 openaps report invoke read_bg_targets.json 174 openaps report add read_status.json JSON pump read_status 175 openaps report invoke read_status.json 176 openaps report add read_basal_profile_A.json JSON pump read_basal_profile_A 177 openaps report add read_basal_profile_B.json JSON pump read_basal_profile_B 178 openaps report add read_basal_profile_std.json JSON pump read_basal_profile_std 179 openaps report invoke read_basal_profile_A.json 180 openaps report invoke read_basal_profile_B.json 181 openaps report invoke read_basal_profile_std.json 182 openaps report invoke read_basal_profile_B.json 183 openaps use pump read_clock 184 openaps use pump read_basal_profile_std 185 openaps use pump read_basal_profile_A 186 openaps use pump read_basal_profile_a 187 openaps use pump read_basal_profile_B 188 sudo nano openaps.ini 189 openaps device add oref0 process oref0 190 openaps device add get-profile process --require "settings bg_targets insulin_sensitivities basal_profile max_iob" oref0 get-profile 191 openaps device ass calculate-iob process --require "pumphistory profile clock"oref0 calculate-iob 192 openaps device add calculate-iob process --require "pumphistory profile clock"oref0 calculate-iob 193 openaps device add determine-basal process --require "iob temp_basal glucose profile" oref0 determine-basal 194 mkdir -p settings monitor enact 195 ls 196 openaps report add settings/settings.json JSON pump read_settings 197 openaps report add settings/bg_targets.json JSON pump read_bg_targets 198 openaps report add settings/insulin_sensitivities.json JSON pump read_insulin_sensitivities 199 openaps report add settings/basal_profile.json JSON pump read_basal_profile_std 200 openaps use oref0-mint-max-iob 201 cd settings 202 ls 203 sudo nano /my_openaps/settings/max_iob.json 204 ls 205 cd.. 206 cd .. 207 ls 208 openaps report invoke pump read_settings 209 openaps report invoke read_settings 210 openaps report invoke read_settings.json 211 openaps report invoke settings/read_settings.json 212 openaps report invoke settings/read_bg_targetsjson 213 sudo nano openaps.ini 214 openaps report invoke settings/settings.json 215 openaps report invoke settings/bg_targets.json 216 openaps report invoke settings/insulin_sensitivities.json 217 openaps report invoke settings/basal_profile.json 218 openaps report add settings/profile.json text get-profile shell settings/settings.json settings/bg_target.json settings/insulin_sensitivities.json settings/basal_profile.json max_iob.json 219 openaps report invoke settings/.json
220 openaps alias add gather-profile "report invoke settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json settings/profile.json" 221 openaps gather-profile 222 sudo nano openaps.ini 223 openaps gather-profile 224 openaps report add monitor/pumphistory.json JSON pump inter_pump_history_hours 4 225 openaps report add monitor/pumphistory.json JSON pump iter_pump_history_hours 4 226 openaps report add monitor/pumphistory.json JSON pump iter_pump_hours 4 227 openaps report add monitor/clock.json JSON pump read_clock 228 openaps report add monitor/iob.json JSON calculate-iob shell monitor/pumphistory.json settings/profile.json monitor/clock.json 229 openaps report invoke monitor/pumphistory.json 230 openaps report invoke monitor/clock.json 231 sudo nano openaps.ini 232 openaps report invoke monitor/clock.json 233 openaps report invoke monitor/pumphistory.json 234 openaps report invoke calculate-iob 235 openaps report invoke monitor/iob.json 236 openaps report invoke 237 openaps report invoke monitor/iob.json 238 la 239 ls 240 cd monitor 241 ls 242 cd .. 243 openaps report invoke calculate-iob 244 openaps report invoke monitor/iob.json 245 cd monitor 246 ls 247 sudo nano iob.json 248 ls 249 cd .. 250 openaps report invoke monitor/iob.json 251 shutdown 252 sudo 253 .. 254 cd .. 255 shutdown 256 sudo root 257 sudo shutdown 258 ls 259 cd pi 260 ls 261 cd my_openaps 262 ls 263 openaps report invoke monitor/iob.json 264 openaps report invoke settings/settings.json 265 openaps report invoke settings/read_bg_targets.json 266 openaps report invoke settings/settings.json 267 openaps report invoke settings/bg_targets.json 268 openaps report invoke settings/insulin_sensitivities.json 269 openaps report invoke settings/basal_profile.json 270 openaps report invoke settings/profile.json 271 sudo nano max_iob.json 272 cd settings 273 ls 274 sudo nano max_iob.json 275 cd ..
Ben West
@bewest
Feb 10 2016 20:41
openaps report show --json read_clock.json
Nyadach
@Nyadach
Feb 10 2016 20:41
276 sudo nano max_iob.json 277 openaps report invoke settings/profile.json 278 openaps gather-profile 279 openaps gather 280 openaps report add monitor/pumphistory.json JSON pump iter_pump_hours 4 281 openaps report invoke monitor/pumphistory.json 282 openaps report invoke monitor/clock.json 283 sudo nano openaps.ini 284 openaps report invoke calculate-iob 285 sudo nano openaps.ini 286 openaps report invoke monitor/iob.json 287 ls 288 cd monitor 289 ls 290 openaps report invoke monitor/pumphistory.json 291 cd .. 292 openaps report invoke monitor/pumphistory.json 293 openaps report invoke monitor/iob.json 294 sudo nano openaps.ini 295 openaps report add monitor/iob.json JSON calculate-iob shell monitor/pumphistory.json settings/profile.json monitor/clock.json 296 sudo nano openaps.ini 297 openaps report invoke monitor/iob.json 298 ls 299 cd monitor 300 cd .. 301 openaps report invoke monitor/iob.json 302 openaps report add monitor/temp_basal.json JSON pump read_temp_basal 303 openaps report invoke monitor/temp_basal.json 304 openaps report add monitor/glucose.json JSON cgms iter_glucose 5 305 openaps report invoke monitor/glucose.json 306 openaps report add enact/suggested.json text determine-basal shell monitor/iob.json monitor/temp_basal.json monitor/glucose.json settings/profile.json 307 openaps report invoke enact/suggested.json 308 openaps alias add monitor-pump "report invoke monitor/clock.json monitor/temp_basal.json monitor/pumphistory.json monitor/iob.json" 309 openaps alais add monitor-cgm "report invoke monitor/glucose.json" 310 openaps alias add monitor-cgm "report invoke monitor/glucose.json" 311 openaps monitor-cgm 312 openaps monitor-pump 313 openaps report show 314 openaps alias show 315 openaps determine-basal 316 openaps report invoke enact/suggested.json 317 openaps report invoke monitor/iob.json 318 openaps report invoke monitor/clock 319 openaps report invoke monitor/clock.json 320 openaps report invoke monitor/pumphistory.json 321 sudo nano monitor/pumphistory.json 322 sudo nano monitor/clock.json 323 sudo nano enact/suggested.json 324 sudo nano monitor/iob.json 325 openaps report invoke settings/profile.json 326 sudo nano settings/profile.json 327 openaps report invoke monitor/iob.json 328 sudo nano openaps.ini 329 openaps report invoke monitor/iob.json 330 sudo shutdown 331 pi 332 ls 333 sudo shutdown 334 raspi-config 335 sudo raspi-config 336 sudo shutdown 337 sudo reboot 338 sudo shutdown 339 sudo reboot 340 sudo shutdown 341 cd my_openaps 342 openaps report invoke monitor/iob.json 343 oref0-calculate-iob 344 oref0-calculate-iob monitor/pumphistory.json settings/profile.json monitor/clock.json 345 openaps report invoke monitor/iob.json 346 oref0-calculate-iob monitor/pumphistory.json settings/profile.json monitor/clock.json 347 sudo nano openaps.ini 348 sudo history 349 cd .. 350 history
that goes crazy
Ben West
@bewest
Feb 10 2016 20:42
now that we've got copy/paste working, for longer blobs, let's use https://gist.github.com/ or http://dpaste.com/ and share the link
the --json show thing goes crazy?
Nyadach
@Nyadach
Feb 10 2016 20:42
yeah
on read_clock
Ben West
@bewest
Feb 10 2016 20:43
I bet
does openaps report show work?
Ben West
@bewest
Feb 10 2016 20:44
nice
I'll explain what happened here, you typed this earlieropenaps report add read_clock.json <pump> read_clock
there's a problem there
so that report is broken
openaps report show will try to print one line for each report
not sure it will work
the syntax for adding reports is similar to using the device
Nyadach
@Nyadach
Feb 10 2016 20:45
pi@raspberrypi:~/my_openaps $ openaps report show --json read_clock.json usage: openaps-report show [-h] [{enact/suggested.json,last_four_cgms_hours.json,last_four_pump_hours.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory.json,monitor/temp_basal.json,read_battery_status.json,read_carb_ratios.json,read_selected_basal_profile.json,read_status.json,settings/basal_profile.json,settings/bg_targets.json,settings/insulin_sensitivities.json,settings/profile.json,settings/settings.json,*}] openaps-report show: error: argument report: invalid choice: 'read_clock.json' (choose from u'enact/suggested.json', u'last_four_cgms_hours.json', u'last_four_pump_hours.json', u'monitor/clock.json', u'monitor/glucose.json', u'monitor/iob.json', u'monitor/pumphistory.json', u'monitor/temp_basal.json', u'read_battery_status.json', u'read_carb_ratios.json', u'read_selected_basal_profile.json', u'read_status.json', u'settings/basal_profile.json', u'settings/bg_targets.json', u'settings/insulin_sensitivities.json', u'settings/profile.json', u'settings/settings.json', '*') pi@raspberrypi:~/my_openaps $ openaps report show pump://JSON/iter_pump_hours/last_four_pump_hours.json cgms://JSON/iter_glucose_hours/last_four_cgms_hours.json pump://JSON/read_battery_status/read_battery_status.json pump://JSON/read_carb_ratios/read_carb_ratios.json pump://JSON/read_selected_basal_profile/read_selected_basal_profile.json pump://JSON/read_status/read_status.json pump://JSON/read_settings/settings/settings.json pump://JSON/read_bg_targets/settings/bg_targets.json pump://JSON/read_insulin_sensitivities/settings/insulin_sensitivities.json pump://JSON/read_basal_profile_std/settings/basal_profile.json get-profile://text/shell/settings/profile.json pump://JSON/iter_pump_hours/monitor/pumphistory.json pump://JSON/read_clock/monitor/clock.json calculate-iob://JSON/shell/monitor/iob.json pump://JSON/read_temp_basal/monitor/temp_basal.json cgms://JSON/iter_glucose/monitor/glucose.json determine-basal://text/shell/enact/suggested.json
Ben West
@bewest
Feb 10 2016 20:45
have you played around with openaps use to see how the report commands are built on top of them?
ah great
Nyadach
@Nyadach
Feb 10 2016 20:46
had a play with it
Ben West
@bewest
Feb 10 2016 20:46
ah ok
great
so let's look at what happened
basically that report doesn't exist
those others do
this is what you typed earlier openaps report add read_clock.json <pump> read_clock
the report never got added
let's look at why
Nyadach
@Nyadach
Feb 10 2016 20:47
brackets kept on?
Ben West
@bewest
Feb 10 2016 20:47
the first thing to know about all this is that the use commands came first, and then the report commands basically are identical, to but allow you to assign a filename to the results
and we call that a report
so let's try using openaps use to emulate what happened
yeah, it's the brackets if that's what you call them
angle bracket I guess
so we can practice with the pump like this openaps use pump -h
that shows us the menu of all the use commands
so we can practice with openaps use pump read_clock
in a few seconds, maybe up to 30, it should print the pump's time
so openaps use commands just dump it all out on the screen
Nyadach
@Nyadach
Feb 10 2016 20:49
it's thinking about it, and there we go
Ben West
@bewest
Feb 10 2016 20:49
so for automation, we want to save those steps
enter openaps report add
openaps report add $name $format ...
Nyadach
@Nyadach
Feb 10 2016 20:49
won't I need to delete my messed up one? or is it completely missing?
Ben West
@bewest
Feb 10 2016 20:50
so the report add command adds two things, it changes the beginning
nah, it never happened
Nyadach
@Nyadach
Feb 10 2016 20:50
ah ok
Ben West
@bewest
Feb 10 2016 20:50
so notice openaps use pump read_clock
everything after use is the same as the ... earlier
we need to add the format, which is JSON
and the new filename to save the contents
but other wise once you have a working use command, you can copy/paste the same exact command to the end of report addd
Nyadach
@Nyadach
Feb 10 2016 20:51
openaps report add read_clock.json JSON pump read_clock
Ben West
@bewest
Feb 10 2016 20:51
so if you want to save that in read_clock.json filename
bingo
now
you can show that report
you can invoke it with other reports
by name, instead of by the longer use specification
that "configuration" of that use is all saved now
so you can invoke the report to pull the data into openaps
into oref0, etc
you can try again for fun to see what happens:
openaps report add broken-report.json <pump> read_clock
there's no harm in doing this
here's what happens on my machine:
$ openaps report add broken-report.json <pump> JSON read_clock
bash: pump: No such file or directory
bewest@bewest-MacBookPro:~/Documents/openaps$
Nyadach
@Nyadach
Feb 10 2016 20:53
had me worried a second, came back with an error, ran it a 2nd time and it worked
Ben West
@bewest
Feb 10 2016 20:53
the angle brackets mean it's an invalid command, actually
so nothing is saved/run
Nyadach
@Nyadach
Feb 10 2016 20:53
do the errors, are they comm errors with the carelink and pump or something?
Ben West
@bewest
Feb 10 2016 20:54
like that one?
adding reports doesn't do any communication
it's just saving your use for later
Nyadach
@Nyadach
Feb 10 2016 20:54
i got one just now, but ran report a 2nd time and it was fine
Ben West
@bewest
Feb 10 2016 20:54
in order to run that same use, you have to invoke it
so basically, the relationship goes like this: openaps use <use-spec> openaps report add $name $format <use-spec> where use-spec is exactly the same
Nyadach
@Nyadach
Feb 10 2016 20:56
ok
so this is making a read_clock.json file, in the base my_openaps directory? have another report invoking one as monitor/read_clock.json also?
Ben West
@bewest
Feb 10 2016 21:02
so two things
with openaps use it just dumps data to the screen
so we are manually configuring how to use the device from the commandline and not specifying what to do with the output
so use takes your manual configuration from the command line AND performs the main task with the device
the report interface splits this into two steps
step 1.) save configuration with a name for later use
that's the report add step
it takes the same configuration and saves it so it will run the same exact way later
2.) invoke then uses that configuration to perform the main task with the device, and saves it in the configured location
you can make as many of these as you like
so it's possible to have lots of reports that do variety of things
then eventually we run all of them in sequence to accomplish the loop
Ben West
@bewest
Feb 10 2016 21:07
you might not need two reports that both read_clock.json
Nyadach
@Nyadach
Feb 10 2016 21:08
so with my error of my invoke report not generating a json file, due to the permission issue etc, I could just cut and paste in the result from oref0-calculate-iob monitor/pumphistory.json settings/profile.json monitor/clock.json to get around the error?
Ben West
@bewest
Feb 10 2016 21:09
well, we're practicing to automate the thing right?
so we should resolve the error
Nyadach
@Nyadach
Feb 10 2016 21:09
sorry, jumping ahead
Ben West
@bewest
Feb 10 2016 21:10
sounds like you've moved onto several new errors
oh, the iob report?
well let's see how it's configured
openaps report show monitor/iob.json --json | json
openaps device show calculate-iob --json | json
Nyadach
@Nyadach
Feb 10 2016 21:15
both giving openaps-device: errpr: unrecognized arguments: --json ok but for the report which is openaps-report
error not errqr!
Ben West
@bewest
Feb 10 2016 21:16
hmm update openaps for the enhanced show commands: sudo easy_install -ZU openaps
Nyadach
@Nyadach
Feb 10 2016 21:18
0.0.10 now?
Ben West
@bewest
Feb 10 2016 21:19
yup, great, run the show commands again
Nyadach
@Nyadach
Feb 10 2016 21:20
pi@raspberrypi:~/my_openaps $ openaps report show monitor/iob.json --json | json { "type": "report", "name": "monitor/iob.json", "monitor/iob.json": { "profile": "settings/profile.json", "use": "shell", "reporter": "JSON", "json_default": "True", "pumphistory": "monitor/pumphistory.json", "clockoref0": "monitor/clock.json", "device": "calculate-iob", "remainder": "[]" } } pi@raspberrypi:~/my_openaps $ openaps device show calculate-iob --json | json { "type": "device", "calculate-iob": { "vendor": "openaps.vendors.process", "extra": "calculate-iob.ini" }, "name": "calculate-iob", "extra": { "fields": "pumphistory profile clockoref0", "cmd": "calculate-iob", "args": "" } } pi@raspberrypi:~/my_openaps $
Ben West
@bewest
Feb 10 2016 21:21
great
did you say you had oref0-calculate-iob ... working outside of openaps?
what was that command again
we'll test the use inside openaps vs the raw command outside of openaps
Nyadach
@Nyadach
Feb 10 2016 21:22
oref0-calculate-iob monitor/pumphistory.json settings/profile.json monitor/clock.json
Ben West
@bewest
Feb 10 2016 21:22
great
that one works
?
so we can try the openaps version
Nyadach
@Nyadach
Feb 10 2016 21:22
yeah
Ben West
@bewest
Feb 10 2016 21:22
name of device is calculate-iob
so let's look at openaps use -h again, we should see calculate-iob in there
let's ask it for help too
openaps use calculate-iob -h
we see it has a "shell" keyword, so let's add that and then the rest of the parameters you had with the "raw" version
so openaps use calculate-iob shell ... all same commands
Nyadach
@Nyadach
Feb 10 2016 21:23
yep
Ben West
@bewest
Feb 10 2016 21:23
openaps use calculate-iob shell monitor/pumphistory.json settings/profile.json monitor/clock.json
with any luck that should work as well
so now we can examine difference between way report is configured and the way we just ran it
Nyadach
@Nyadach
Feb 10 2016 21:24
fails again
pi@raspberrypi:~/my_openaps $ openaps use calculate-iob shell monitor/pumphistory.json settings/profile.json monitor/clock.json Traceback (most recent call last): File "/usr/local/bin/openaps-use", line 4, in <module> __import__('pkg_resources').run_script('openaps==0.0.10', 'openaps-use') File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 724, in run_script File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1649, in run_script File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module> app( ) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/cli/__init__.py", line 44, in __call__ self.run(self.args) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run output = app(args, self) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__ return self.method.selected(args)(args, app) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__ return self.method(args, app) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/uses/use.py", line 45, in __call__ output = self.main(args, app) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/vendors/process.py", line 87, 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 2] No such file or directory
Ben West
@bewest
Feb 10 2016 21:27
right
Nyadach
@Nyadach
Feb 10 2016 21:27
can invoke each of the seperate elements though, monitor/pumphistory.json settings/profile.json and monitor/clock.json
Ben West
@bewest
Feb 10 2016 21:27
This message was deleted
$ cat <<EOF | json device use pumphistory profile clockoref0 | xargs echo openaps use
{ "profile": "settings/profile.json", "use": "shell", "reporter": "JSON", "json_default": "True", "pumphistory": "monitor/pumphistory.json", "clockoref0": "monitor/clock.json", "device": "calculate-iob", "remainder": "[]" }
EOF

openaps use calculate-iob shell monitor/pumphistory.json settings/profile.json monitor/clock.json
Nyadach
@Nyadach
Feb 10 2016 21:35
now returns openaps use calculate-iob usage: openaps-use calculate-iob [-h] USAGE ... openaps-use calculate-iob: error: too few arguments
Ben West
@bewest
Feb 10 2016 21:36
are you running a loop right now that is deleting your files?
let's test what's going on the with files
ls -alh monitor/pumphistory.json settings/profile.json monitor/clock.json
cat monitor/pumphistory.json settings/profile.json monitor/clock.json
if oref0-calculate-iob monitor/pumphistory.json settings/profile.json monitor/clock.json works but openaps use calculate-iob shell monitor/pumphistory.json settings/profile.json monitor/clock.json does not, there's something with the device itself
let's see openaps device show --ini calculate-iob
Nyadach
@Nyadach
Feb 10 2016 21:39
pi@raspberrypi:~/my_openaps $ ls -alh monitor/pumphistory.json settings/profile.json monitor/clock.json -rw-r--r-- 1 pi pi 21 Feb 10 18:33 monitor/clock.json -rw-r--r-- 1 pi pi 3.5K Feb 10 18:33 monitor/pumphistory.json -rw-r--r-- 1 pi pi 132 Feb 10 18:33 settings/profile.json
`cat monitor/pumphistory.json settings/profile.json monitor/clock.json returned an immense file
Ben West
@bewest
Feb 10 2016 21:40
nice
no errors hopefully
let's see the ini :-)
openaps device show --ini calculate-iob
Nyadach
@Nyadach
Feb 10 2016 21:40
pi@raspberrypi:~/my_openaps $ openaps device show --ini calculate-iob [device "calculate-iob"] vendor = openaps.vendors.process extra = calculate-iob.ini fields = pumphistory profile clockoref0 cmd = calculate-iob
Ben West
@bewest
Feb 10 2016 21:41
aha
AHA!
eureka
ok
the cmd is oref0-calculate-iob
so
Nyadach
@Nyadach
Feb 10 2016 21:42
so it's just that cmd line?
Ben West
@bewest
Feb 10 2016 21:43
openaps device show calculate-iob --json | json -e "this.extra.cmd = 'oref0-calculate-iob'" | openaps import
that will edit and save the cmd in the configuration
Nyadach
@Nyadach
Feb 10 2016 21:46
pi@raspberrypi:~/my_openaps $ openaps device show --ini calculate-iob [device "calculate-iob"] vendor = openaps.vendors.process extra = calculate-iob.ini fields = pumphistory profile clockoref0 cmd = oref0-calculate-iob args =
Ben West
@bewest
Feb 10 2016 21:46
try using it again
btw, for the multiple line fanciness, you found the tick mark, there have to be three in a row on their own line above and below both sets of three ticks
Nyadach
@Nyadach
Feb 10 2016 21:48
pi@raspberrypi:~/my_openaps $ openaps use calculate-iob shell monitor/pumphistory.json settings/profile.json monitor/clock.json { "bolusiob": 2.097256672, "iob": 2.389081868, "activity": 0.006138888888888889
Ben West
@bewest
Feb 10 2016 21:48
nice
bingo
now the report should work too
reason report didn't work is because it was trying exact same use
we verified via a tool that the use is exactly the same
but the cmd on the device had an issue, preventing the use from working at all
you can put them all in the same invoke line
openaps report invoke report1.json report2.json report3.json
as many as you like
so to get all your raw data, there's bunch of pump/cgm reports?
can group them together into one long invoke
Nyadach
@Nyadach
Feb 10 2016 21:51
pi@raspberrypi:~/my_openaps $ openaps report invoke monitor/iob.json calculate-iob://JSON/shell/monitor/iob.json Traceback (most recent call last): File "/usr/local/bin/openaps-report", line 4, in <module> __import__('pkg_resources').run_script('openaps==0.0.10', 'openaps-report') File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 724, in run_script File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1649, in run_script File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module> app( ) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/cli/__init__.py", line 44, in __call__ self.run(self.args) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/EGG-INFO/scripts/openaps-report", line 75, in run output = app(args, self) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/cli/subcommand.py", line 52, in __call__ return self.method.main(args, app) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/reports/invoke.py", line 48, in main reporters.Reporter(report, device, task)(output) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/reports/reporters/__init__.py", line 18, in __init__ self.output = getattr(self.method, 'get_output_stream', default_prep_stream)(self) File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.10-py2.7.egg/openaps/reports/reporters/__init__.py", line 5, in default_prep_stream return open(reporter.report.name, 'w') IOError: [Errno 13] Permission denied: u'monitor/iob.json'
Ben West
@bewest
Feb 10 2016 21:51
ah, no worries
sudo chown -R pi ./
Nyadach
@Nyadach
Feb 10 2016 21:52
was thinking we had it then!
Ben West
@bewest
Feb 10 2016 21:52
from now on, don't mix sudo with openaps commands
openaps is designed to run as normal user permission
only need sudo for sysadmin/installing things
Nyadach
@Nyadach
Feb 10 2016 21:52
chown isn't doing anything?
Ben West
@bewest
Feb 10 2016 21:53
it did
Nyadach
@Nyadach
Feb 10 2016 21:53
ah ok
Ben West
@bewest
Feb 10 2016 21:53
try the invoke again
Nyadach
@Nyadach
Feb 10 2016 21:53
beautiful!
data in the file
Ben West
@bewest
Feb 10 2016 21:54
:sparkles:
so real quick while you're learning how openaps commands work
I think you got how uses allow us to do things
then report adds a layer on top to group/save them
there's one more layer that builds on top of that again, the same exact way
Nyadach
@Nyadach
Feb 10 2016 21:55
alias?
Ben West
@bewest
Feb 10 2016 21:55
yes
so usually I like to group the reports
so maybe report invoke model.json monitor/pump-history-raw.json monitor/clock-raw.json monitor/bg-targets-raw.json monitor/glucose-raw.json
so once I've got that group, I might want to save another shorter name to refer to it again
without typing the whole thing in a script or all over again
enter alias
openaps alias -h, openaps alias add -h, openaps alias show -h
they all kind of work same way, alias is a little extra on top
Nyadach
@Nyadach
Feb 10 2016 21:58
Ben, you are a star! Thanks loads! Been banging my head on that the last couple of days.
Ben West
@bewest
Feb 10 2016 21:59
openaps alias add fetch-raw-data "report invoke model.json monitor/pump-history-raw.json monitor/clock-raw.json monitor/bg-targets-raw.json monitor/glucose-raw.json"
Nyadach
@Nyadach
Feb 10 2016 21:59
and as ever, a daft typo on the oref bit
Ben West
@bewest
Feb 10 2016 21:59
this enforces same kind of relationship as uses -> reports
it saves the fact that we want to report invoke a whole bunch of stuff as the name fetch-raw-data
Nyadach
@Nyadach
Feb 10 2016 21:59
with a nice quicker command
Ben West
@bewest
Feb 10 2016 21:59
the new command is: openaps fetch-raw-data
Nyadach
@Nyadach
Feb 10 2016 22:00
openaps fetch-raw-data
Ben West
@bewest
Feb 10 2016 22:00
correct
yup
that's all the basics, there's one more advanced thing but you won't need it upfront quite yet
the extra twist with alias is that the command can start with a bang !
if it does, it's special, and you can run any tool, not just openaps report things
so two ways to bring random outside tools inside openaps: devices + aliases
Nyadach
@Nyadach
Feb 10 2016 22:01
so in theory a heart rate meter?
Ben West
@bewest
Feb 10 2016 22:01
there are a few special things like the preflight checks and other things where we take advantage of this advanced technique quite heavily, but you've now covered all the features
exactly
well
I'm working on a slightly different way to do that
a third way
yeah, tell all your friends how openaps works now that you've got a handle on it :-)
Nyadach
@Nyadach
Feb 10 2016 22:03
will do!
I see in screenshots a lot of people are using some kind of front end on the phone to view data etc? is that just the normal nightscout app? its a tad clunky currenty using console on the phone etc so that just views what's going on a bit easier?
Ben West
@bewest
Feb 10 2016 22:04
well, there are a bunch of tools/devices/uses to get data into NS
and NS is really really good at showing what's happening
Dana Lewis
@danamlewis
Feb 10 2016 22:04
@Nyadach yes, NS app with basals enabled - highly recommend it for viewing loop status/activity, although noted that this is a work in progress for getting it turned on, the docs aren’t quite there yet.
Ben West
@bewest
Feb 10 2016 22:05
setting it up is more challenging than setting up the basal dosing itself, unfortunately
Nyadach
@Nyadach
Feb 10 2016 22:05
thanks @danamlewis :)
Ben West
@bewest
Feb 10 2016 22:05
tons of reports and special ! alias logic
Dana Lewis
@danamlewis
Feb 10 2016 22:05
:+1:
Ben West
@bewest
Feb 10 2016 22:05
first step is actually separating all the -raw data from the cleaner/massaged data
you might noticed above, I put -raw everything
Nyadach
@Nyadach
Feb 10 2016 22:05
so stick to a command line for the moment as a beginning then move to that later maybe?
Ben West
@bewest
Feb 10 2016 22:06
there is a tz ( a timezone) device which fixes timezone info on the data
there's also a units device which standardizes santizies all the units
there's also half dozen scripts to reformat the data nicely
Dana Lewis
@danamlewis
Feb 10 2016 22:06
@Nyadach we’re actually reorganizing the docs to make the overall process easier, and will recommend setting up NS view first through that process, because having access to what the system doing is critical.
Ben West
@bewest
Feb 10 2016 22:07
yeah, we're all focused on making that easier
Dana Lewis
@danamlewis
Feb 10 2016 22:07
but if you’re willing to look consistently at the command line - or put the data on a watch face, that’s fine. (My concern would be people who aren’t looking at the logs or any kind of visualization regularly to see what the system is doing)
Ben West
@bewest
Feb 10 2016 22:08
well good news is you use the commandline to set it all up
Nyadach
@Nyadach
Feb 10 2016 22:08
loving the work so far, it's great...am more tinkering with the hardware but love what you've all done
Ben West
@bewest
Feb 10 2016 22:08
Nightscout needs your Nightscout "profile", your real-time glucose, and treatments from your pump
the profile is one-time, first-time install, or whenever your basals and other settings change
you don't have to tackle it all at once
Nyadach
@Nyadach
Feb 10 2016 22:09
put it can't use it even though openaps has already acquired it? It can't take it off openaps, it has to take it itself from the pump etc?
Ben West
@bewest
Feb 10 2016 22:10
ah, sorry
so openaps has "devices" which take data from pump, transform it for NS, and then upload it into NS
there's also a script to try to dedupe the data before sending it to NS
so openaps is taking it from pump and putting it in NS
you have all the tools already, just a matter of setting up the reports and aliases
it's all turtles all the way down
Nyadach
@Nyadach
Feb 10 2016 22:11
same with the dexcom? thought I read that needed to be connected to NS itself? or was that earlier on?
Ben West
@bewest
Feb 10 2016 22:11
yeah, again it's just a matter of configuring the reports/devices to do what you want
Dana Lewis
@danamlewis
Feb 10 2016 22:11
:turtle:
Ben West
@bewest
Feb 10 2016 22:12
the ns-upload tool can upload any data you want to NS
mm-format-ns-{profile,glucose,pump-history,treatments} tools all prepare a kind of data from medtronic format into NS
Nyadach
@Nyadach
Feb 10 2016 22:12
think I need a new phone that'll run it first though, which is the snag on that one
Dana Lewis
@danamlewis
Feb 10 2016 22:12
@Nyadach NS has a web display, too
Ben West
@bewest
Feb 10 2016 22:12
you don't need extra phone to upload glucose from openaps to NS
Nyadach
@Nyadach
Feb 10 2016 22:13
was meaning a phone that would run the NS app
Ben West
@bewest
Feb 10 2016 22:13
you can use openaps as uploader instead of android phone
NS app is just a webapp
afaik, there's not a mobile app that does not use the webapp
Scott Leibrand
@scottleibrand
Feb 10 2016 22:14
there are a few for nightscout, but not that display any openaps stuff
Nyadach
@Nyadach
Feb 10 2016 22:14
had a look on store and claims to not be compatible etc, think it insists it needs a phone with usb-otg, guess could by pass that though and force an install
Scott Leibrand
@scottleibrand
Feb 10 2016 22:14
they just display BG info
Dana Lewis
@danamlewis
Feb 10 2016 22:15
@Nyadach what CGM do you have?
Nyadach
@Nyadach
Feb 10 2016 22:15
g4
Dana Lewis
@danamlewis
Feb 10 2016 22:15
with share?
Nyadach
@Nyadach
Feb 10 2016 22:15
nope
Ben West
@bewest
Feb 10 2016 22:16
the phone solution is when people use a cable with the G4 on the phone to upload data to webapp
you're going to use openaps instead of phone
Dana Lewis
@danamlewis
Feb 10 2016 22:16
ah, k. So for mobile upload, yes, you would need a way to upload your data to the cloud. Can be phone, OR, you can plug it into your Pi & upload from there by hotspotting your Pi.
Nyadach
@Nyadach
Feb 10 2016 22:16
and using the phones aps, the g4 downloads to aps, and it sends on up to NS?
Ben West
@bewest
Feb 10 2016 22:16
the app that runs on the uploader phone just sends data to webapp, it doesn't show much
Nyadach
@Nyadach
Feb 10 2016 22:17
phones access point even
Ben West
@bewest
Feb 10 2016 22:17
yeah, have it join to your hotspot or use a usb modem
Nyadach
@Nyadach
Feb 10 2016 22:18
set to use the phone or home access point, that was nice and early in the setup thanks :)
Ben West
@bewest
Feb 10 2016 22:18
if you use uploader phone to put data into NS, you would have to re-organize your openaps reports to get glucose data from NS instead of the G4 receiver
Nyadach
@Nyadach
Feb 10 2016 22:20
think I prefer that openaps is the central point really, never know with phone signals and lack of internet in places, so if it not depending on having access to NS all the better
Ben West
@bewest
Feb 10 2016 22:21
yeah, will make it more reliable
congrats, I think you leveled up several times :-)
Nyadach
@Nyadach
Feb 10 2016 22:23
when it comes to dealing with mmol instead of mg/dl, there is a conversion command? that can be added say to the alias' to run together with the glucose reports?
cheers, still feeling very noob down here though :)
Dana Lewis
@danamlewis
Feb 10 2016 22:24
:) :arrow_double_up:
^ @bewest that should be your level up arrow :)
Ben West
@bewest
Feb 10 2016 22:25
sort of
I'd like to introduce a script/uses that handle it better
for now, please consider doing -raw.json extension on initial reports
then using the units device
Nyadach
@Nyadach
Feb 10 2016 22:26
finding just switching pump setting worked easiest so far :P
Ben West
@bewest
Feb 10 2016 22:26
it's safe to always run the units conversion
we should always do -raw.json then run the cleaning tools
almost all reports require some kind of massaging, we're still enumerating all the ways it needs to be fixed
Nyadach
@Nyadach
Feb 10 2016 22:27
sounds a safer way to handle things
Ben West
@bewest
Feb 10 2016 22:27
I forget if it's built in or you have to add it as vendor
Nyadach
@Nyadach
Feb 10 2016 22:27
and that sounds a huge task!
Ben West
@bewest
Feb 10 2016 22:27
well, that's why we are where we are today
openaps was designed with the knowledge we don't exactly know exactly all the things an AP needs to do
so it makes no attempt to be opinionated on that matter, instead, it focuses on making everything look and feel the same way
so you can swap medtronic/dexcom if you want, etc
Nyadach
@Nyadach
Feb 10 2016 22:29
am happy it works with my ancient old pump! doc keep muttering he wants it swapping, got a reason not to again
Ben West
@bewest
Feb 10 2016 22:30
absolutely
part of this is I'm hoping to change expectations on a really wide basis
it should be unacceptable to buy a pump you don't have control over
Nyadach
@Nyadach
Feb 10 2016 22:31
they are heavily pushing us onto the 640G, but ok it has some nice things, but most of it is cosmetic and locking it down further
Thank you greatly for all the help Ben, have a good night. Best go get some sleep. Have a good one all and thank you for the amazing help and chat :)
Dana Lewis
@danamlewis
Feb 10 2016 22:36
@bewest you’re the best at walking people through add reports, use, invoke, etc. wish we had a good way to bottle (record?) that...
Ben West
@bewest
Feb 10 2016 22:37
hehe
I think at first it seems like obscure magic
so people are just entering commands
there's something about flipping between use and report, need a few more tools to make it more obvious
but once it's clear that reports are literally built on top of use
and you can use the one to debug the other, things start to click I think
Dana Lewis
@danamlewis
Feb 10 2016 22:39
yea. people do the best as they work through it with real-time feedback..but not really scalable :( . so wondering what we can do to record a session like this to make it feel more fluid than the docs? or different ways to describe this in the docs?
Ben West
@bewest
Feb 10 2016 22:39
yeah, I think we need few different docs
Dana Lewis
@danamlewis
Feb 10 2016 22:39
not sure if you’ve gone back to look at the docs with fresh eyes lately
Ben West
@bewest
Feb 10 2016 22:39
walkthrough is different from tutorial, etc
which is different from actual manual, etc
Dana Lewis
@danamlewis
Feb 10 2016 22:39
yea
Ben West
@bewest
Feb 10 2016 22:39
need all those things for people to find mix that works for them
there's no one true way
I flip through examples, manuals, tutorials, as much as I can when learning things
they all offer slightly different views
sometimes it's the mechanics of what are these commands doing?
sometimes it's what is the syntax?
sometimes it's what's the next set of logical steps
they all happen at same time, but at different intensities, and require different style doc to explain
dunno if you saw the dtsec stuff
that's more technical manual/design specs
but yet another view (for system designers, regulators, etc)
Dana Lewis
@danamlewis
Feb 10 2016 22:42
ya
Jason Calabrese
@jasoncalabrese
Feb 10 2016 22:42
setting expectations is a big part of it I think, no one should expect to get everything setup over 1 weekend, takes time to let it sink in, process in the background
Ben West
@bewest
Feb 10 2016 22:42
other thing I often do is reproduce errors on purpose
Dana Lewis
@danamlewis
Feb 10 2016 22:43
@jasoncalabrese that was a big part of my new doc outline…including recommended time frames for each steps, and a total ballpark estimate of what it would take to work through each segment
Ben West
@bewest
Feb 10 2016 22:43
so people can observe contrast directly between what's working, what doesn't and how/why
Dana Lewis
@danamlewis
Feb 10 2016 22:43
Not sure if you’ve had a chance to give it a look yet or not: https://github.com/openaps/docs/commit/8ac49f7b0516f145befd8c893b2eb5fb66677f23#commit
Jason Calabrese
@jasoncalabrese
Feb 10 2016 22:43
yeah, there shouldn't be extra stress of getting it done right away
Dana Lewis
@danamlewis
Feb 10 2016 22:44
:+1:
Ben West
@bewest
Feb 10 2016 22:44
looks good, still trying to organize thoughts on needs for these different views
Jason Calabrese
@jasoncalabrese
Feb 10 2016 22:45
the steps make sense, when there's a lot of docs I usually skip it till I get something basic working
maybe we should try to have an early success
a hello world report or something
Dana Lewis
@danamlewis
Feb 10 2016 22:45
yea
Ben West
@bewest
Feb 10 2016 22:45
this is kind of a walkthrough
Jason Calabrese
@jasoncalabrese
Feb 10 2016 22:45
before messing with devices
Dana Lewis
@danamlewis
Feb 10 2016 22:46
that’s the point with this, is break it into chunks with steps you succeed at before going to the next. like setting up NS, or the good suggestion yesterday of learning to PR yourself into the docs
Ben West
@bewest
Feb 10 2016 22:46
yeah
yeah, it's good
thinking about tutorial as separate thing
like tutorial on openaps, how it works, what the commands are doing
Dana Lewis
@danamlewis
Feb 10 2016 22:46
so each of those sections has those “at this stage you should have accomplished x”, but if you have more ideas for more wins to add in at the early stages, please comment them in
Ben West
@bewest
Feb 10 2016 22:46
things you can do with openaps without medical devices, things you can with medical devices that are just for fun/practice
dunno
then separately, what do we do about tech, manuals
no need to shove it all into one spaghetti giant doc
but every repo is yet another thing to maintain, also
Dana Lewis
@danamlewis
Feb 10 2016 22:48
yea. was thinking about this new flow/process, and about some of your good walk/through materials being maybe more in depth as part of the toolkit docs?
yep
Ben West
@bewest
Feb 10 2016 22:50
yeah, some of my readmes have things that are kind of like tutorials/examples on the mechanics
which is very different from "we want to weave all these things together in this process"
but I think we can make a lot of simpler pretty quickly with a few tools
eg, oref0-regenerate-standard-reports pump cgm
just needs name of pump and cgm devices
spit out json for all the -raw.json and normalized reports
give it to openaps import
think I'd like to line it up with your plyhases here actual
dunno, maybe one generate-foo for each phase
just to take care of all the boilerplate with zoning/unit conversions
generate ns-upload loop very easily that way
I'm always stuck between writing a doc and making it easier with code :$
Dana Lewis
@danamlewis
Feb 10 2016 22:58
:)
Jason Calabrese
@jasoncalabrese
Feb 10 2016 22:58
code to write docs?
Stephan
@MosiGitHub
Feb 10 2016 23:17
I am really looking forward to the next couple days when I have to make all the steps ... hopefully I am not stucking every step, but I will try my best ;-)
Dana Lewis
@danamlewis
Feb 10 2016 23:17
:) Please ask questions if you get stuck! welcome to the process @MosiGitHub !
Stephan
@MosiGitHub
Feb 10 2016 23:18
thx, expecting to get the edison and a 522 tomorrow - but this is only borrowed :-(