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

18th
Jun 2017
Scott Leibrand
@scottleibrand
Jun 18 2017 00:12
Did that alias change already get merged to master? I didn't check.
katie disimone
@Kdisimone
Jun 18 2017 00:27
I didn’t see it in there, no
Zakm0n
@Zakm0n
Jun 18 2017 01:44
Ok, everything was working beautifully, but for some reason, openaps is uploading everything except cgm values to ME
ND
Night scout. Autocorrect is killing me today
Dana Lewis
@danamlewis
Jun 18 2017 01:45
Did you do openaps first-upload
Zakm0n
@Zakm0n
Jun 18 2017 01:46
Starting ns-loop at Sat Jun 17 20:37:01 CDT 2017:
ns://JSON/shell/cgm/ns-glucose.json
No JSON object could be decoded
Yes
marafie
@marafie
Jun 18 2017 02:04
I would like to understand how does the basal work... when the dosage is at 0.05u/h how is it injected over the hour ? Does it give it in one time or divides it over an hour and how does it divid it ? 1/6 of 0.05u each 10 mins ?
Zakm0n
@Zakm0n
Jun 18 2017 02:12
Just did a meter test, which uploaded to ns, but cgm data still Isnt there
Loop is working, bg went low, temp basal was 0
fiberfan
@fiberfan
Jun 18 2017 02:26
I am running from a new setup from the master branch on Wednesday. While troubleshooting I ran openaps ns-loop with the following error.
"Warning: Argument order has changed: please update your oref0-meal device and meal.json report to place carbhistory.json after basalprofile.json"
Scott Leibrand
@scottleibrand
Jun 18 2017 03:38
@fiberfan that's just a warning. Feel free to go fix the argument order in the alias and PR in if you want the warning to go away.
@marafie there is a lower limit on how much insulin it can give at once. The exact amount varies between different pump models. But for a basal that low it's going to be a long time between the microboluses it gives to make up the basal.
@Zakm0n if openaps first-upload worked it will have uploaded one CGM data point. If it didn't, which CGM option did you select in oref0-setup? Depending on that, you might need to do the first-upload from the myopenaps-cgm-loop directory.
@davidklee the pump comms don't matter for carb decay: it's whether you have complete CGM data in NS / on the rig.
katie disimone
@Kdisimone
Jun 18 2017 04:00
@scottleibrand where are the aliases in Github in order to PR?
and…what would cause these “raw” bits in the profile?
root@jubilinux:~/myopenaps# cat settings/profile.json
{"max_iob":0,"max_daily_safety_multiplier":3,"current_basal_safety_multiplier":4,"autosens_max":1.2,"autosens_min":0.7,"autosens_adjust_targets":true,"override_high_target_with_low":false,"skip_neutral_temps":false,"bolussnooze_dia_divisor":2,"min_5m_carbimpact":3,"carbratio_adjustmentratio":1,"dia":4,"model":"522","current_basal":0.85,"basalprofile":[{"i":0,"start":"00:00:00","rate":0.85,"minutes":0}],"max_daily_basal":0.85,"max_basal":3.5,"out_units":"mg/dL","min_bg":90,"max_bg":90,"bg_targets":{"units":"mg/dL","user_preferred_units":"mg/dL","targets":[{"i":0,"high":90,"start":"00:00:00","low":90,"offset":0,"x":0,"max_bg":90,"min_bg":90}],"first":1},"sens":65,"isfProfile":{"units":"mg/dL","user_preferred_units":"mg/dL","sensitivities":[{"i":0,"start":"00:00:00","sensitivity":65,"x":0,"offset":0,"endOffset":1440}],"first":1},"carb_ratio":15,"carb_ratios":{"units":"grams","raw":"0x01 0x00 0x08 0x0b 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00","first":1,"schedule":[{"start":"00:00:00","r":8,"ratio":8,"offset":0,"i":0,"x":0},{"start":"05:30:00","r":15,"ratio":15,"offset":330,"i":11,"x":1}]}}
specifically they are in the carb ratios. The pump only has two carb ratios put in there. I’ve deleted the profile several times and tried fresh openaps get-settings each time those raw bits get pulled in
katie disimone
@Kdisimone
Jun 18 2017 04:21

