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

19th
Feb 2016
Ben West
@bewest
Feb 19 2016 00:00
no tape
I use iv-prep to clean area
more or less let dry
then I use a skin-tac wipe, and wipe the area
let dry
then I apply sensor
ok, tbh, in shower, I try to keep that arm out of water
tazitoo
@tazitoo
Feb 19 2016 00:51

Quick question - I'm trying the open loop and I've had two instances where I continue to drop low...which is a bit troublesome. I was reading the OpenAPS reference design doc which states:
"if current BG is below a configured threshold (defaulting to 30mg/dL below the target range)..."

Where is that 30mg/dL set? My targets are set at 110 and 130 (figuring that brackets 120 due to uncertainty in measurements)...so it only stops if BG < 80 as set now...

tazitoo
@tazitoo
Feb 19 2016 02:50
...I guess I'll be taking my answer off line...Ciao for now.
Dragan Maksimovic
@dm61
Feb 19 2016 04:38

Hi @tazitoo, that threshold is set in the determine-basal code:

    var threshold = profile.min_bg - 0.5*(profile.min_bg-50);

So, if your min_bg = 110, the threshold below which 0 temp basal is enforced is: 110-0.5*(110-50)=110-30=80. The current master version of the determine-basal code can be seen here: https://github.com/openaps/oref0/blob/master/lib/determine-basal/determine-basal.js

