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

16th
Sep 2018
rsilvers129
@rsilvers129
Sep 16 2018 03:42
I had a big swell from 80 grams of peanut butter. And I am convinced it is because it was 40 grams of fat. The research papers I have cited in the past show that people need additional insulin for high fat meals. A big step to be able to eat anything that we want is to have a way to enter grams of fat and then get it treated as delayed carb. With OpenAPS, the way to do that would probablt be an IFTTT button, and then for OpenAPS to spread it over 5-8 hours. And in fact, it could be done with just an external app that would send carb data to Nightscout with future times so it would not even need any code changes to OpenAPS. I have run the forumas from the research papers, and it generally works out to people needing almost 90% of fat to be treated like carb on high-fat meals.
If anyone is interested, you can try that XLS sheet.
In summary, if I just took insulin for the peanut butter based on the carbs-fiber, I would need 1.8 units. But the research paper says I need another 4.4 units added over 8 hours. And that holds true in my testing. Both OpenAPS and Loop would take a big leap in ability if this were added.
Jeremy Cunningham
@jpcunningh
Sep 16 2018 04:58
I just found that PR #1111 doesn't really help if the rig reboots during refreshing the pump settings.
Does it make sense to extend refresh_old_profile to check to for valid data in the other pump settings files like insulin_sensitivites.json, basal_profile.json, settings.json, carb_ratios.json, etc?
I can work on it tomorrow, but curious if anybody knows a better way or place to identify when we have invalid files for some reason and need to call get_settings again to recover.
philipgo
@philipgo
Sep 16 2018 05:31
@rsilvers129 AndroidAPS can do exactly that, it has „extended carbs“. AndroidAPS can be used as Nightscout client while looping with OpenAPS.
rsilvers129
@rsilvers129
Sep 16 2018 05:33
Nice but to really be what I am saying, it would need a fat entry button that does the formula from the paper.

I am testing one possible solution. I created a solution for OpenAps. It will work for Loop also if IFTTT or Stringify can add carbs to Apple Health.

I made an IFTTTT button called “Carb 30”. When I press it, it triggers a Stringify Flow that waits two hours and then logs 4 grams of carb in NightScout. It then waits an hour and logs another 4. It repeats these delays and logging until it has dispensed 6 doses.

I will make buttons for Fat 15, and 5 too.

I am testing it now with sending 1 carb instead of 4 for the test period.

boc-the-git
@boc-the-git
Sep 16 2018 08:58
I can confirm token based auth was the cause of my BG data not getting uploaded to NS. I've switched to API_SECRET about half an hour ago, and the data is getting on there.
@ecc1 you mentioned someone is working on getting the token auth resolved, is there an issue for that I can follow?
Matt Kupisz
@rumil
Sep 16 2018 09:36
@rsilvers129 at least here in Poland it’s a normal recommendation (and what you get taught when you get diabetes) to include fat and protein (in a form of square bolus) in your meal dosage (for a pump therapy). So many people here use the method you quoted.
From what I know (but I’m really not an expert) a current starting point recommendation is to calculate:
  • sqare bolus duration: Fat Protein Units +2h
  • dosage: for kids you count each Fat Protein Unit as Carbs Unit (for us 1 Carb Unit = 10g of carbs), for adults you give 50% less insulin for square bolus
