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

19th
Mar 2016
KJSATSTORR
@KJSATSTORR
Mar 19 2016 00:44
Does Nightscout work on older Dexcom g5 recievers?
Eric Luhrs
@eluhrs
Mar 19 2016 00:48
Older? I think G5 receivers have only been around since September. I have one and it works with NS. Had to use the bridge method.
Ben West
@bewest
Mar 19 2016 01:17
$ openaps trigger -h
usage: openaps-trigger [-h] {add,show,remove,emit,until} ...

 openaps-triggers - manage triggers

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

## Trigger management:
   triggers - manage triggers and triggers 

  {add,show,remove,emit,until}
                        Operation
    add                 add - add a managed Trigger
    show                show - show all trigger
    remove              remove - remove a trigger
    emit                emit - emit a trigger's events
    until               until - wait until a trigger emits events
bewest@bewest-MacBookPro:~/Documents/foobar$

r$ openaps trigger until --seconds 2 ping
({},)
starting background, waiting for  2.0
Failed to find event within 2.0
bewest@bewest-MacBookPro:~/Documents/foobar$
example:
bewest@bewest-MacBookPro:~/Documents/foobar$ openaps alias show ping
ping ! echo PING
bewest@bewest-MacBookPro:~/Documents/foobar$ openaps alias show pong
pong ! echo PONG
bewest@bewest-MacBookPro:~/Documents/foobar$
bewest@bewest-MacBookPro:~/Documents/foobar$ openaps trigger show --ini
[trigger "DoPing"]
then = 


[trigger "ping"]
then = pong


bewest@
that's results from openaps trigger add DoPing
as well as openaps trigger add ping pong
Ben West
@bewest
Mar 19 2016 01:23
bewest@bewest-MacBookPro:~/Documents/foobar$ openaps trigger until ping
({},)
starting background, waiting for  None