Matthias
@ceben80
Feb 19 2016 05:40
Great night with APS, running flat through the night :smile:
schulzedj
@schulzedj
Feb 19 2016 05:55
I am confused on what to do with the openaps enact
Can anyone shed light beyond the two generic questions on the documentation?
schulzedj
@schulzedj
Feb 19 2016 06:02
I understand the enact "sends changes into the world" but I guess I am unsure of how this differs from the openaps use pump set_temp_basal enact/suggested.json
Jim Matheson
@jmatheson
Feb 19 2016 06:05
openaps use pump set_temp_basal enact/suggested.json sends the suggested changes to the pump
openaps enact is usually an alias (called enact). which does several things including running reports that are used as inputs to what ends up being the suggestions.
schulzedj
@schulzedj
Feb 19 2016 06:09
right- so I guess my question is more on the set up of the actual alias. Other than the use pump set_temp... what else should be included in the alias?
Jim Matheson
@jmatheson
Feb 19 2016 06:09
this is what mine looks like
enact = ! bash -c "rm -vf predict/oref0.json; openaps report invoke predict/iob.json predict/oref0.json && cat predict/oref0.json && grep -q duration predict/oref0.json && ( openaps report invoke control/enacted.json && cat control/enacted.json ) || echo No action required"
schulzedj
@schulzedj
Feb 19 2016 06:11
hmm- ok trying to figure out what all this mean. This is helpful
Jim Matheson
@jmatheson
Feb 19 2016 06:11
first it deletes the old oref0.json file
then it runs two reports openaps report invoke predict/iob.json predict/oref0.json
schulzedj
@schulzedj
Feb 19 2016 06:13
ok- so where does the set_temp fit into this?
Jim Matheson
@jmatheson
Feb 19 2016 06:13
then it double checks that there is some sort of duration in the oref0.json otherwise it bails out
then it runs enacted.json
schulzedj
@schulzedj
Feb 19 2016 06:15
Let me try this out and see
Jim Matheson
@jmatheson
Feb 19 2016 06:19
during the running of the report for enacted.json it uses info from oref0.json (which we ran earlier) to send the temp basal to the pump
we verified that there was a temp to be sent, and now we send it.
(this is partially for me to ensure i know what i am talking about)
make sure we have all the data we need, calculate what adjustment should be made, send that to the pump.
schulzedj
@schulzedj
Feb 19 2016 06:26
in running the script I see that I do not have predict/iob.json
So I think I need to go back and translate into what my set up is
added enact ! bash -c "rm -vf predict/oref0.json; openaps report invoke predict/iob.json predict/oref0.json && cat predict/oref0.json && grep -q duration predict/oref0.json && ( openaps report invoke control/enacted.json && cat control/enacted.json ) || echo No action required" pi@raspberrypi:~/daps $ openaps enact usage: openaps-report invoke [-h] {enact/suggested.json,monitor/clock-zoned.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory-zoned.json,monitor/pumphistory.json,monitor/reservoir.json,monitor/temp_basal.json,settings/basal_profile.json,settings/bg_targets.json,settings/insulin_sensitivities.json,settings/model.json,settings/profile.json,settings/settings.json} [{enact/suggested.json,monitor/clock-zoned.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory-zoned.json,monitor/pumphistory.json,monitor/reservoir.json,monitor/temp_basal.json,settings/basal_profile.json,settings/bg_targets.json,settings/insulin_sensitivities.json,settings/model.json,settings/profile.json,settings/settings.json} ...] openaps-report invoke: error: argument report: invalid choice: 'predict/iob.json' (choose from u'enact/suggested.json', u'monitor/clock-zoned.json', u'monitor/clock.json', u'monitor/glucose.json', u'monitor/iob.json', u'monitor/pumphistory-zoned.json', u'monitor/pumphistory.json', u'monitor/reservoir.json', u'monitor/temp_basal.json', u'settings/basal_profile.json', u'settings/bg_targets.json', u'settings/insulin_sensitivities.json', u'settings/model.json', u'settings/profile.json', u'settings/settings.json') No action required
Jim Matheson
@jmatheson
Feb 19 2016 06:30
yes, you definately need to calculate insulin on board (IOB) first because that is an input to figuring out if we need to make changes or not.
schulzedj
@schulzedj
Feb 19 2016 06:30
Yikes- that's ugly
Jim Matheson
@jmatheson
Feb 19 2016 06:30
if you put ``` before and after it will do a code block
schulzedj
@schulzedj
Feb 19 2016 06:30
added enact ! bash -c "rm -vf predict/oref0.json; openaps report invoke predict/iob.json predict/oref0.json && cat predict/oref0.json && grep -q duration predict/oref0.json && ( openaps report invoke control/enacted.json && cat control/enacted.json ) || echo No action required" pi@raspberrypi:~/daps $ openaps enact usage: openaps-report invoke [-h] {enact/suggested.json,monitor/clock-zoned.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory-zoned.json,monitor/pumphistory.json,monitor/reservoir.json,monitor/temp_basal.json,settings/basal_profile.json,settings/bg_targets.json,settings/insulin_sensitivities.json,settings/model.json,settings/profile.json,settings/settings.json} [{enact/suggested.json,monitor/clock-zoned.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory-zoned.json,monitor/pumphistory.json,monitor/reservoir.json,monitor/temp_basal.json,settings/basal_profile.json,settings/bg_targets.json,settings/insulin_sensitivities.json,settings/model.json,settings/profile.json,settings/settings.json} ...] openaps-report invoke: error: argument report: invalid choice: 'predict/iob.json' (choose from u'enact/suggested.json', u'monitor/clock-zoned.json', u'monitor/clock.json', u'monitor/glucose.json', u'monitor/iob.json', u'monitor/pumphistory-zoned.json', u'monitor/pumphistory.json', u'monitor/reservoir.json', u'monitor/temp_basal.json', u'settings/basal_profile.json', u'settings/bg_targets.json', u'settings/insulin_sensitivities.json', u'settings/model.json', u'settings/profile.json', u'settings/settings.json') No action required
that's what I did
Jim Matheson
@jmatheson
Feb 19 2016 06:31
press the little text bubble to the right, then put the ``` on it’s own line at the start and end. then press that again. then enter.
schulzedj
@schulzedj
Feb 19 2016 06:32
added enact ! bash -c "rm -vf predict/oref0.json; openaps report invoke predict/iob.json predict/oref0.json && cat predict/oref0.json && grep -q duration predict/oref0.json && ( openaps report invoke control/enacted.json && cat control/enacted.json ) || echo No action required"
pi@raspberrypi:~/daps $ openaps enact
usage: openaps-report invoke [-h]
                             {enact/suggested.json,monitor/clock-zoned.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory-zoned.json,monitor/pumphistory.json,monitor/reservoir.json,monitor/temp_basal.json,settings/basal_profile.json,settings/bg_targets.json,settings/insulin_sensitivities.json,settings/model.json,settings/profile.json,settings/settings.json}
                             [{enact/suggested.json,monitor/clock-zoned.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory-zoned.json,monitor/pumphistory.json,monitor/reservoir.json,monitor/temp_basal.json,settings/basal_profile.json,settings/bg_targets.json,settings/insulin_sensitivities.json,settings/model.json,settings/profile.json,settings/settings.json} ...]