rsilvers129
@rsilvers129
Sep 16 2018 12:26
Great. It is obvious from the research that this is a thing and also people want to eat pizza and have trouble with it. It is solved. I tested it and it did allow me to eat half of a large sausage pizza.
I was able to trigger a series of timed hourly carb pulses with a 2 hour delay last night.
Eric
@ecc1
Sep 16 2018 13:23
@BOC14 here's the token auth pr: ecc1/nightscout#4
Please check with @PieterGit about testing it when he's ready
Scott Leibrand
@scottleibrand
Sep 16 2018 13:41
@rsilvers129 what happens if you enter the carb equivalents up front, but don’t bolus for them (and possibly reduce the meal bolus) to let SMB dose as needed?
If SMB ends up being too aggressive with up front carb equivalents even with no initial meal bolus, what happens if you have IFTTT enter all the future-dated carb equivalents at the time of the meal? Does oref0 properly ignore the extended carb entries in the future, until the clock gets to that time?
alimhassam
@alimhassam
Sep 16 2018 14:13
@ecc1 i've been running your v2018.09.12 medtronic pre-release for 2 days sucessfully. I haven't tried to test the actual bug @philipgo had with first page being ignored, but the rest works well for me for normal looping.
Scott Leibrand
@scottleibrand
Sep 16 2018 14:39
Are you using the new ID field yet?
rsilvers129
@rsilvers129
Sep 16 2018 14:53
@scottleibrand The only way I have tried it was to see if UAM would handle it, but felt like it wasn’t. Not sure I have tried entering the fat as carb up front. I probably need to eat 5 pizzas each way and compare the results. Is your feeling that the result will be about the same?
It might be since I am not actually dosing but just logging the carb.
But won’t it decay the carbs too fast thinking they are actual carb instead of fat?
rsilvers129
@rsilvers129
Sep 16 2018 14:58
I bet it will. Which means having the entries sent over every hour for 6 hours may solve that decay issue.
Scott Leibrand
@scottleibrand
Sep 16 2018 14:59
No, it will look for the total BG rise matching what is predicted from your carb entry.
The only reason for it to go faster than that is for min_5m_carbimpact.
If you see absorption slower than that (8 mg/dL/5m) in the logs, you can lower it. Although if it’s that low, UAM should be fine too.
As long as it’s a mixed meal like pizza, it should work fine to enter everything up front. It will extend the timeframe over which absorption is expected to match actual absorption after it starts.
Zach Gohr
@zgohr
Sep 16 2018 15:45
@scottleibrand @rsilvers129 I second this. I have min_5m_carbimpact lowered quite a bit and one issue is that even so, the carbs are calculated absorbed by the time the rise happens and if there are no cob or low temp we have SMBs disabled. Sometimes I feel as though some people are coming from different worlds when talking about this stuff, as there’s also the possibility fiasp or 50/50 mix might have a big enough impact that this issue significantly goes away. @rsilvers129 are you using any fiasp?
Scott Leibrand
@scottleibrand
Sep 16 2018 15:54
If carbs absorb too early without min_5m_carbimpact, then by definition either your settings are wrong (probably CR) or you’re not entering enough carb (equivalent).
Scott Leibrand
@scottleibrand
Sep 16 2018 16:05
But I agree that Fiasp or a mix makes it way easier (if it works for you) for a closed loop to deal with meals of any sort.
Zach Gohr
@zgohr
Sep 16 2018 16:08
We’ve tried screwing with CR but hormones (dawn effect and such) are a fickle beast
Scott Leibrand
@scottleibrand
Sep 16 2018 16:14
Yeah. UAM should also help when your basals or ratios for a given meal don’t match your averages. But it’s impossible to predict perfectly.
rsilvers129
@rsilvers129
Sep 16 2018 17:24
I am using only FIAsp
I have never really had luck with UAM. At least that is my impression without formal testing.
Scott Leibrand
@scottleibrand
Sep 16 2018 17:25
How are you using it?
The best way to use UAM is to leave the feature on, but still announce your meals.
That way it acts as a more informed second opinion to the COB calculations and can adjust when the announced carbs are insufficient to cover the meal rise, or vice versa.
rsilvers129
@rsilvers129
Sep 16 2018 17:58
I always announce my meals (I would never eat and do nothing), but if I am going high, I took that to mean that I didn’t log as much carb and/or fat as I actually ate. But since I was not automatically brought down enough automatically, I took that to mean that UAM was not working for me. I think we had a conversation before where you felt that the UAM code would automatically deal with the need for extra insulin needed for fat, but that didn’t work out for me. I would just rise and rise and there would be strings of SMBs but I would be high for 10-12 hours. But actually, the same may happen with these hourly carb logs I am doing since it is not just giving insulin unless it thinks that it should.
rsilvers129
@rsilvers129
Sep 16 2018 18:06

"If you see absorption slower than that (8 mg/dL/5m) in the logs, you can lower it.”

Which log and what do I grep for?

Scott Leibrand
@scottleibrand
Sep 16 2018 18:07
look for carb impact or CI in pump-loop.log
rsilvers129
@rsilvers129
Sep 16 2018 18:14
Some low and some high
Right now I am in the 160 range and digesting pulled pork with some fat, and it is giving numbers in the 5.8-14 range
Scott Leibrand
@scottleibrand
Sep 16 2018 18:28
Anything below 8 will be bumped up to 8 for COB decay purposes.
marafie
@marafie
Sep 16 2018 21:10
Hello any idea how can I solve this error?
Continue? y/[N] y
Removing any existing git in /root/myopenaps/.git
Removed any existing git
Checking openaps 0.2.1 installation with --nogit support
openaps 0.2.1-dev
Checking /root/myopenaps: mkdir: cannot create directory '/root/myopenaps': File exists
/root/myopenaps initialized
/root/src/oref0/ already exists; pulling latest
Updating 6b75999..1eb3b76
error: Your local changes to the following files would be overwritten by merge:
bin/oref0-bash-common-functions.sh
Please commit your changes or stash them before you merge.
Aborting
Couldn't pull latest oref0
root@raspberrypi:~#
Dana Lewis
@danamlewis
Sep 16 2018 21:17
Git stash
Then run it again
philipgo
@philipgo
Sep 16 2018 21:23
@alimhassam My problem with the first pump history page was solved by Eric‘s fix
marafie
@marafie
Sep 16 2018 21:32
@danamlewis root@raspberrypi:~# git stash
fatal: Not a git repository (or any of the p
(or any of the parent directories): .git
Kim St. Dennis
@kimstdennis_twitter
Sep 16 2018 23:12
Hello again old friends. I'm helping a neighbor (i have Lada neighbors! kinda cool, I'm a diabetic nerd) set up a rig and am running into some oddness with getting the heroku/mlad stuff set up. Where's the best place to seek guidiance on issues with NS?
alimhassam
@alimhassam
Sep 16 2018 23:47
great @philipgo @ecc1 i guess that probably gives enough testing to make this a real release?