[...]
then in another terminal (or in background or something)
openaps trigger emit ping
Jason Calabrese
@jasoncalabrese
Mar 19 2016 01:23
nice, like the until
Ben West
@bewest
Mar 19 2016 01:24
then the first one finishes with something like:
emitted Fire <oacids.triggers.until.WaitApp object at 0x7fa1e0b96a90>
event <GMainLoop at 0x2a87680>
bewest@bewest-MacBookPro:~/Documents/foobar$
also, the daemon executes anything that matches the spec there
so in the daemon, I see PING and PONG when those events fire
it puts all of then on the Do queue
Brian Bonner
@itsn0tm3
Mar 19 2016 02:58
@jmatheson @MosiGitHub @jasoncalabrese Regarding the TI stick range, couldn't we contact TI and get an exchange for the stick if you can show that one range is much better than another one is?
Brian Bonner
@itsn0tm3
Mar 19 2016 06:30
well having 2 rigs within somewhat range of eachother pretty much cancelled out the other. They did not play nice ha
Scott Leibrand
@scottleibrand
Mar 19 2016 06:33
You need to sleep on failed preflight
and optionally after unexpected response on mmtune
Brian Bonner
@itsn0tm3
Mar 19 2016 06:34
oddly both mmtunes were fine
so meaning both were in range?
and how long should it sleep for? both are sleeping for 120
Scott Leibrand
@scottleibrand
Mar 19 2016 06:34
I have a modified mmtune that detects wrong packets and fails.
Brian Bonner
@itsn0tm3
Mar 19 2016 06:34
hmm
Brian Bonner
@itsn0tm3
Mar 19 2016 06:36
ah so it verifies that it has sole ownership of the connection by verifying the model?
Scott Leibrand
@scottleibrand
Mar 19 2016 06:37
With that and preflight fail 120s sleep I routinely run four rigs around the house, all on range of each other.
well, model is just a simple one-packet query and response
but if it hears another rig or the pump responds with something else, it shuts up
Brian Bonner
@itsn0tm3
Mar 19 2016 06:38
thats nice!
its almost 3am here so I think I'll sleep and plug that in the morning and get the rigs to stop throwing dirt at each other
one of them is on the other side of the apt that I don't sleep in so only really need 1 rig running at the moment
and that one is behaving ha
I think I need to start naming my rigs after animals and say that I've got quite the farm animal fight around here
thanks @scottleibrand!
Scott Leibrand
@scottleibrand
Mar 19 2016 06:40
Heh. Night!
Ben West
@bewest
Mar 19 2016 08:30
excited to run @scottleibrand through the oacids triggers features
openaps trigger $name emit and openaps trigger $name until do what we discussed :-D
I learned how to use pkg_resourcesproperly, so as long as oacids is installed (with the openaps exported branch), it uses python packaging's own advertisement features to import/export and do triggers + schedules plus a Do queue across the system (less config needed)
oacids, aka openaps-dbus needs to know --ini_home
which is basically directory of openaps.ini
I'm super excited about this, between the branches/new-repo there are probably dozen new features, several more pending usage notes
Ben West
@bewest
Mar 19 2016 08:35
one of the features this paves the way for is leveraging BLE to offer mobile app control over openaps
eg, a mobile app (ios/android) could pair to openaps and control it (eating soon mode/exercise/calendar/geo-location/force-temp-basal/etc)
Pete Schwamb
@ps2
Mar 19 2016 13:46
@scottleibrand the issue with running get model to check for interference is that the get model command itself can screw up another download it would be safer to just run a short get packet command.
Colin Lennon
@colinlennon
Mar 19 2016 13:59
I'm trying to set up my gather-profile alias, just found that when I invoke settings/profile.json, I get the message "BG Target data is expected to be expressed in mg/dL. Found mmol/L in settings/bg_targets.json".
My pump was set to mmol/L (I'm in the UK)
Is there a way to convert the data generated by bg_targets.json to mg/dL? Or will I need to set my pump to mg/dL?
Scott Leibrand
@scottleibrand
Mar 19 2016 15:42
Yes, openaps has a units tool.
@ps2 Would love to do that. You have an example I can start from?
Colin Lennon
@colinlennon
Mar 19 2016 16:43
Ah, thanks @scottleibrand , I'll have a look.
Dana Lewis
@danamlewis
Mar 19 2016 17:15
@bewest neat. @scottleibrand and I spent an hour last night talking through implementing modes for openAPS, etc. definitely want to sync up soon!
garykidd
@garykidd
Mar 19 2016 18:09
working towards first setup. what platform would you recommend...raspberry pi 2, 3, 0?
Dana Lewis
@danamlewis
Mar 19 2016 18:23
@garykidd welcome! We use a 2. Not sure we have enough people who have tested 3, have heard a complaint about heat and power consumption. 0 requires soldering so wouldn't start with that.
tazitoo
@tazitoo
Mar 19 2016 18:23
Any one would work - depends on your comfort level. 3 gives the possibility of using the bluetooth later on . 2 uses less power from what I understand. Zeros are currently in short supply and seem a bit overpriced now - but the Raspberry Pi Foundation will be restarting production on the zero soon, so prices will be back to "normal" if that happens.
garykidd
@garykidd
Mar 19 2016 18:25
is it worth considering setting up first time on an ltop---especially if just intending on controlled shorter duration experiments , initially. plus I cant stand waiting for delivery.
Dana Lewis
@danamlewis
Mar 19 2016 18:27
@garykidd no reason not to get started! Per Twitter, biggest Q for laptop would be range, but for mostly testing that's not an issue
It's a great learning setup.
garykidd
@garykidd
Mar 19 2016 18:32
I hve to start somewhere but I am very skeptical of range of that darn carelink stick. I know this should wait--but how hard would you say it is to setup a 'carelink' less arrangement?
Pete Schwamb
@ps2
Mar 19 2016 18:35
@scottleibrand To check noninvasively for other comms, you’d need to call this method: https://github.com/oskarpearson/mmeowlink/blob/master/mmeowlink/vendors/subg_rfspy_link.py#L99. For an example of using SubgRfspyLink outside of the full openaps stack, see https://github.com/oskarpearson/mmeowlink/blob/master/bin/mmtune.py
Dana Lewis
@danamlewis
Mar 19 2016 18:36
I generally recommend people start with care link and then switch to TI or alternative after that, that way you know you have a working loop first and then can deal with troubleshooting the switch separately.
Scott Leibrand
@scottleibrand
Mar 19 2016 18:37
@garykidd unless your laptop runs Linux I wouldn't start with that. Get a Pi (2 or 3).
Dana Lewis
@danamlewis
Mar 19 2016 18:37
@garykidd We don't have it documented yet to do a TI and everything else openAPS from scratch. Not saying it can't be done, but it'll be easier to troubleshoot and get help for your first setup if you go the carelink route.
If someone has done that; feel free to PR into the openAPS docs!
Scott Leibrand
@scottleibrand
Mar 19 2016 18:38
TI with Pi is pretty well documented over at the mmeowlink wiki. Not incorporated into openaps/docs yet though.
garykidd
@garykidd
Mar 19 2016 18:44
THanks...so b/t rp 2 or 3. is the setup basically the same then?
Brian Bonner
@itsn0tm3
Mar 19 2016 18:50
in theory it should be yes since the firmware is pretty much the same
garykidd
@garykidd
Mar 19 2016 18:50
ok. think i'll go for the 3 then
Ben West
@bewest
Mar 19 2016 18:55
I recommend TI stick because it will work on your laptop
3 is pretty good too
garykidd
@garykidd
Mar 19 2016 18:57
as in MSP430?
stick
garykidd
@garykidd
Mar 19 2016 19:01
is the TI stick independent of the pi...or do you use them together?
Ben West
@bewest
Mar 19 2016 19:01
the TI stick is a complete replacement for the carelink usb stick
but it requires a special device to program the stick with our special firmware
garykidd
@garykidd
Mar 19 2016 19:02
whats the device to program stick?
hmm, well that's the one I use
garykidd
@garykidd
Mar 19 2016 19:09
I've obviously have a ton more reading to do but appreciate every bit of the help you all are providing. will try not to over rely.
Ben West
@bewest
Mar 19 2016 19:10
no worries
garykidd
@garykidd
Mar 19 2016 19:14
in programming the ti srick with the appropriate firmware through the use of the jtag adapter....what does jtag adapter interface with the pi through the header...I'm assuming that the stick ultimately just plugs into usb on pi once flashed.
Ben West
@bewest
Mar 19 2016 19:20
no
it goes through the special programmer
so you program it once using the goodfet or the cc-debugger
those are the jtag devices
you can get little pin/cables to connect the debug pins on the TI stick to the programming device
the goodfet/cc-debugger then goes usb to your laptop/pi
after that you can plug the TI stick into usb and it work
garykidd
@garykidd
Mar 19 2016 19:22
How do you get the right info on the programmer to be able to program ti stick?
thanks
Ben West
@bewest
Mar 19 2016 19:26
it's just one of those two devices
only the goodfet or the cc-debugger devices work
I like the goodfet because it's open source/open hardware
you might be able to find a neighbor/friend nearby that has one and can help you out
or, one thing that's worked well for a lot of us is to have a meetup with other people in your area
garykidd
@garykidd
Mar 19 2016 19:29
ANY NYC area folks interested in meeting up at some point?
Ben West
@bewest
Mar 19 2016 19:31
if you're in NYC, I bet one of the hackerspaces probably even has a cc-debugger
even with the carelink usb stick
garykidd
@garykidd
Mar 19 2016 19:31
I dont mind buying. ANd I wont mind sharing for others once I've used it
Ben West
@bewest
Mar 19 2016 19:31
even though it won't work on the laptop
you can still do a lot of stuff with openaps on the laptop
garykidd
@garykidd
Mar 19 2016 19:33
WHile we've been goign back and forth just order a RP3. so I'll have to wait. I've got windows on the ltop anyway and I'm not sure I want to mess with getting functional UBUNTU on chromebook
Ben West
@bewest
Mar 19 2016 19:44
you might be able to run ubuntu in vmware fairly easily
Iain
@iainct
Mar 19 2016 20:16
@garykidd, @bewest is correct, my pi is still in the post and I am having lots of success using https://www.virtualbox.org/wiki/Downloads with linux mint, should have probably used ubuntu but I wanted to try it out! I am yet to set the TI stick up yet to talk to the pump, only hard wired to the cgm. I am an android user with a dexcom g5, so I think the only way I will get my data onto nightscout is via the openaps reporting to nightscout, can anyone confirm if this is true? thanks!
garykidd
@garykidd
Mar 19 2016 20:47
not sure how ti implement on a chromebook
to
not ti
Ben West
@bewest
Mar 19 2016 20:51
vmware runs on windows
garykidd
@garykidd
Mar 19 2016 20:51
i could try another ltop
windows
Ben West
@bewest
Mar 19 2016 20:52
also, mac works fine too
garykidd
@garykidd
Mar 19 2016 20:52
it seem skind of strange in that I think chromebooks run on unix backbone natively..no?
Jim Matheson
@jmatheson
Mar 19 2016 20:52
I gave myself insulin as a pre-bolus for lunch using the bolus wizard on my 722. It showed up in NS as 70 carbs on the bubble but without the insulin (usually the insulin shows up too but not always i think). The dev branch seems to have temp’d me to zero. Is this normal? I definately did not want a temp to zero
Ben West
@bewest
Mar 19 2016 20:53
yeah, should be able to run on chromebook as well
it should run native on mac osx
Scott Leibrand
@scottleibrand
Mar 19 2016 20:54
@jmatheson would need to see the determine-basal output to know what it's thinking.
Jim Matheson
@jmatheson
Mar 19 2016 20:57
yeah trying to ssh in to grab them and of course cant ssh. joyful
Mar 19 13:06:36 localhost openaps-loop: {"temp":"absolute","bg":102,"tick":-8,"eventualBG":-77,"snoozeBG":49,"reason":"Eventual BG -77<90, no temp, setting -1.93U/hr","duration":30,"rate":0}
Ali Mazaheri
@amazaheri
Mar 19 2016 21:00
@jmatheson that happens when the status of your pump is Bolusing and you upload to nightscout. to avoid that check the staus of pump before you run the upload.
Jim Matheson
@jmatheson
Mar 19 2016 21:00
what status do i check for? (or avoid)
does it literally return “bolusing"
Ali Mazaheri
@amazaheri
Mar 19 2016 21:00
openaps use pump status
Jim Matheson
@jmatheson
Mar 19 2016 21:02
  "status": "normal", 
  "bolusing": false, 
  "suspended": false
}
Ali Mazaheri
@amazaheri
Mar 19 2016 21:02
@jasoncalabrese had a fix for this in one of branches but we had this issue in the past
yes
Jim Matheson
@jmatheson
Mar 19 2016 21:02
so are you simply grepping to ensure bolusing is false before you do anything?
Ali Mazaheri
@amazaheri
Mar 19 2016 21:02
before upload
Jim Matheson
@jmatheson
Mar 19 2016 21:03
before upload are you grepping for bolusing false or are you doing something else (like status normal) or ORing to make sure it was not suspended too
@scottleibrand it looks like snooze bg was 49 and it thought i would be lower than that so it just shut down to zero basal? It seems strange that if i said i ate 70 carbs it would think my eventaul bg was going to be -77
Ali Mazaheri
@amazaheri
Mar 19 2016 21:06
hold on
Jim Matheson
@jmatheson
Mar 19 2016 21:06
now my BG is a straight up arrow :(
Dana Lewis
@danamlewis
Mar 19 2016 21:10
@jmatheson you didn't use a square did you?
Jim Matheson
@jmatheson
Mar 19 2016 21:10
no
Ali Mazaheri
@amazaheri
Mar 19 2016 21:12
test $(cat monitor/status.json| json blousing)==false
bolusing*
Jim Matheson
@jmatheson
Mar 19 2016 21:17
ok, thanks. i will add that to my process
@danamlewis i am getting a login prompt when i try to load openaps.org
Dana Lewis
@danamlewis
Mar 19 2016 21:22
@jmatheson hit cancel and it will let you through. But we'll fix it shortly!
Jim Matheson
@jmatheson
Mar 19 2016 21:23
yeah i got in, just an FYI in case you weren’t aware
not sure why it suspended when my BG was 102 (and my snoozeBG is 49).
maybe a below zero (negative sign) bug?
Dana Lewis
@danamlewis
Mar 19 2016 21:26
Thx for letting us know
Jason Calabrese
@jasoncalabrese
Mar 19 2016 21:56
updated to meal-assist on all rigs, still need to add everything for auto-sens, but I'm planing on doing some loop refactoring on a a dev loop first
Jim Matheson
@jmatheson
Mar 19 2016 21:56
This message was deleted
Jim Matheson
@jmatheson
Mar 19 2016 22:12
if eventualBG is negative, then this line https://github.com/openaps/oref0/blob/dev/lib/determine-basal/determine-basal.js#L300 will result it a negative insulinReq then the rate would be negative https://github.com/openaps/oref0/blob/dev/lib/determine-basal/determine-basal.js#L313 so then it would try to set a negative rate here (at least in the case of a new temp) https://github.com/openaps/oref0/blob/dev/lib/determine-basal/determine-basal.js#L330 I am not sure why we’d want to ever set a negative basal.
Since the minimum the pump understands is zero
unless we want to alert the user to eat carbs
does not answer the issue i ran into with it kicking out of snooze though
Jason Calabrese
@jasoncalabrese
Mar 19 2016 22:28
that's normal, the initial calculation might be a negative rate, but will be sent to the pump as 0
Bill Stackpole
@billstackpole
Mar 19 2016 22:30
Hi! Looking for some understanding here. Had a brief conversation with Scott yesterday about looping and such. Have the pi set up with the Carelink stick, have created a "run.sh" script calling all of the other scripts consecutively to generate enact/suggested.json. Questions are as follows:
1 - apparently I don't clearly understand the report generation / alias creation process. Does creating an alias call all of the other reports and generate the intended json file, putting it into enact/enact.json?
2 - if calling the alias generates enact.json, should the process of calling the alias be put into a cron job? How often should it be called? Since I would be setting a 30-min temp basal, is 30 min to infrequent? since the sensor updates every 5 min, is that too aggressive a schedule to use?
3 - Finally, I believe that the above should be the process and once I understand the frequency at which the process should be called / updated, it sounds as if I should be calling an alias that generates a command to execute the temp basal via yet anohter cron job (rather than commanding the pump directly via openaps.) Can someone confirm / correct / DM me if the discussion is deemed too direct or sensitive for the open forum?
Thanks! B.
(or for item 1 - does it call the others and create suggested.json, which needs to be addressed as enact.json or enacted on by telling openaps to adjust my temp basal to the values in the suggested.json?)
Ben West
@bewest
Mar 19 2016 22:32
howdy, yeah, I find the use of several crons confusing, it's possible to do it a little simpler
Bill Stackpole
@billstackpole
Mar 19 2016 22:33
I expect that the cron jobs might have sync issues as well unless I specify at what minute values each would be called - otherwise I might get into some race conditions
Ben West
@bewest
Mar 19 2016 22:33
to answer your questions, it might help to walk through what an alias and report is and how they work
mine is just a single cron job that runs every 5 minutes
Bill Stackpole
@billstackpole
Mar 19 2016 22:34
if you're willing I'm all ears (and appreciate the personal training <smile>)
you run an alias ev 5 min or a report?
Ben West
@bewest
Mar 19 2016 22:36
you have a pump device set up already?
Bill Stackpole
@billstackpole
Mar 19 2016 22:36
yup
Ben West
@bewest
Mar 19 2016 22:36
something like openaps use pump model works?
Bill Stackpole
@billstackpole
Mar 19 2016 22:36
absolutely
and have a suggested.json I can print and paste in if you like
Ben West
@bewest
Mar 19 2016 22:37
so openaps use pump model uses the "medtronic" implementation to talk to the pump, and get data from the pump, in this case the model number, just as a simple example
Bill Stackpole
@billstackpole
Mar 19 2016 22:37
you bet.
Ben West
@bewest
Mar 19 2016 22:37
but goal is to get it in a file so the other tools can use that data without needing to know how to talk to medtronic to get it
so that's where the report layer comes in
Bill Stackpole
@billstackpole
Mar 19 2016 22:37
weird - write failed - host is down.
I'll reconnect
Ben West
@bewest
Mar 19 2016 22:38
openaps report add our-model.json JSON pump model
notice how JSON replaces use in the above
openaps use ... vs openaps report add our-model.json JSON ...
notice the ... portion is exactly the same
Bill Stackpole
@billstackpole
Mar 19 2016 22:39
OK. So I'm creating a file rather than dumping to screen. Why cant I just use >?
Ben West
@bewest
Mar 19 2016 22:39
you can
Bill Stackpole
@billstackpole
Mar 19 2016 22:39
to output json to file?
Ben West
@bewest
Mar 19 2016 22:39
you could do openaps use pump model > model.json
Bill Stackpole
@billstackpole
Mar 19 2016 22:39
Oh - ok. So it's just a syntactical change.
Ben West
@bewest
Mar 19 2016 22:39
that gets a little tedious though
Bill Stackpole
@billstackpole
Mar 19 2016 22:39
got it.
Ben West
@bewest
Mar 19 2016 22:40
so instead... openaps report invoke our-model.json
and tw
btw
you can put any number of reports in there....
so openaps report medtronic-model.json dexcom-glucose.json
Bill Stackpole
@billstackpole
Mar 19 2016 22:40
so I can take my run.sh and move the reports into another report?
sounds like report concatenation
Ben West
@bewest
Mar 19 2016 22:41
that's a lot easier to type than openaps use pump model | tee model.json && openaps use dexcom iter_glucose 100 | tee dexcom-glucose.json
Bill Stackpole
@billstackpole
Mar 19 2016 22:41
ok.
starting to make sense.
Ben West
@bewest
Mar 19 2016 22:41
reports are uniquely named
you can't have two reports with same name
Bill Stackpole
@billstackpole
Mar 19 2016 22:41
so will I ultimately create a SINGLE report that will be called that has all OTHER reports in it? Can a report call anohter alias
?
Ben West
@bewest
Mar 19 2016 22:42
a report is the configuration for how to use a bunch of complicated to things to generate a new piece of data and save it in a file, such that everything works the exact same way
so when you invoke reports, it runs the configuration for each
well, let's keep it simple for now, still
Bill Stackpole
@billstackpole
Mar 19 2016 22:42
so if I were to invoke suggested.json, it would send the data to my pump?
from whatever is in suggested.json?
Ben West
@bewest
Mar 19 2016 22:43
well, what is the report defined to do?
what's the use for that report?
you can do openaps report show model.json --json to get an idea
Bill Stackpole
@billstackpole
Mar 19 2016 22:43
well - output "suggested.json" does not seem to contain the three elements that set_temp_basal requires....
Ben West
@bewest
Mar 19 2016 22:43
or openaps report show model.json --ini
let's keep it simple for now
so focusing on model.json
Bill Stackpole
@billstackpole
Mar 19 2016 22:44
think I need to be on a wired network - my wireless seems to be a bit flaky right now.
working well on my laptop but the pi keeps timing out
(pi 3 with built-in wifi)
Ben West
@bewest
Mar 19 2016 22:44
we see how the use ... and the report add $name JSON ... are a way to save all the config to re-use the command in a script
much easier to maintain a script that says openaps report invoke foo bar xyz and have all the configuration do it's job and run everything the same way every time
so we can eg get model.json, among other things, glucose
Bill Stackpole
@billstackpole
Mar 19 2016 22:45
so I can invoke multiple reports at once
Ben West
@bewest
Mar 19 2016 22:45
so idea is to break up all these things into discrete steps, since when we started no one knew what all the right steps really were
yeah, you can invoke several reports at once
it turns out that we still need to sometimes run other things
or sometimes you want to break up those into nicer groups
Bill Stackpole
@billstackpole
Mar 19 2016 22:46
'''rm -f settings/ monitor/ enact/*
openaps gather-profile
openaps monitor-pump
openaps monitor-cgm
openaps report invoke monitor/glucoseclean.json
openaps report invoke monitor/iob.json
openaps report invoke enact/suggested.json
this is what I currently have. deletes contend of files then calls six consecutive commands.
Ben West
@bewest
Mar 19 2016 22:46
so those are all configured to use different programs
so alias relationship to report is same as report to use
with alias you can run any combination of commands as a top level openaps command
so eg:
openaps alias add hello "! echo hello"
you can now type openaps hello
$ openaps alias add hello "! echo hello"
added hello ! echo hello
bewest@bewest-MacBookPro:~/Documents/foobar$ openaps hello
hello
bewest@bewest-MacBookPro:~/Documents/foobar$
Bill Stackpole
@billstackpole
Mar 19 2016 22:49
why the !? to call a bash argument from within openaps? similar to the way I can do so in vi?
Ben West
@bewest
Mar 19 2016 22:49
the ! is special syntax, just like vi or git alias
if you look at git alias, it's the same exact thing
so the built in commands
you can alias built in commands without the bang
eg openaps alias add foobar "report invoke foo bar xyz"
Bill Stackpole
@billstackpole
Mar 19 2016 22:50
OK - so if I have this right, I can use the "alias" command to execute an openaps use command OR an openaps report command OR anohter openaps alias (which seems to be a grouping of other commands)?
Ben West
@bewest
Mar 19 2016 22:51
that will make openaps foobar invoke the foo, bar, and xyz reports in order
Bill Stackpole
@billstackpole
Mar 19 2016 22:51
so I need an alias to invoke "clean / iob / suggested"
?
Ben West
@bewest
Mar 19 2016 22:52
which is same as doing openaps use .... > foo && openaps use ..... > bar && openaps use .... > xyz
Bill Stackpole
@billstackpole
Mar 19 2016 22:53
will the suggested.json invoke / set_temp_basal if I need it? (every time I've run it so far I was either so far that suggested showed I needed to bolus OR so close that it suggested a zero temp basal change)
Ben West
@bewest
Mar 19 2016 22:53
I need the definition of your report to answer
Bill Stackpole
@billstackpole
Mar 19 2016 22:53
(and I think I need to flowchart this for my own comfort and understanding.)
Ben West
@bewest
Mar 19 2016 22:53
the report name is just a filename
Bill Stackpole
@billstackpole
Mar 19 2016 22:53
wait one - I'll run one.
oh -
Ben West
@bewest
Mar 19 2016 22:53
what matters is the use
the report is configured to use something in particular
that's what matters
Bill Stackpole
@billstackpole
Mar 19 2016 22:54
finally got my pi to wake up again.
Ben West
@bewest
Mar 19 2016 22:54
so try openaps report show enacted/suggested.json --ini
Bill Stackpole
@billstackpole
Mar 19 2016 22:54
I'll run run.sh
again - write failed host is down - rebooting.
Ben West
@bewest
Mar 19 2016 22:55
might comment out your cron jobs for now
Bill Stackpole
@billstackpole
Mar 19 2016 22:56
no cron jobs setup right now - wanted to grok before config.
'''determine-basal://text/shell/enact/suggested.json
{"delta":-4,"glucose":256,"avgdelta":-5}
{"duration":0,"rate":122,"temp":"percent"}
{"bolusiob":0.6002983302125,"iob":3.350304410326875,"activity":0.05207512626262626}
{"max_iob":2,"type":"current","dia":4,"current_basal":1.05,"max_daily_basal":1.25,"max_basal":2,"min_bg":100,"max_bg":120,"sens":30}
reporting enact/suggested.json
wait one for suggested.json
'''pi@openaps-raspi:~/billopenaps $ cat enact/suggested.json
{"temp":"absolute","bg":256,"tick":-4,"eventualBG":163,"snoozeBG":190,"reason":"basal_iob 2.75 > max_iob 2","duration":0,"rate":0}
Ben West
@bewest
Mar 19 2016 22:56
openaps report show enact/suggested.json --ini
oops
Bill Stackpole
@billstackpole
Mar 19 2016 22:57
so as I see it.
this says my bg is hi
(256)
dropping by 4 pts ev 5 min so far
expected bg based on current IOB is 163
(need to bolus)
current temp basal is (off: 0 rate) for (off: 0 duration)
yes?
Ben West
@bewest
Mar 19 2016 22:58
it's not going to temp basal you in this situation
Bill Stackpole
@billstackpole
Mar 19 2016 22:58
ritght
cause I need to bolus
is there a way to push example data to the system?
Ben West
@bewest
Mar 19 2016 22:58
reason is "basal_iob 2.75 > max_iob 2"
if you really want it to basal you, you can increase your max_iob to say 3 or something
Bill Stackpole
@billstackpole
Mar 19 2016 22:59
I ahve others building some pis (I work at a college and am involving students int eh project)
sry for bad typing today.
I change the max in the config file for opeanps, yes?
Ben West
@bewest
Mar 19 2016 23:00
no, usually there's a file
oref0-mint-max-iob
you can test new json output like oref0-mint-max-iob 3.1 or similar
save it to file using tee/ redirect
but check which file you are using? is it called max_iob.json or max-iob.json?
you can look at your report configs to figure out which
openaps report show enact/suggested.json --ini will list it out
or maybe an earlier rpoert
Bill Stackpole
@billstackpole
Mar 19 2016 23:02
rebooting on a wired network
Ben West
@bewest
Mar 19 2016 23:02
not sure what your files are named
Bill Stackpole
@billstackpole
Mar 19 2016 23:05
changing laptops to a wired laptop on the same net as the pi
Ben West
@bewest
Mar 19 2016 23:05
:-)
Jim Matheson
@jmatheson
Mar 19 2016 23:09
ok thanks @jasoncalabrese
Mar 19 12:59:46 localhost openaps-loop: {"temp":"absolute","bg":110,"tick":-7,"eventualBG":-76,"snoozeBG":87,"reason":"Eventual BG -76<90, no temp, setting 1.11U/hr","duration":30,"rate":1.1} Mar 19 13:06:36 localhost openaps-loop: {"temp":"absolute","bg":102,"tick":-8,"eventualBG":-77,"snoozeBG":49,"reason":"Eventual BG -77<90, no temp, setting -1.93U/hr","duration":30,"rate":0}
Bill Stackpole
@billstackpole
Mar 19 2016 23:12
grr. networking issues w/pi. I have a console directly and wpa_supplicant is getting wifi addy but network addy is wrong subnet (so conflict in route table and other stuff.) I'll work from console and type on other machine.
yup - max_iob.json. Shows 2.
Jim Matheson
@jmatheson
Mar 19 2016 23:15
oh i see, the snooze bg is actually a number that kicks in if we are over it, not under it. so since I was over 87 and then over 49 then tne snooze stopped.
Bill Stackpole
@billstackpole
Mar 19 2016 23:17
pi@openaps-raspi:~/billopenaps $ openaps report show enact/suggested.json --ini
[report "enact/suggested.json"]
profile = settings/profile.json
use = shell
temp_basal = monitor/temp_basal.json
reporter = text
json_default = True
device = determine-basal
remainder = []
iob = monitor/iob.json
glucose = monitor/glucoseclean.json
Ben West
@bewest
Mar 19 2016 23:20
nice
so that report is running determin-basal and saving the results
Jim Matheson
@jmatheson
Mar 19 2016 23:20
still a bit confused on the snooze.
it should definately not have stopped snoozing.
Ben West
@bewest
Mar 19 2016 23:21
it doesn't send any commands to pump, just creates the suggestion
to update the max iob, I would do oref0-mint-max-iob 3.25 | tee max_iob.json
Bill Stackpole
@billstackpole
Mar 19 2016 23:22
OK - so that would set the max_iob.json file to 3.25 - could I just edit the file directly? Why do I need the tee? (that typically shows on screen and write sto file, right?
writes to
Ben West
@bewest
Mar 19 2016 23:22
yeah, you could write it directly
editing files is actually a pretty complicated thing to do, UX wise, whereas using a tool that allows you to preview, iterate, and then save something usually yields pretty good results
Bill Stackpole
@billstackpole
Mar 19 2016 23:24
something goofy w/my networking on the pi. Cant ping quad-8 but have a default route correctly set and an IP set. Seems the wired IP is set to the wrong network but the wireless is set to the righgt netowrk. Lemme turn off wired, turn on wireless, and see if the route table is right...
wireless is working and quad 8 works. Whew.
K. (Comfy w/vi so no issues there but understand the edits can cause some grief if fat fingers involved)
running again with a 3.5 max_iob.json value.
Ben West
@bewest
Mar 19 2016 23:27
yeah, if you're comfy with vi, you've got quite leg up, I tried to design the tools so it's only needed in extreme situations
Bill Stackpole
@billstackpole
Mar 19 2016 23:29
figures that my sensor just expired. No glucose data (so suggested.json can't run - grr)
Ben West
@bewest
Mar 19 2016 23:29
awwww
Bill Stackpole
@billstackpole
Mar 19 2016 23:29
will you be around tomorrow?
(I'm eastern time)
Ben West
@bewest
Mar 19 2016 23:29
you can check out your previous run
Bill Stackpole
@billstackpole
Mar 19 2016 23:29
oh - how?
Ben West
@bewest
Mar 19 2016 23:29
btw, openaps believes in saving everything if possible
Scott Leibrand
@scottleibrand
Mar 19 2016 23:29
@jmatheson with your IOB, you're projected to drop all the way to -77, and it's been long enough for carbs to kick in, but they're not. So it figures the safest thing to do is low-temp and wait for carbs to start kicking in.
Ben West
@bewest
Mar 19 2016 23:29
so type git log
every report invoke creates a git commit
Bill Stackpole
@billstackpole
Mar 19 2016 23:30
cool
didn't know that!
Ben West
@bewest
Mar 19 2016 23:30
so basically openaps turns the "active ram" of openaps into a git log of all the changes
so you can git checkout $hash
and just run the alias for that thing
don't run the whole run scirpt, just run the alias for that
if you do checkout to older version you'll likely need to refresh your max_iob again
Bill Stackpole
@billstackpole
Mar 19 2016 23:31
so I have a commit for 1856 and anohter for 1928 that includes suggested.json
Ben West
@bewest
Mar 19 2016 23:31
but then you can just run that portion of "the loop", just those few alias
Scott Leibrand
@scottleibrand
Mar 19 2016 23:31
@jmatheson if you want it to high-temp more aggressively when you start rising, I would recommend using the meal-assist branch. But even that would low-temp in a situation like this with so much IOB and falling so fast.
Bill Stackpole
@billstackpole
Mar 19 2016 23:31
oh - I have more to learn.
Ben West
@bewest
Mar 19 2016 23:31
ah, that's the other issue, with -4 delta, oref0 will consider that a fairly steep change
Bill Stackpole
@billstackpole
Mar 19 2016 23:32
I do have to run - wife is calling for dinner - but want to continue this discussion.
Ben West
@bewest
Mar 19 2016 23:32
unlikely to add temp on top, but who knows
yeah, laters :-)
I'm here often
Scott Leibrand
@scottleibrand
Mar 19 2016 23:32
@jmatheson you may trust that your carbs will kick in soon, but it is designed to wait to see actual evidence of that (a positive deviation).
Bill Stackpole
@billstackpole
Mar 19 2016 23:32
Thank you! I'm going to copy/paste this discussion so I can review and further grok. Will touch base again soon. Thank you for the help so far. I need to spend more time in git (Lynda.com I think will help <smile>.)
Scott Leibrand
@scottleibrand
Mar 19 2016 23:37
@jmatheson but once it does see a positive deviation, it can very quickly reverse any low-temps it did while waiting for the carbs to start kicking in
Jim Matheson
@jmatheson
Mar 19 2016 23:37
mine low temped me to zero for almost 45 mintues
and counteracted my prebolus
Scott Leibrand
@scottleibrand
Mar 19 2016 23:38
Did you have a big correction bolus well before the meal?
Might be useful to paste the NS screenshot too.
Milos Kozak
@MilosKozak
Mar 19 2016 23:40
blob
Ben West
@bewest
Mar 19 2016 23:40
nice @MilosKozak, new report?
Milos Kozak
@MilosKozak
Mar 19 2016 23:41
old report :) but supporting openaps status on mouseover ;)
Jim Matheson
@jmatheson
Mar 19 2016 23:41
no. i was 120 (flat) and i prebolused. it took my BG 40 minutes to drop from 120 to 102. I ate 30 minutes after the prebolus.
Scott Leibrand
@scottleibrand
Mar 19 2016 23:41
And how long after prebolus did it start low temping?
Jim Matheson
@jmatheson
Mar 19 2016 23:41
i did not notice that it had temped me to zero
Jason Calabrese
@jasoncalabrese
Mar 19 2016 23:42
thats nice @MilosKozak
those reports can't handle my data volume
Milos Kozak
@MilosKozak
Mar 19 2016 23:43
if you display 1 day or so?
or 3 months?
Jason Calabrese
@jasoncalabrese
Mar 19 2016 23:44
2 days is ok, but anymore and I need to leave it for a while and go do something else
Jim Matheson
@jmatheson
Mar 19 2016 23:45
looks like it was 30-40 mintues after i prebolused. as my BG finally started dropping.
Milos Kozak
@MilosKozak
Mar 19 2016 23:46
22 secs here to load 3months (including openaps data)
Jim Matheson
@jmatheson
Mar 19 2016 23:46
i was sitting patiently for my insulin to start working before i ate the food.
Milos Kozak
@MilosKozak
Mar 19 2016 23:47
7 sec to load a week
on pc
Jim Matheson
@jmatheson
Mar 19 2016 23:49
i dont want to high temp when i am going high, i am looking to prebolus to curb the spike to begin with. I was not falling fast.
the high temp while going high should be a backup plan
Screen Shot 2016-03-19 at 4.49.58 PM.png
Scott Leibrand
@scottleibrand
Mar 19 2016 23:52
The problem is differentiating between a prebolus and an (over)correction bolus.
Jim Matheson
@jmatheson
Mar 19 2016 23:52
yea
Scott Leibrand
@scottleibrand
Mar 19 2016 23:52
Without an eating soon mode, we have no way to communicate to OpenAPS that carbs are coming.
So we do bolus snooze, and then avoid low-temping if we see positive deviation.
The bolus snooze initially goes to 1.5x (so if you're 120 with an eventualBG of 0, then snoozeBG will start at 180)
Jim Matheson
@jmatheson
Mar 19 2016 23:54
pre bolus seems like a pretty effective approach. it’d be great if we can factor that in at some point soon.
i do think there may be some other issue with the values i use.
Scott Leibrand
@scottleibrand
Mar 19 2016 23:55
and then snoozeBG drops to eventualBG over DIA/2 (1.5-2 hours)
Jim Matheson
@jmatheson
Mar 19 2016 23:55
it seems like i never end up at the eventual bg
Sulka Haro
@sulkaharo
Mar 19 2016 23:56
Hey does openaps rewrite the ini files as part of it's operation? The loop had broken yesterday due to the pump.ini file turning into a 0 byte empty file
Scott Leibrand
@scottleibrand
Mar 19 2016 23:56
if you set up autosens on the meal-assist branch it can tell you whether you tend to run higher or lower than predicted over 24h
and automatically adjust basal and ISF accordingly.
@sulkaharo yeah, it updates the expires time
Jim Matheson
@jmatheson
Mar 19 2016 23:57
yeah, i can try that again. i lost that setup when i fried my last edison. in general it thought my rates were pretty close which was surprising
Scott Leibrand
@scottleibrand
Mar 19 2016 23:58
How does your average overnight BG compare to target?
Sulka Haro
@sulkaharo
Mar 19 2016 23:59
Right. One more place that can break. @bewest take heed. I guess rewriting base config shouldn't be done under any circumstances unless it's actually changed.