openaps-report invoke: error: argument report: invalid choice: 'predict/iob.json' (choose from u'enact/suggested.json', u'monitor/clock-zoned.json', u'monitor/clock.json', u'monitor/glucose.json', u'monitor/iob.json', u'monitor/pumphistory-zoned.json', u'monitor/pumphistory.json', u'monitor/reservoir.json', u'monitor/temp_basal.json', u'settings/basal_profile.json', u'settings/bg_targets.json', u'settings/insulin_sensitivities.json', u'settings/model.json', u'settings/profile.json', u'settings/settings.json')
No action required
Jim Matheson
@jmatheson
Feb 19 2016 06:32
nice
schulzedj
@schulzedj
Feb 19 2016 06:33
so maybe I should be using the monitor/iob.json instead?
Jim Matheson
@jmatheson
Feb 19 2016 06:33
do you have an iob.json in one of the directories?
what i did might not match the documentation exactly
i dont think you have an iob report yet
schulzedj
@schulzedj
Feb 19 2016 06:35
Yeah- it's in the monitor directory
Jim Matheson
@jmatheson
Feb 19 2016 06:35
cool, so just change that.
you are monitoring iob, so where i have it does not really make sense.
just change your alias to point to monitor dir
schulzedj
@schulzedj
Feb 19 2016 06:36
that would make sense...at least I think ;-)
Jim Matheson
@jmatheson
Feb 19 2016 06:37
if you can, make some notes on where the docs fell flat so once you are going you can suggest some improvements
schulzedj
@schulzedj
Feb 19 2016 06:38
Well the notes don't cover anything on the enact section...which for someone like me with bare bones of experience is a little bit like drowning
Jim Matheson
@jmatheson
Feb 19 2016 06:40
yeah, sounds like it needs to be added as long as there is a good explainer leading up to how it works and what it is doing.
schulzedj
@schulzedj
Feb 19 2016 06:45
I'm not quire there but I'm close...still trying to figure out the acceptable way of structuring commands
*quite
Jim Matheson
@jmatheson
Feb 19 2016 06:47
i’ve noticed this is when @bewest usually reminds people that you can use the -h flag openaps -h to help remember formatting
or with any of the commands
schulzedj
@schulzedj
Feb 19 2016 06:49
Sure but that also assumes a lot of the background of the individual "reading." It's all a part of the learning process.
Jim Matheson
@jmatheson
Feb 19 2016 06:50
agree
it seems like you are asking good questions :)
schulzedj
@schulzedj
Feb 19 2016 06:53
I at least want to believe I'm close...I know it's all pretty logical (once you understand how the logic actually works).
when you run the predict/oref0.json, what are you getting?
I'm trying to figure out which one of my reports that equates to
Jim Matheson
@jmatheson
Feb 19 2016 07:00
what output am i getting?
schulzedj
@schulzedj
Feb 19 2016 07:06
Essentially- The report output is in suggested.json file, which includes a recommendation to be enacted by sending, if necessary, a new temp basal to the pump, as well as a reason for the recommendation.
Jim Matheson
@jmatheson
Feb 19 2016 07:09
It’s going to look something like mine which at the moment says {"temp":"absolute","bg":100,"tick":-1,"eventualBG":99,"snoozeBG":101,"mealAssist":"Off: Carbs: 15 Boluses: 1.6 Target: 97.5 Deviation: 6 BGI: -2.22","reason":"99 is in range. No temp required”}
I am not sure how good the documentation is on this front.
Sorry to leave you hanging but I am hitting the sack.
schulzedj
@schulzedj
Feb 19 2016 07:11
Thanks for your help!!
Jim Matheson
@jmatheson
Feb 19 2016 07:12
search back in here for oref0. i think there are some examples for what you need to add it to your ini
or jason can help (he is a master at that, thx @jasoncalabrese ). night guys.
schulzedj
@schulzedj
Feb 19 2016 07:17
My last question for the night before I hit the sack: I appear to freeze the pi when I run the openaps loop on the same section. See below.
pi@raspberrypi:~/daps $ openaps loop
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
pump://JSON/read_clock/monitor/clock.json
reporting monitor/clock.json
PREFLIGHT OK
pump://JSON/read_settings/settings/settings.json
reporting settings/settings.json
pump://JSON/read_bg_targets/settings/bg_targets.json
reporting settings/bg_targets.json
pump://JSON/read_insulin_sensitivies/settings/insulin_sensitivities.json
reporting settings/insulin_sensitivities.json
pump://JSON/read_basal_profile_std/settings/basal_profile.json
reporting settings/basal_profile.json
get-profile://text/shell/settings/profile.json
reporting settings/profile.json
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
pump://JSON/read_clock/monitor/clock.json
reporting monitor/clock.json
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
pump://JSON/iter_pump_hours/monitor/pumphistory.json
reporting monitor/pumphistory.json
calculate-iob://JSON/shell/monitor/iob.json
reporting monitor/iob.json
calculate-iob://JSON/shell/monitor/iob.json
reporting monitor/iob.json
removed ‘enact/suggested.json’
calculate-iob://JSON/shell/monitor/iob.json
reporting monitor/iob.json
determine-basal://text/shell/enact/suggested.json
{"delta":-3,"glucose":236,"avgdelta":-2.6666666666666665}
{"duration":0,"rate":0.125,"temp":"absolute"}
{"bolusiob":0,"iob":0,"activity":0}
{"max_iob":2,"type":"current","dia":5,"current_basal":0.05,"max_daily_basal":0.05,"max_basal":3,"min_bg":90,"max_bg":110,"sens":40}
reporting enact/suggested.json
{"temp":"absolute","bg":236,"tick":-3,"eventualBG":228,"snoozeBG":228,"reason":"Eventual BG 228>90 but Delta -3 < Exp. Delta -2.1; no temp to cancel"}
it just freezes after the reporting enact/suggested.json
schulzedj
@schulzedj
Feb 19 2016 07:28
at least I think it freezes because I'm not prompted with the $
Matthias
@ceben80
Feb 19 2016 11:08
@/all Today I have created a backup from the pi sd card - the img file is very huge with 14.4 GB :worried: . I'd like to know how I can find this mass of trash or whatever...? Please advice.
Dragan Maksimovic
@dm61
Feb 19 2016 15:52
@schulzedj , @jmatheson , details are intentionally left out of the enact section: @danamlewis and @scottleibrand want to make sure people have good understanding of the system before they close the loop
Dragan Maksimovic
@dm61
Feb 19 2016 16:05
@schulzedj does the prompt come back after you hit enter? With some openaps reports, the $ prompt shows up at the end of the line upon completion - easy to miss.
schulzedj
@schulzedj
Feb 19 2016 16:24
No- I don't believe it does. Do you see it in my prior post?
@dm61 I get the 'good understanding' philosophy and there there are prookie like me to get the general concepts but are still not yet able to write coherent sentences of command in the still foreign language.
Dragan Maksimovic
@dm61
Feb 19 2016 16:41
Understand completely, I struggled through the setup a lot. Googled like crazy bash commands...
So, it just hangs up? You need to reboot to restart?
Matthias
@ceben80
Feb 19 2016 17:01
@jasoncalabrese I would like to give you a feedback regarding the syslog stuff - it works fine on my loop - thanks again for this useful hint.
In terms of monitoring I'm gonna use a SSH client on my smartphone and use tail -f /var/log/messages | grep openaps-loop
Feb 19 17:56:46 raspberrypi openaps-loop: PREFLIGHT OK
Feb 19 17:57:41 raspberrypi openaps-loop: Uploaded; most recent treatment event @ 2016-02-19T17:09:29+01:00
Feb 19 18:00:24 raspberrypi openaps-loop: pump://JSON/read_clock/monitor/clock.json
Feb 19 18:00:24 raspberrypi openaps-loop: reporting monitor/clock.json
Feb 19 18:00:24 raspberrypi openaps-loop: PREFLIGHT OK
Feb 19 18:00:32 raspberrypi openaps-loop: pump://JSON/read_status/monitor/status.json
Feb 19 18:00:32 raspberrypi openaps-loop: reporting monitor/status.json
Feb 19 18:00:32 raspberrypi openaps-loop: tz://JSON/clock/monitor/clock-zoned.json
Feb 19 18:00:32 raspberrypi openaps-loop: reporting monitor/clock-zoned.json
Eric
@ecc1
Feb 19 2016 17:25
@schulzedj When it hangs like that, try typing control-Z (it should say "Stopped ..." and give you back a shell prompt). Then type "bg <return>" If it says "Stopped" again, that means you probably have a typo in your alias that's trying to read from standard input, a common mistake in shell scripting. If it just says "[1] openaps ... &", then it's something else, sorry.
Jason Calabrese
@jasoncalabrese
Feb 19 2016 17:26
I do that some too, but mostly look at the whole thing, since I have a few crons that I tag with different labels
Jim Matheson
@jmatheson
Feb 19 2016 19:08
@dm61 i know why we leave a gap but it's too big. I think the docs can do a better job explaining what should be considered, added and why without cut/paste commands and code. The docs right now reference enact in a code snippet.
joannestevens
@joannestevens
Feb 19 2016 19:22
This message was deleted
This message was deleted
Jim Matheson
@jmatheson
Feb 19 2016 19:26
Looks like you removed the cgm and then added the pump. Then it said pump was already added. Also delete that message if you still can. It has your pump id in there which should be kept private
cant help with the bottom error as i am mobile. Guess that was your question...
joannestevens
@joannestevens
Feb 19 2016 19:30
Thanks, yes it was, it says something about port error
I'll remove shortly