loosing my mind…what is causing this?

root@jubilinux:~/myopenaps/settings# cat carb_ratios.json
{
"units": "grams",
"raw": "0x01 0x00 0x08 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00",
"first": 1,
"schedule": [
{
"start": "00:00:00",
"r": 8,
"ratio": 8,
"offset": 0,
"i": 0,
"x": 0
}
]

rsilvers129
@rsilvers129
Jun 18 2017 04:29
My pump has insulin active times settable in hours. So 3 or 4. If I wanted 3.5, which part of the code loads it from the pump so that I can manually override the variable?
katie disimone
@Kdisimone
Jun 18 2017 04:34
You’d have to disable or modify your alias for get-settings
get-settings report invoke settings/model.json settings/bg_targets_raw.json settings/bg_targets.json settings/insulin_sensitivities_raw.json settings/insulin_sensitivities.json settings/basal_profile.json settings/settings.json settings/carb_ratios.json settings/profile.json
DIA is in settings.json
katie disimone
@Kdisimone
Jun 18 2017 04:43

Ok…I’m seeing now that the raw is normal? http://openaps.readthedocs.io/en/latest/reference/openaps/openaps-report-settings-carb_ratios.html

If that’s the case, is that only true for x22 pumps? My x23 carb_rations.json do not have the raw line.

Anyone know?

katie disimone
@Kdisimone
Jun 18 2017 05:21
I gave up. Went to dev branch and it works. I don’t know what the heck was going on or why it wouldn’t work…but I’m in a rabbit hole of manual installations now to learn more. The error kept coming back with the carbs undefined, not enough glucose data (yes, ama was on). Wiped the slate clean and installed dev…worked fine after that on first try.
wait, spoke too soon…still carbs undefined. argh
please, anyone…don’t hold back...
glucose.json newer than pumphistory: Refreshed pumphistory
Microbolus var is currently set to:  false
{"carbs":0,"reason":"not enough glucose data to calculate carb absorption"}
{"iob":0.624,"activity":0.0008,"bolussnooze":0.557,"basaliob":-0.11,"netbasalinsulin":-0.3,”hightempinsulin
":0.5,"microBolusInsulin":0.1,"microBolusIOB":0.027,"time":"2017-06-18T05:19:27.000Z","lastBolusTime":1497760704000}
{"delta":1,"glucose":103,"short_avgdelta":1.28,"long_avgdelta":1.6}
{"duration":30,"rate":0.85,"temp":"absolute"}
Basal unchanged: 0.85; target_bg unchanged: 90; sens unchanged: 50
Carb Impact: 1.2 mg/dL per 5m; CI Duration: NaN hours; remaining 4h+ CI: NaN mg/dL per 5m
Accel. Carb Impact: 10 mg/dL per 5m; ACI Duration: NaN hours
UAM Impact: 1.5 mg/dL per 5m; UAM Duration: 0 hours
minPredBG: 78 minIOBPredBG: 78 avgPredBG: 78 COB: undefined carbs: 0
bgUndershoot: 11 zeroTempEffect: 21 carbsReq: NaN
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
{"temp":"absolute","bg":103,"tick":"+1","eventualBG":79,"snoozeBG":121,"insulinReq":0,"reservoir":null,"deliverAt":"2017-06-18T05:20:12.637Z","minPredBG":999,"predBGs":{"IOB":[103,104,105,105,106,106,106,105,105,104,103,102,101,99,98,97,95,94,93,92,90,89,88,87,86,85,84,84,83,82,81,81,80,80,79,79,79,78]},"IOB":0.624,"reason":"COB: undefined, Dev: 7, BGI: -0.2, ISF: 50, Target: 90, minPredBG 78, IOBpredBG 78; Eventual BG 79 < 90, but Min. Delta 1.00 > Exp. Delta 0.3, temp 0.85 ~ req 0.85U/hr. “}
The loop will set temp basals but I’m stumped about this NaN and carbs undefined issue
katie disimone
@Kdisimone
Jun 18 2017 05:46
since this is a conversation of one…apparently the count for glucose needs to be 36 or else you get that message. I’ll PR that in
Scott Leibrand
@scottleibrand
Jun 18 2017 05:49
Sorry, just got home.
@Kdisimone the raw stuff in carb_ratios.json is just some low level debugging that Ben never removed from decocare/openaps. It doesn't do anything.
It's normal to get carbs undefined due to not having enough glucose data to calculate carb absorption for a few hours after doing an oref0-setup using G4-upload. It doesn't pull all the CGM data every time from the receiver, but rather merges it and gradually accumulates it. That is a legacy from the way we had it to try to get openxshareble reliable.
Scott Leibrand
@scottleibrand
Jun 18 2017 05:55
There are some aliases in the myopenaps-cgm-loop directory for pulling all of it if you're impatient, or you can just wait it out.
katie disimone
@Kdisimone
Jun 18 2017 05:57
Thanks @scottleibrand I suppose the good part is that I’ve learned some LOL
Only impatient to learn. Not impatient for the actual loop. Just hate when I don’t see where things are.
so when you get the message about “argument order has changed”…would that mean editing the file in (for example) /usr/local/bin?
Martin Haeberli
@mhaeberli
Jun 18 2017 06:01
@Kdisimone I defer to @scottleibrand but was seeing that in some of my logs and had been advised to ignore...
in my case, with respect to pulling bgs from Nightscout, as I remember ...
katie disimone
@Kdisimone
Jun 18 2017 06:02
Yup, thanks @mhaeberli I found the place in the files that answered that for me.
Martin Haeberli
@mhaeberli
Jun 18 2017 06:02
:+1:
katie disimone
@Kdisimone
Jun 18 2017 06:03
specifically cat /usr/local/bin/oref0-meal has this line
 if (glucose_data.length < 36) {
        console.error("Optional feature meal assist disabled: not enough glucose data to calculate carb absorption; found:", glucose_data.length);
        return console.log('{ "carbs": 0, "reason": "not enough glucose data to calculate carb absorption" }’);
And you can see your glucose_data.length by using openaps ns-meals-carbs
(or at least you can see how many you have in the count if it’s below 36)
Scott Leibrand
@scottleibrand
Jun 18 2017 06:08
@Kdisimone I honestly don't remember where I put that argument order warning. I would search the code base for it, and then look for the alias/report that calls the program that's returning it.
katie disimone
@Kdisimone
Jun 18 2017 06:10
It’s in oref0-meal
 if (typeof basalprofile_data[0].glucose != 'undefined') {
      console.error("Warning: Argument order has changed: please update your oref0-meal device and meal.json report to place carbhistory.json after basalprofile.json");
      var temp = carb_data;
      carb_data = glucose_data;
      glucose_data = basalprofile_data;
      basalprofile_data = temp;
and I was running openaps ns-meals-carbs
BUT…decidedly, I’m still learning my openaps aliases and using them. I still don’t know “where” they are other than finding them (aliases) in openaps.ini. Usually I go to github to try to do my code reading, but I’m lost in there currently for aliases. I’m wondering if that’s because they are in other repos like ben’s and such? Although, I have gotten farther tonight
Those json files have all the aliases and reports that are imported by oref0-setup
Many of the aliases should be refactored into proper bash scripts like oref0-pump-loop. But first we need to retire the openaps pump-loop alias for non-SMBers.
garykidd
@garykidd
Jun 18 2017 08:52
@francesc0-cgm let me know if you resolve your comms error. i seem to have 2 separate issues with with 2 of my 4 rigs.
marafie
@marafie
Jun 18 2017 13:59
@scottleibrand i use model 722 ... i am asking this question for the reason that my kid takes 2 units of lantus .... for the model 722 which I plan to use on my kid if he 2 units over the day approximately 0.08units per hour this dosage will it be given in a single time each hour? Or it would be devided over an hour... my kid sensitivity to insulin is high if he takes 0.1 of insulin it would lower his glucose by 2.5mml/l .... I currently dilute insulin with Silane for correction dosage ... if the 722 pump gives the Basel in a single shout the glucose level will go up and down between each Basel
francesc0-cgm
@francesc0-cgm
Jun 18 2017 15:37
@garykidd now i'm again at home...i'm trying via terminal (yesterday i was trying via ssh app on my android phone and it was a nightmare). Atm no way...always commsexception error
the strange thing is it happened not using it
because last week it worked like a charm
during the week i used loop
then yesterday i got again the rig on and always this error. another explorer board is on the way...hope this week will be dispatched here
light seems to work ok don't know if it is hardware related
checked also pump.ini...but it is ok
rsilvers129
@rsilvers129
Jun 18 2017 15:43
I am compiling bookings Loop and get this error. Anyone know how to get past it?
Screen Shot 2017-06-18 at 11.42.35 AM.png
@thebookins
francesc0-cgm
@francesc0-cgm
Jun 18 2017 15:44
''' Starting supermicrobolus pump-loop at Sun Jun 18 17:35:18 CEST 2017 with 29 second wait_for_silence:
Waiting up to 4 minutes for new BG: glucose.json newer than pump_loop_completed
mmeowlink.exceptions.CommsException: Could not get subg_rfspy state or version. Have you got the right port/device and radio_type?
Listening for 30s silence before maturing: '''
always this error...i could reboot, reset spi or anything else...always this... maturing is mmtuning
francesc0-cgm
@francesc0-cgm
Jun 18 2017 16:02
now trying to get back on master but i have the same commsexceptionerror already on oref0 setup script...in my case i think is an hardware related issue...my explorer board seems gone
on master is stucked on listening......
Diadon81
@Diadon81
Jun 18 2017 18:11
Did you try to restart a pump?
just remove a battery and put it back?
Eric
@ecc1
Jun 18 2017 18:26
The Debian project just released "stretch" as the new stable ("buster" is the new testing). I've been running stretch on my Edisons (by putting stretch in /etc/apt/sources.list and doing apt-get dist-upgrade --purge) for many months without problems (it includes a recent-enough bluez to do BT tethering without having to compile your own). But I don't run the full openaps suite, so YMMV.
francesc0-cgm
@francesc0-cgm
Jun 18 2017 18:36
@Diadon81 loop is full working via riley link...
Matt Pressnall
@logichammer
Jun 18 2017 18:49

@tim2000s , @Aaybob , @PieterGit , @danamlewis , @scottleibrand , @Kdisimone, @applehat : Regarding Pancreable:

Once getting the watch connected to the rig (going RPi now), it seems pretty simple to pass the data to urchin.

I am running into an issue where it is puking on the fact that the CGM data from cgm/cgm-glucose has each of the dates appended like this "display_time": "2017-06-18T11:31:24-07:00", and pukes with:

pbl://JSON/format_urchin_data/urchin-data.json
urchin-data.json  raised  unconverted data remains: -07:00
Traceback (most recent call last):

Which I can run a script over to remove the UTC adjustments but is there a CGM command to do this? Data is coming from iter_glucose_hours and I don't see any command to do it...but I am a newb when it comes to the commands.

Using Marks's sample report of:

# You'll want to generate your own loop summary to show in the status line.
echo '{"message": "loop status at '$(date +%-I:%M%P)': copacetic"}' > urchin-status.json

openaps report add urchin-data.json JSON pbl format_urchin_data \
  monitor/dex-glucose.json \
  # Make sure you've read the CGM display clock earlier in your loop:
  --cgm-clock monitor/dex-clock.json \
  # ...and called whatever generates your loop summary message:
  --status-json urchin-status.json

openaps report invoke urchin-data.json

# Consider making this a report, too
openaps use pbl send_urchin_data urchin-data.json

Seems to work perfectly (barring the -7:00 issue)...I can store all temp data / bonus info via urchin-status.json...I tried using @PieterGit 's:

cd /home/openapsdir
openaps pebble
A=`cat upload/pebble.json | json -a content | fmt -w 900`
cat monitor/pbbl.json | sed -e 's#\(statusText": "\)openaps[^"]*"#\1'"$A"'"#g' > monitor/pbbl2.json
openaps use pbbl send_urchin_data monitor/pbbl2.json

But immediately ran into "hey, You don't have pbbl.json" and I don't know where that would be defined.

Anyone have any reports / alias / scripts I could bum (and document) to feed send_urchin_data? I can definitely hack something together but I promise it will be ugly / inefficient. :)

Tim Street
@tim2000s
Jun 18 2017 18:51
Copy pbbl.json or rename it into pebbl.json. Problem solved.
Matt Pressnall
@logichammer
Jun 18 2017 18:53
Also, are there other predefined fields in urchin-data.json I can use to populate temp basals in a predefined spot on the watch face? What would be the attribute to do that or do you just pass all the info in statusText? Thanks...heading out in a week and looking forward to having this data in the boonies!
Just a naming issue? If it is that, I'm going to whack my head
back in a second with results
Nope...pbbl.json would have different / more data...the resulting file right now look like this:
{"content":"185+1 11:49\n1.6U->118-125\nTmp: 30m@1.3 at 11:49\nReq: 30m@0.9U\nCOB: 0, Dev: 103, BGI: -17.42, ISF: 85, Target: 110; Eventual BG 118 >= 110, temp 0.675<0.9U/hr\nSched: 0.70U/hr\nmealCOB: 0g\ndownstairs\n","refresh_frequency":1}
marafie
@marafie
Jun 18 2017 19:34
Thanks
Scott Leibrand
@scottleibrand
Jun 18 2017 19:34
per @sulkaharo's message there, sounds like the Veo (not sure what model that is) uses a minimum of 0.025u for basals.
Tim Street
@tim2000s
Jun 18 2017 19:34
I can't remember what I did to build it @logichammer It's been a while!
Scott Leibrand
@scottleibrand
Jun 18 2017 19:35
if your 722 has the same minimum, that would mean it would do a 0.08u/hr basal as a 0.025u microbolus roughly every 19 minutes
if its minimum is 0.05u, then that would be 0.05u roughly every 38 minutes
I think the 523/723 has a lower minimum basal rate and bolus amount than the 522/722, so if you can get your hands on a loopable 523/723 that might work better for tiny basals.
cameronrenwick
@cameronrenwick
Jun 18 2017 19:41
smallest basal a 522 will do is 0.05U/hr
marafie
@marafie
Jun 18 2017 19:43
@scottleibrand true .... or I might use diluted insulin in the pump.... I have read a research paper on this that for kids they used it in insulin pumps they had better results in preventing hyperclacima due to the generation of air in the tubing and better insulin delivery
One issue I face with my kid and diluted insulin that the peak is at 2 hours (using diluted apidra )... no idea if with rapid insulin of novo this would be different
And the duration is between 3-3.5 hours
It's a problem when he eats high GI food
So he has to take the insulin 1 hour before
marafie
@marafie
Jun 18 2017 19:51
The model I have had a minimum of 0.05
PieterGit
@PieterGit
Jun 18 2017 19:52
@logichammer : what exactly do you want to accomplish. the script is rather old. In current dev it's enough to change the glucose_history = ../myopenaps-cgm-loop/monitor/glucose-oref0.json (assuming your using G4-upload)
Matt Pressnall
@logichammer
Jun 18 2017 19:56
Good question, @PieterGit! I'd like CGM data and temp basal info to show up on the watchface. I need to pull that glucose-oref0.json report, I don't have it in my current setup but should be easy enough to track down.
PieterGit
@PieterGit
Jun 18 2017 19:58
changing the glucose_history to an unzoned json fixes the problem. you might need to up the minutes=30.0 in the [report "monitor/glucose-oref0.json"] section in myopenaps-cgm-loop/openaps.ini to 90.0 or 120.0
that shows the cgm history (but not the temp_basal's
the default file for dev and CGM=G4-upload point to a non existing file. You could also symlink that file
Matt Pressnall
@logichammer
Jun 18 2017 20:39
lazy man approach: sed 's/-07:00//g' cgm-glucose.json > localized-cgm-glcose.json :)
Matt Pressnall
@logichammer
Jun 18 2017 20:46
Possible to get pump temp basals to show on the watchface as a graph? Stymied. I see an attribute called graphExtra that takes an array of numeric values but mine is currently all zeros. This is for Pancreabble / offline mode.
Looking in urchin-data.json
PieterGit
@PieterGit
Jun 18 2017 21:30
i never got temp basals to show. It should be possible, because the urchin watch app can do it, but I don't know how.
i noticed https://github.com/mddub/urchin-cgm/search?utf8=%E2%9C%93&q=temp&type= so you might need to add a tempBasal array
fidoman
@efidoman
Jun 18 2017 21:57
Had to change out both the enlite sensor and the pump cartridge/site today so I decided to rotate to one of my backup pumps (522). The process was smooth. Copied the settings from one pump to the other including the sensor id. Then edited run-again to put in the 522 serial number. Run-again and just waited an hour before I looked at anything. It's all working great. I'm on the latest dev pull. Thinking it may be a good idea to rotate through my backup pumps to make sure they each are in good working order and get some battery time every now and then.
Scott Leibrand
@scottleibrand
Jun 18 2017 22:36
@marafie I'm not sure if I follow you. Do you see shorter DIA with diluted insulin, or longer?
marafie
@marafie
Jun 18 2017 22:39
With diluted insulin I do have longer duration 3-4 hours the insulin is active and the peak is at after 2.0 hours ... DIA stands for ?
Scott Leibrand
@scottleibrand
Jun 18 2017 22:47
That seems backwards. More dilute insulin should be more readily absorbed by the subcutaneous blood vessels and should have a shorter DIA (duration of insulin action).
How thoroughly have you measured insulin activity with the regular concentration and with it diluted? Do you have any sense of why you're seeing that?
Or are you comparing different insulins, not just different concentrations/dilutions of the same insulin?
garykidd
@garykidd
Jun 18 2017 22:55
@francesc0-cgm will do some more testing but my inclination is that the issue relates to the explorer board and not the edison module...but as I've said, the latest explorer board (within a month or so) has the issue.
marafie
@marafie
Jun 18 2017 23:40
I am comparing normal apidra with diluted apidra 1 ml part of apidra with 9 ml normal silane so the 1 unit is 0.1 apidra ...... what I have seen is the the absorption might take longer time ...... and the peak is delayed .... I was unable to get any research that covers the DIA and shelf life ...... I do change the diluted insulin every 2-3 weeks .... in the research I have read that they use diluted insulin in insulin pumps didn't mention other than the insulin should be replaced each 3 days which is the case of normal use..... one day the DIA toke almost 4.5 hours .....
@scottleibrand 👆🏻
Honestly before using the diluted insulin on on my kid I used it for 5 days .... my response was normal ... no why was this with my kid
I have to change the dexcom sensor each 6 days with my kid ... while I use it for 16 days
Mybe it's something related to his age
Scott Leibrand
@scottleibrand
Jun 18 2017 23:46
@marafie so you're saying if you dose 0.1U of regular-concentration U100 apidra, you get an activity peak closer to 1 hour, but if you dose 0.1U of U10 diluted apidra (10x the volume), you get an activity peak closer to 2 hours?
marafie
@marafie
Jun 18 2017 23:50
No the 2nd part is if 1 U of U10/ml goes to 2 hours....... I use BD 0.3 cm injectors so the minimum is 0.5 which I can give in it
Scott Leibrand
@scottleibrand
Jun 18 2017 23:58
I'm trying to compare the insulin action speed enough U100 to lower BG by (say) 40mg/dL to the insulin action speed of enough U10 to lower BG by the same 40mg/dL (10x as much liquid, but the same quantity of insulin)