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

15th
Oct 2017
ZandMarc
@ZandMarc
Oct 15 2017 00:01
@danamlewis I found the file that causes my Autotune to fail. It's ~/myopenaps/autotune/profile.json In that file the DIA is set at 2. But when I change that to 6 and run Autotune again, this value is changed again to 2. Something oref0-autotune-prep does, causes this change, but I can't make out what. (maybe also because it's the middle of the night here :-) )
Dana Lewis
@danamlewis
Oct 15 2017 00:01
@YYCMichael you're using Libre, correct? What kind of uploaded?
@ZandMarc weird! Need to find where it's pulling a 2 from...theres probably a pump.profile.json
Maybe in the morning perhaps 🤣 if you don't want to keep digging for now
ZandMarc
@ZandMarc
Oct 15 2017 00:05
there is profile.pump.json in the autotune directory. that one has a correct dia of 6
Deweyoxberg
@Deweyoxberg
Oct 15 2017 00:13
@danamlewis : Libre Alarm, with xDrip uploading. I now have 96 entries in mLab like that where the data is flat out wrong.
ZandMarc
@ZandMarc
Oct 15 2017 00:15
@danamlewis fixed it! the profile.json in the autotune folder gets it's values from the autotune.json file in settings. There, the dia was set at 2. Changing that value there fixed it. Only question left is where the dia:2 in the autotune.json came from. Must have something to do with the installation of dev, I think, because before that Autotune worked fine.
Paul Dickens
@thebookins
Oct 15 2017 00:19
Anyone seen Cannot find module 'normalize-package-data' before on running oref0-setup.sh?
The error trace looks like this:
Dana Lewis
@danamlewis
Oct 15 2017 00:19
@ZandMarc you could try re-installing dev and see if the problem recreates itself again - that would be helpful to knowing if it's universal vs a weird one off install bork
Paul Dickens
@thebookins
Oct 15 2017 00:20
Error: Cannot find module 'normalize-package-data'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/root/src/oref0/node_modules/read-pkg/index.js:4:28)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
Could not run oref0-get-profile
Dana Lewis
@danamlewis
Oct 15 2017 00:20
@YYCMichael I don't think there's too many people using that, so I'd maybe ask around some of the Libre uploader or xdrip+ groups
@ZandMarc (sleep now ;), install again tomorrow and let us know if it recreates)
ZandMarc
@ZandMarc
Oct 15 2017 00:22
:smile:
I will (both sleep and re install tomorrow) :smile:
Dana Lewis
@danamlewis
Oct 15 2017 00:24
sounds good
Scott Leibrand
@scottleibrand
Oct 15 2017 00:25
@ZandMarc I suspect you had DIA set to 2 once upon a time back when you first ran autotune, and it never got updated. per openaps/oref0#708 autotune doesn't seem to update its profile correctly when you change it. if you can provide any input to that issue to help solve it, that would be appreciated.
one method to test would be to mv your ~/myopenaps directory to a backup location, reinstall oref0, run autotune, and then change your settings and run autotune again to see if it picks up the changes correctly
jaylagorio
@jaylagorio
Oct 15 2017 00:29
image.png
@hartvig Like this!
Paul Dickens
@thebookins
Oct 15 2017 00:42
re my error with oref0-setup.sh ^^^
I think the root cause is an error at npm run global-install
when I run that I get an error like the following:
npm ERR! EXDEV: cross-device link not permitted, rename '/home/.rootfs/usr/lib/node_modules/.staging/aws-sign2-13a73de6' -> '/home/.rootfs/usr/lib/node_modules/oref0/node_modules/aws-sign2'
Any ideas?
garykidd
@garykidd
Oct 15 2017 00:49
@danamlewis thanks....I like gitter.im ...has the group ever considered another service...I just wish gitter was better about searching historical posts efficiently...maybe there is..not on my browser anyway...thx
Paul Dickens
@thebookins
Oct 15 2017 01:28
FYI looks like I've got past the oref0-setup.sh error - cloning the oref0 repo afresh looks to have fixed it
garykidd
@garykidd
Oct 15 2017 03:40
A
@jaylagorio echo Charlie bravo. We're under heavy fire. Send reinforcements. Over.
garykidd
@garykidd
Oct 15 2017 06:22
@scottleibrand was just wondering of SMB mins max could be increased solely if BG exceeded a threshold..just a thought
quick observation....I fully adopted autine recommendation...,,,my adjustments to basal totally flattened...pretty f'in cool
thx
Scott Leibrand
@scottleibrand
Oct 15 2017 06:41
@garykidd we see the need for big SMBs when you first enter carbs, not once BG has already risen.
garykidd
@garykidd
Oct 15 2017 06:42
fair point
Tore Bjørndalen
@BjoTore_twitter
Oct 15 2017 06:46
My rig stopped during the night due to low battery(wasn't charging properly) . What options do I have for alarming? Using Xdrip+/G5/Edison/M523
garykidd
@garykidd
Oct 15 2017 06:48
hmmm I think we may be talking past one another ...sometimes I feel uncontrollable need to eat before BG is back in line..that's actually an area of personal development that I can work on.....notwithstanding the need to act quickly across the range of starting BG's...it still could make sense to wack wider excursions harder....not saying you're wrong...
Andrew Warrington
@andrew-warrington
Oct 15 2017 07:00
Hi all, have been using SMB + AMA since Friday night. Loving it; it was the missing piece for me. I had one experience yesterday which I wanted to consult about though: SMBs enacted while glucose was descending, in advance of a light hypo (it was light because I compensated with carb before it got serious). Here is a screenshot. I can also pull up the pump-loop.log and get the decision data out...
Capture.JPG
I was not engaged in any activity other than some light walking around... i.e. I drove to a grocery story, got some things, came back, and had a power nap (during which the low started)
Andrew Warrington
@andrew-warrington
Oct 15 2017 07:10
I am wondering whether a safety rule would be worthwhile: No SMB while avgdelta is negative (short or long). In the first decision, short delta was negative and long delta was positive. By the second decision, both short and long delta were negative.
Velibor Maric
@vebaba
Oct 15 2017 08:57
I'm constantly have future records from pump in NS. After I delete it, Rig uploads same stuff again. What should I do? I'm always missing Carbs data in NS...
Niels Hartvig
@hartvig
Oct 15 2017 09:12
@vebaba if you find a solution, I'd love to know. We have the same issue. Checked dates on pump, ns site and edison and they're all in sync.
Velibor Maric
@vebaba
Oct 15 2017 09:19
@hartvig Maybe our Euro settings of date, time etc. has something to do with problem?
Velibor Maric
@vebaba
Oct 15 2017 10:30

My autotune stopped to work, I believe. Command cat autotune_recomm* gives me output with no entries in it. Just table.
I tried to see content of yesterday's autotune log with command cat autotune.2017-10-15-000504.log and it gave me long list of data. Here are the last lines...

1 mealCOB: 0.0 mealCarbs: 180 basalBGI: 6.4 BGI: -9.2 IOB: 1.5 at 23:44:44 dev: 4.65 avgDelta: -4.50 csf
1 mealCOB: 0.0 mealCarbs: 180 basalBGI: 6.4 BGI: -9.0 IOB: 1.3 at 23:49:44 dev: 6.53 avgDelta: -2.50 csf
1 mealCOB: 0.0 mealCarbs: 180 basalBGI: 6.4 BGI: -8.9 IOB: 1.2 at 23:54:45 dev: 7.66 avgDelta: -1.25 csf
oref0-autotune-core autotune.1.2017-10-14.json profile.json profile.pump.json > newprofile.1.2017-10-14.json
Could not parse input data:  [SyntaxError: Unexpected end of input]

Autotune pump profile recommendations:
---------------------------------------------------------
Recommendations Log File: /root/myopenaps/autotune/autotune_recommendations.log

/usr/local/bin/oref0-autotune-recommends-report: line 22: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory
jq: error: Cannot iterate over null
jq: error: Cannot iterate over null
/usr/local/bin/oref0-autotune-recommends-report: line 71: printf: null: invalid number
/usr/local/bin/oref0-autotune-recommends-report: line 72: [: !=: unary operator expected
/usr/local/bin/oref0-autotune-recommends-report: line 75: printf: null: invalid number
/usr/local/bin/oref0-autotune-recommends-report: line 77: printf: null: invalid number
Parameter      | Current  | Autotune
-------------------------------------
ISF [mg/dL/U]  | 0.000    | 0.000
CSF [mg/dL/g]  | n/a      | 0.000
Carb Ratio [g] | 0.000    | 0.000
Basal Profile  [unit/hour]| -        |

Can I do anything to fix it?

jquitos
@jquitos
Oct 15 2017 13:06
When updating to add smb or uam it asks if i would like to setup BT tethering for later. From reading the docs it states that BT remains unchanged? So do I just need to answer no?
philipgo
@philipgo
Oct 15 2017 13:35
@jquitos Just answer yes, this adds the relevant lines to your crontab. The pairing you did before remains untouched and does not have to be repeated.
jquitos
@jquitos
Oct 15 2017 14:16
Thanks @drnoname82
sdneufer
@sdneufer
Oct 15 2017 15:01
@BjoTore_twitter if you are using heruko and nightscout, do you have OPENAPS_WARN and OPENAPS_URGENT settings? I then run the nightscout iPhone app with screen lock override on at night.
jaylagorio
@jaylagorio
Oct 15 2017 15:43
@scottleibrand I don't remember if I asked this, but does oref0 have access to the current BG when it's filling in the notes field on an microbolus? If so could that be added to the notes when it does one?
Sorry if that's a repeat question!
Scott Leibrand
@scottleibrand
Oct 15 2017 16:54
@jaylagorio Yes it does. I haven't tried it, but should be a fairly easy thing for you to add/test and see if it ends up propagating all the way through pumphistory to NS. It's in determine-basal.js.
jaylagorio
@jaylagorio
Oct 15 2017 16:55
OK! And is the oref0-ns-loop branch about adding logging to the NS loop? Or for something else?
Scott Leibrand
@scottleibrand
Oct 15 2017 16:55
@garykidd if you have a screenshot of a specific instance where you think it should've done something different, please post it so we can discuss, like @andrew-warrington did.
@andrew-warrington you should enable devicestaus_advanced in your NS so we can see what IOB, COB, and purple prediction lines were on retrospective lookback.
@jaylagorio correct. It's working and testable as of last night. I have it running on some of our rigs
jaylagorio
@jaylagorio
Oct 15 2017 16:59
Is there a command for it? Like cgmloop-log?
Scott Leibrand
@scottleibrand
Oct 15 2017 17:00
@andrew-warrington but from the looks of the temp basals surrounding those SMBs, it doesn't look like there was any indication of there being too much insulin: it would've had plenty of time to zero temp if so. Will need to see the additional data to take a guess at whether any settings were off...
Avoiding the SMBs in that situation probably wouldn't have helped much, as it would've just high temped instead, and the temps would've had plenty of time to get IOB to the same level the SMBs did.
@jaylagorio I use Control-R to search my bash history for ns-loop.log, so dunno.
cameronrenwick
@cameronrenwick
Oct 15 2017 17:17
so dunno if others have been faced with clearing out some data from mlab; I had to do so yesterday. Having done this and donated my data to openhumans, next time I think I will donate old data but leave some intact. I have to say that since I donated, it's kinda like NS had to relearn about me. Not sure if this is just my impression or not but I had a roller coaster day from a BG point of view. I'd advise keeping perhaps the most recent month of data when you opt to purge your database.. wondering if others had similar results. Fortunately today I'm a smooth green line... and that's a good thing!
Dana Lewis
@danamlewis
Oct 15 2017 17:19
I think that a human imagination stretch to rationalize a bad day. NS data doesn't effect anything, unless you suddenly want to run Autotune on a month of data not there (but doesn't effect if you've been running Autotune on your rig nightly). Glad today's better!
cameronrenwick
@cameronrenwick
Oct 15 2017 17:21
awh shucks... ok so maybe that'll be my "bad" day for the year!
Dana Lewis
@danamlewis
Oct 15 2017 17:21
🤞🏼
jaylagorio
@jaylagorio
Oct 15 2017 17:28
@scottleibrand Is there a way to stop ns-upload from blocking when the JSON to upload consists of an empty array?
Scott Leibrand
@scottleibrand
Oct 15 2017 17:46
In the openaps alias or oref0-ns-loop?
jaylagorio
@jaylagorio
Oct 15 2017 17:46
Nevermind, I went a different direction
In the G5 uploader script I'm working on
Scott Leibrand
@scottleibrand
Oct 15 2017 17:47
Ah
jaylagorio
@jaylagorio
Oct 15 2017 18:03
Now my problem is that cron won't run my script. Running it in place in my openaps directory works great, but cron's not kicking it off for some reason
* * * * * cd /root/openaps && oref0-upload-entries
That looks right to you, right?
Scott Leibrand
@scottleibrand
Oct 15 2017 18:11
did you add it to package.json and npm run global-install to install it?
that probably should be /root/myopenaps
jaylagorio
@jaylagorio
Oct 15 2017 18:11
I just put it in /usr/local/bin, does that not work?
My OpenAPS directory happens to be openaps, not myopenaps
Scott Leibrand
@scottleibrand
Oct 15 2017 18:14
I would strongly recommend you reinstall using the standard directory name
there are things that will break otherwise
putting it in package.json and running npm run global-install will symlink it from /usr/local/bin so you can make updates to it and they'll take immediate effect
jaylagorio
@jaylagorio
Oct 15 2017 18:22
I haven't noticed anything breaking and I think I've been running it this way since I started, but I can do that once I do my next pull.
Scott Leibrand
@scottleibrand
Oct 15 2017 18:31
yeah, originally we supported arbitrary directory names, but I've now stopped trying to make sure that works, so unless someone else wants to test and fix it for non-standard directory names, new stuff will only be tested on ~/myopenaps/
garykidd
@garykidd
Oct 15 2017 18:40
@scottleibrand my question was more theoretical in that...might it be worthwhile to consider more aggressive response when you are significantly out of range...especially if you might be running with a more conservative setup,,,,So, just to be clear I am not suggesting that anything is'nt already working correctly/well. I do recognize that a well tuned system should hopefully thwart these situations by administering enough of a response sooner (really the xrux of an Super Bolus or SMB)....but inevitably these situations will probably happen.
Scott Leibrand
@scottleibrand
Oct 15 2017 18:44
there are some improvements in that direction in openaps/oref0#714
with that branch, if your BG is high enough that you have plenty of time to zero-temp and flatten out well above target, it allows oref0 to be more aggressive at bringing the high BG down faster, with what amounts to a super bolus
so sounds like you're thinking along the same lines I am. :)
jaylagorio
@jaylagorio
Oct 15 2017 19:23
@scottleibrand PR in for G5-upload! openaps/oref0#718
jaylagorio
@jaylagorio
Oct 15 2017 19:48
@scottleibrand So I see in https://github.com/openaps/oref0/blob/master/lib/determine-basal/determine-basal.js where it uses tempBasalFunctions to set temps, but I'm not quite finding where it does SMBs...
Martin Haeberli
@mhaeberli
Oct 15 2017 19:50
q re recommended practice for activity without pump. on the one hand, for a shower, set pump temp basal to 0; suspend pump. at end of shower, resume pump (openaps will then set basal?) (assuming in range at shower start). but let’s say for a sports activity (horseback riding) - anticipating an hour or two without pump. on the one hand, activity likely will decrease BGs; on the other, zero temp basal because no pump for 120 minutes may be unwise. So is there a middle ground? like pre-bolus for 1/2 of anticipated missed basal?, then zero temp basal, suspend; at end, resume?
Dana Lewis
@danamlewis
Oct 15 2017 19:52
@mhaeberli have you read about the new exercise mode?
Previously, your last comment is what many people might do.
Martin Haeberli
@mhaeberli
Oct 15 2017 19:52
no - ok, time to RTFD.
Dana Lewis
@danamlewis
Oct 15 2017 19:53
Now with looping, and with exercise mode being tested in dev, that may be best for many people to set exercise mode X minutes before and during exercise
It's in the dev Pr
Martin Haeberli
@mhaeberli
Oct 15 2017 19:53
thx - but I assume exercise mode itself may not be able to do much when pump purposely disconnected ...
i’ll go look at dev
Dana Lewis
@danamlewis
Oct 15 2017 19:54
No, but point is you may no longer need/want to fully disconnect
Martin Haeberli
@mhaeberli
Oct 15 2017 19:54
k
Velibor Maric
@vebaba
Oct 15 2017 20:00
@scottleibrand Should I leave my 'case' of missing autotune_recommendation.log file as-was? Am I safe w/o it?
Thacher
@thacherT1D
Oct 15 2017 20:13
Hey -- so I was reading the docs, but I don't quite understand the best way to get alarms -- I'm not worried about the High/Low alarms, as much as the diconnected and battery alarms, at night I can leave the iPad unlocked/open (and I'm on my home wifi and can be plugged in), but daily I can't leave my phone unlocked all the time... is it the pebble that you can use to see all the nightscout stats/get the alarms? are there other ways that I'm not seeing/finding?
Dana Lewis
@danamlewis
Oct 15 2017 20:14
Check out the Nightscout docs for setting up pushover to your phone for bg and not looping alarms @thacherT1D
jaylagorio
@jaylagorio
Oct 15 2017 20:15
Ah, I was looking for a function call. Thanks!
Scott Leibrand
@scottleibrand
Oct 15 2017 20:15
@vebaba I think I missed your original question: can you repeat?
Velibor Maric
@vebaba
Oct 15 2017 20:15

My autotune stopped to work, I believe. Command cat autotune_recomm* gives me output with no entries in it. Just table.
I tried to see content of yesterday's autotune log with command cat autotune.2017-10-15-000504.log and it gave me long list of data. Here are the last lines...

1 mealCOB: 0.0 mealCarbs: 180 basalBGI: 6.4 BGI: -9.2 IOB: 1.5 at 23:44:44 dev: 4.65 avgDelta: -4.50 csf
1 mealCOB: 0.0 mealCarbs: 180 basalBGI: 6.4 BGI: -9.0 IOB: 1.3 at 23:49:44 dev: 6.53 avgDelta: -2.50 csf
1 mealCOB: 0.0 mealCarbs: 180 basalBGI: 6.4 BGI: -8.9 IOB: 1.2 at 23:54:45 dev: 7.66 avgDelta: -1.25 csf
oref0-autotune-core autotune.1.2017-10-14.json profile.json profile.pump.json > newprofile.1.2017-10-14.json
Could not parse input data:  [SyntaxError: Unexpected end of input]

Autotune pump profile recommendations:
---------------------------------------------------------
Recommendations Log File: /root/myopenaps/autotune/autotune_recommendations.log

/usr/local/bin/oref0-autotune-recommends-report: line 22: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory
jq: error: Cannot iterate over null
jq: error: Cannot iterate over null
/usr/local/bin/oref0-autotune-recommends-report: line 71: printf: null: invalid number
/usr/local/bin/oref0-autotune-recommends-report: line 72: [: !=: unary operator expected
/usr/local/bin/oref0-autotune-recommends-report: line 75: printf: null: invalid number
/usr/local/bin/oref0-autotune-recommends-report: line 77: printf: null: invalid number
Parameter      | Current  | Autotune
-------------------------------------
ISF [mg/dL/U]  | 0.000    | 0.000
CSF [mg/dL/g]  | n/a      | 0.000
Carb Ratio [g] | 0.000    | 0.000
Basal Profile  [unit/hour]| -        |

Can I do anything to fix it?

Scott Leibrand
@scottleibrand
Oct 15 2017 20:16
@jaylagorio there's probably a lot of stuff that should be refactored into functions, but we just haven't gotten around to doing so
@vebaba
oref0-autotune-core autotune.1.2017-10-14.json profile.json profile.pump.json > newprofile.1.2017-10-14.json
Could not parse input data:  [SyntaxError: Unexpected end of input]
I would check those input files and see which one is truncated
Velibor Maric
@vebaba
Oct 15 2017 20:17
can you tell me how to do it?
Scott Leibrand
@scottleibrand
Oct 15 2017 20:18
you can look at files using commands like cat or less - Google if you need more specific usage examples
Velibor Maric
@vebaba
Oct 15 2017 20:19
OK, I will do that. Thanks. Looking for cutoff data
Scott Leibrand
@scottleibrand
Oct 15 2017 20:20
you can also do something like cat file.json | jq . to validate that the input files are valid json - there is an example in the docs for doing that with the files you edited yourself, but it will work with any of them
the | operator takes the output of one command and passes it to the next one
Tore Bjørndalen
@BjoTore_twitter
Oct 15 2017 20:21
@sdneufer thx , yes I have those set in heroku. What alarm enabling do I need to do in NS?
Scott Leibrand
@scottleibrand
Oct 15 2017 20:21
jq . takes the passed input and prints it out (if it's valid json). you can add a -c or -C to modify the output if you want it to look different
sdneufer
@sdneufer
Oct 15 2017 20:23
@BjoTore_twitter Do you have the nightscout site open in a browser or the app on an iphone? Those variables cause the alarm, so you just have to have something open that will play it. I have been assuming it is the edison rig that is not charging and xdrip will not know about that.
Velibor Maric
@vebaba
Oct 15 2017 20:24
@scottleibrand profile.json is empty and profile.pump.json contains only
  "error": "Could not parse input data"
}
Thacher
@thacherT1D
Oct 15 2017 20:33
@danamlewis I'm looking for just looping alarms, is that the way to set those up too, but with the openAPS variables? Sorry to be dense about this
Dana Lewis
@danamlewis
Oct 15 2017 20:35
Yes. Use pushover and set it up to do whatever alarms you want. But those alarms will come from NS, not from the rig. So the NS instructions have the basic pushover setup instructions. And you can choose to select whatever alarms or alerts you want to then send to your phone via the pushover app
Tore Bjørndalen
@BjoTore_twitter
Oct 15 2017 20:46
@sdneufer I have not currently enabled any alarms in NS, Xdrip gives high/low alarms for BG. I'm on android and can enable NS to give notifications at night.
Scott Leibrand
@scottleibrand
Oct 15 2017 20:47
@vebaba ok, you need to re-run the commands that generated those files. are you looping with a rig, or doing this one-off on a VM / computer?
there are directions in the OpenAPS docs for how to "drill down" and run openaps reports manually
Velibor Maric
@vebaba
Oct 15 2017 20:48
I'm looping with edison, started on 12Oct
Scott Leibrand
@scottleibrand
Oct 15 2017 20:49
alternatively, you can check all of your input files, including preferences.json, to make sure they're valid json
Velibor Maric
@vebaba
Oct 15 2017 20:49
well, TBH, I'm not even sure what's valid json (I imagine that that's java file with correct structure)
I have will to learn and be of help but I don't know where to start
Scott Leibrand
@scottleibrand
Oct 15 2017 20:50
see my note earlier about using | jq . to validate your json
Velibor Maric
@vebaba
Oct 15 2017 20:51
I did. I have nice output using it. I found this https://stedolan.github.io/jq/manual/ too
Scott Leibrand
@scottleibrand
Oct 15 2017 20:52
did you validate your preferences.json the same way yet?
Velibor Maric
@vebaba
Oct 15 2017 20:52
I think that problem are profile.json and profile.pump.json as they don't contain any data
Scott Leibrand
@scottleibrand
Oct 15 2017 20:52
yeah, and the most common cause of that is preferences.json being messed up
sdneufer
@sdneufer
Oct 15 2017 20:53
@BjoTore_twitter Perhaps you should use pushover as Dana described around 20 minutes ago. You can run the pushover app on your phone and have it alarm for missing readings that openaps has, while xdrip will alarm for bg's.
Velibor Maric
@vebaba
Oct 15 2017 20:53
@scottleibrand It seems fine to me
Scott Leibrand
@scottleibrand
Oct 15 2017 20:54
ok, then go try the drill-down instructions.
Velibor Maric
@vebaba
Oct 15 2017 20:55
I did turned of adv_target_adjustments

root@vebaOAPS:~/myopenaps# cat preferences.json | jq .
{
  "max_iob": 10,
  "max_daily_safety_multiplier": 3,
  "current_basal_safety_multiplier": 4,
  "autosens_max": 1.2,
  "autosens_min": 0.7,
  "rewind_resets_autosens": false,
  "adv_target_adjustments": false,
  "unsuspend_if_no_temp": false,
  "enableSMB_with_bolus": false,
  "enableSMB_with_COB": false,
  "enableSMB_with_temptarget": false,
  "enableUAM": false
}
is preferences.json OK?
ZandMarc
@ZandMarc
Oct 15 2017 20:57
@danamlewis I re installed dev again today to see if the problem with the DIA set to 2 in Autotune would recreate. It didn't. Probably because I already changed it manually and the problem is caused by what @scottleibrand mentioned about Autotune not updating it's profile correctly when I change my settings. Not sure if I can help solve that: json and such are still foreign language to me. Hope to be able to change that soon. This problem is a nice challenge to start mastering it.
philipgo
@philipgo
Oct 15 2017 21:01
@scottleibrand I think there may still be an issue with exercise mode. The logs say it is till adjusting for the last temp target which has been cancelled long ago. Everything else makes me think the rig does not really apply exercise mode anymore and is working correctly except for the output in the logs.
Preflight OK. Profile less than 60m old. Refreshed pumphistory and meal.json
Checking pump clock: "2017-10-15T22:48:07+02:00" is within 1m of current time: Sun Oct 15 22:48:53 CEST 2017
and that pumphistory is less than 1m old.  Temp refreshed
Autotune exists! Hoorah! You can use microbolus-related features.
{"carbs":30,"mealCOB":13,"currentDeviation":5.41,"maxDeviation":11.91,"minDeviation":5.27,"slopeFromMaxDeviation":-1.004,"slopeFromMinDeviation":0.095,"allDeviations":[5.41,5.27,6.13,7.24,7.32,11.67,11.91,11.4,5.81],"lastCarbTime":1508095462000}
{"iob":2.524,"activity":0.0328,"bolussnooze":0,"basaliob":2.524,"netbasalinsulin":5,"hightempinsulin":7.15,"microBolusInsulin":5.8,"microBolusIOB":3.06,"time":"2017-10-15T20:48:10.000Z","lastBolusTime":1508096807000,"lastTemp":{"rate":0,"timestamp":"2017-10-15T22:28:28+02:00","started_at":"2017-10-15T20:28:28.000Z","date":1508099308000,"duration":20.5}}
{"delta":-1,"glucose":111,"short_avgdelta":-1.11,"long_avgdelta":-0.6}
Sensitivity ratio set to 0.56 based on temp target of 140; Adjusting basal from 1.1 to 0.6; ISF from 37.4 to 66.8
currenttemp: { duration: 11, rate: 0, temp: 'absolute' } lastTempAge: 21 m tempModulus: 2 m
Last carbs 85 minutes ago; remainingCATime: 5.1 hours; 57% carbs absorbed
Carb Impact: 9.9 mg/dL per 5m; CI Duration: 1.7 hours; remaining CI (~2h peak): 0 mg/dL per 5m
predCIs (mg/dL/5m): 9.4 9 8.5 8 7.5 7.1 6.6 6.1 5.6 5.2 4.7 4.2 3.7 3.3 2.8 2.3 1.8 1.4 0.9 0.4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
remainingCIs: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
UAM Impact: 9.9 mg/dL per 5m; UAM Duration: 0.8 hours
minPredBG: 14 minIOBPredBG: 39 minCOBPredBG: 39 avgPredBG: 14 COB: 13 / 30
BG projected to remain above 140 for 0 minutes
BG projected to remain above 90 for 65 minutes
naive_eventualBG: -58 bgUndershoot: 148 zeroTempDuration: 65 zeroTempEffect: 80 carbsReq: 3
Checking deliverAt: 2017-10-15T20:49:05.701Z is within 1m of current time: Sun Oct 15 22:49:05 CEST 2017
and that smb-suggested.json is less than 1m old
enact/smb-suggested.json: {"insulinReq":0,"bg":111,"reservoir":"17.6","temp":"absolute","snoozeBG":14,"predBGs":{"COB":[111,109,108,106,105,103,101,100,98,96,94,92,91,88,86,84,82,79,76,73,70,67,64,61,59,56,54,52,50,49,47,46,45,43,42,41,41,40,39],"aCOB":[111,110,108,107,105,103,102,100,98,97,95,93,91,89,87,84,82,79,76,73,70,67,64,61,59,56,54,52,50,49,47,46,45,43,42,41,41,40,39],"IOB":[111,109,107,104,101,98,94,90,85,80,75,69,63,57,52,47,42,39]},"rate":0,"IOB":2.524,"reason":"COB: 13, Dev: 59, BGI: -10.96, ISF: 67, Target: 140, minPredBG 14, minGuardBG -8, IOBpredBG 39, COBpredBG 39; minGuardBG -8<90","COB":13,"eventualBG":39,"duration":30,"tick":-1,"deliverAt":"2017-10-15T20:49:05.701Z"}
Temp refreshed: monitor/temp_basal.json: {"duration":11,"rate":0,"temp":"absolute"}
enact/smb-enacted.json: "Rate: 0 Duration: 30"
Temp refreshed: monitor/temp_basal.json: {"duration":30,"rate":0,"temp":"absolute"}
No bolus needed (yet). Settings refreshed. Edison on battery: 56%. Pumphistory-24 < 30m old
Settings less than 3 minutes old. Refreshed pumphistory and meal.json
IOB: 2.502
Velibor Maric
@vebaba
Oct 15 2017 21:06
@scottleibrand Drill down are these instructions? http://openaps.readthedocs.io/en/latest/docs/Troubleshooting/oref0-setup-troubleshooting.html?highlight=drill%20down? I'll try that tomorrow as it becomes late here. Thanks for your help! Have a nice and calm day :)
philipgo
@philipgo
Oct 15 2017 21:07
@vebaba Yes, these are the right instructions
Scott Leibrand
@scottleibrand
Oct 15 2017 21:07
@drnoname82 what does your settings/temptargets.json say? and cat settings/profile.json | jq . | grep -i -A1 temptargetSet ?
looks like the exercise-mode adjusted ISF and Target are being used: ISF: 67, Target: 140,
Velibor Maric
@vebaba
Oct 15 2017 21:15
@drnoname82 Thanks!
philipgo
@philipgo
Oct 15 2017 21:17
@scottleibrand
root@edi2:~/myopenaps/settings# cat temptargets.json
[
  {
    "carbs": null,
    "eventType": "Temporary Target",
    "created_at": "2017-10-15T19:11:56.744Z",
    "targetBottom": 80,
    "enteredBy": "2",
    "targetTop": 80,
    "reason": "Eating Soon",
    "insulin": null,
    "duration": 60,
    "_id": "59e3b2fc389660996a3d1366"
  },
  {
    "carbs": null,
    "eventType": "Temporary Target",
    "created_at": "2017-10-15T19:06:17.848Z",
    "targetBottom": 140,
    "enteredBy": "2",
    "targetTop": 140,
    "reason": "Activity",
    "insulin": null,
    "duration": 120,
    "_id": "59e3b1a9389660996a3cf362"
  },
  {
    "carbs": null,
    "eventType": "Temporary Target",
    "created_at": "2017-10-15T19:00:52.920Z",
    "targetBottom": 120,
    "enteredBy": "2",
    "targetTop": 120,
    "reason": "Activity",
    "insulin": null,
    "duration": 120,
    "_id": "59e3b064389660996a3cd405"
  },
  {
    "carbs": null,
    "eventType": "Temporary Target",
    "created_at": "2017-10-15T17:29:39.936Z",
    "targetBottom": 105,
    "enteredBy": "",
    "targetTop": 105,
    "reason": "Manual",
    "insulin": null,
    "duration": 60,
    "_id": "59e39b03389660996a3ad931"
  },
  {
    "carbs": null,
    "eventType": "Temporary Target",
    "created_at": "2017-10-15T16:56:23.163Z",
    "targetBottom": 120,
    "enteredBy": "",
    "targetTop": 120,
    "reason": "Manual",
    "insulin": null,
    "duration": 30,
    "_id": "59e39337389660996a3a188d"
  },
  {
    "carbs": null,
    "eventType": "Temporary Target",
    "created_at": "2017-10-15T15:10:16.026Z",
    "targetBottom": 110,
    "enteredBy": "2",
    "targetTop": 110,
    "reason": "Manual",
    "insulin": null,
    "duration": 120,
    "_id": "59e37a58389660996a37ca19"
  }
cat settings/profile.json | jq . | grep -i -A1 temptargetSetreturns nothing
The log output only stopped after I disabled exercise mode in preferences.
Scott Leibrand
@scottleibrand
Oct 15 2017 21:20
I don't think there's any way for determine-basal to know about a temp target unless it's in profile.json. I suspect at the time it was happening, cat settings/profile.json | jq . | grep -i -A1 temptargetSet would've returned the 140 target
so the question is why wasn't that getting updated with the fact that the target had expired
philipgo
@philipgo
Oct 15 2017 21:23
Well, I set a lot of temp targets while trying out exercise mode :) I will see if I can reproduce the problem and get back to you if it happens again.
Scott Leibrand
@scottleibrand
Oct 15 2017 21:23
:+1:
it's working well for us, FWIW
Dana Lewis
@danamlewis
Oct 15 2017 21:41
@tynbendad re: your fbk post of leaving pump behind - for your backup kit, have a syringe or two and the dregs of an old reservoir?
WeedsDIY
@WeedsDIY
Oct 15 2017 22:07
image.png
Running autotune for 1st time (ever) as one-off. Can someone help me understand 1) why output does not show a value for CSF (carbs/bolus are entered via bolus wizard, and 2) why the 'current' basal column does not match my actual pump basal settings (which are: 12a 0.7, 3a 065, 8a 0.5, 10p 0.7)? Just want to be real sure it's working before I accept recommended changes.
philipgo
@philipgo
Oct 15 2017 22:44
@WeedsDIY 1) CSF is not shown anymore because CR is now calculated directly without the use of CSF 2) It seems like your autotune autotuned an autotune profile
What command exactly did you use to start autotune? You are running autotune on your rig, right?
WeedsDIY
@WeedsDIY
Oct 15 2017 22:49
@drnoname82 I ran: oref0-autotune --dir=~/myopenaps --ns-host=https://mynightscout.azurewebsites.net --start-date=YYYY-MM-DD (with my NS url and date filled in), per Autotune Docs, phase A. Thank you for explaining CSF not needed.
tynbendad
@tynbendad
Oct 15 2017 22:49
@danamlewis that may be better than ordering pen vials/pens yearly... how many units do you keep in a spare vial? we run ours down to 10u or so
Dana Lewis
@danamlewis
Oct 15 2017 22:50
if you fill to the brim and put it in a pump...even after pump tells you you're at 0, you often have another 5-10 (excluding bubbles). so if you have 10 left on the pump and pull the reservoir, you likely have ~15 or so. Those are great for a meal and several hours of backup. I keep one in just about every bag, scott's bag, etc. for emergency on the go backup insulin.
tynbendad
@tynbendad
Oct 15 2017 22:51
i'm not sure i could syringe out that little though
Dana Lewis
@danamlewis
Oct 15 2017 22:51
10-15 units? Sure you can.
tynbendad
@tynbendad
Oct 15 2017 22:51
will have to try ;)
Dana Lewis
@danamlewis
Oct 15 2017 22:52
:)
(try it)
WeedsDIY
@WeedsDIY
Oct 15 2017 22:52
@drnoname82 I am running autotune as a one-off, not as part of my rig loop.
Dana Lewis
@danamlewis
Oct 15 2017 22:52
also great to have for backup pump insulin, too, even if not syringing it
tynbendad
@tynbendad
Oct 15 2017 22:52
yup
WeedsDIY
@WeedsDIY
Oct 15 2017 22:54
@tynbendad Would suggest you jot the date on the back up res. Rapid insulin should only be room temp for 28 days, less if exposed over 88 F. I've tested this, and it does start to weaken at d. 34-35, just fyi.
philipgo
@philipgo
Oct 15 2017 22:55
@WeedsDIY But you are running it as a one-off on your rig, not on a PC or Mac, right? There probably was an error in the step cd ~/myopenaps/settings/ && cp profile.json autotune.json && cp profile.json pumpprofile.json
WeedsDIY
@WeedsDIY
Oct 15 2017 22:55
@drnoname82 Correct
tynbendad
@tynbendad
Oct 15 2017 22:56
@WeedsDIY yes, we'll have to change it regularly (main reason we hadnt been doing this)
philipgo
@philipgo
Oct 15 2017 22:58
@WeedsDIY What does cd ~/myopenaps/settings/ && cat profile.jsonreturn?
WeedsDIY
@WeedsDIY
Oct 15 2017 23:07
image.png
@drnoname82 This is what it returned (above).
philipgo
@philipgo
Oct 15 2017 23:09
@WeedsDIY It looks like you ran autotune on your rig in the past (not as one-off, but as part of looping) and the rig is still using the autotuned profile for everything.
WeedsDIY
@WeedsDIY
Oct 15 2017 23:12
@drnoname82 Hmm, I don't know when I did that unless it was during my initial rig set up, but OK. I'm still not sure I understand the output from most recent autotune. Does it look like good output, such that I can consider using it (obviously applying my own judgment on my basals)?
philipgo
@philipgo
Oct 15 2017 23:13
@WeedsDIY Does crontab -lcontain anything autotune-related?
Also, if you do cd ~/myopenaps && cat oref0-runagain.shdoes the output include autotune in the --enable section?
WeedsDIY
@WeedsDIY
Oct 15 2017 23:18
@drnoname82 Yes, there is. It looks like that's the run I did today. I'll check the enable section of that.
@drnoname82 These are the lines from crontab -l: 5 0 * ( oref0-autotune -d=/root/myopenaps -n=https://weedsdiyaps-1.herokuapp.com && cat /root/myopenaps/autotune/profile.json | json | grep -q start && cp /root/myopenaps/autotune/profile.json /root/myopenaps/settings/autotune.json) 2>&1 | tee -a /var/log/openaps/autotune.log
philipgo
@philipgo
Oct 15 2017 23:24
@WeedsDIY Seems you are running autotune as part of your loop already. The command autotunelogshould show you the results. If that is not what you want, you should probably re-setup your rig.
WeedsDIY
@WeedsDIY
Oct 15 2017 23:24
@drnoname82 Well, looky there...autotune in the enable section of that. Ok, I feel a little silly, but I learned something! Can you tell I don't "speak" Linux (yet)?! So, it's running all the time then in my loop after all, right?
philipgo
@philipgo
Oct 15 2017 23:25
@WeedsDIY Hardly anyone here spoke Linux when they started :) Yep, it has been running all the time and you only manually performed an autotune of the autotune results, which is not especially useful ;)
jaylagorio
@jaylagorio
Oct 15 2017 23:26
^^
WeedsDIY
@WeedsDIY
Oct 15 2017 23:28
@drnoname82 Thanks, lol. Thanks for teaching me a few new commands. I'm sure they will prove useful!
philipgo
@philipgo
Oct 15 2017 23:36
@WeedsDIY While the past versions of autotune did not work too well for us, the most recent changes have made it an extremely useful tool and we just let it run as part of our loop and look at the results every other day
Scott Leibrand
@scottleibrand
Oct 15 2017 23:36
@tynbendad if you make a habit of replacing one of your emergency backup reservoirs with the old one each time you take it out of the rig, you'll typically not have to worry about keeping exact track. If you're down to no insulin and using a backup, any insulin is better than none, and you won't much care if it's 90% effective.
Paul Dickens
@thebookins
Oct 15 2017 23:38
@scottleibrand I had a look at the changes to oref0-online in openaps/oref0#716. Curious under what conditions the local hotspot is necessary - I'm pretty sure with my testing that the bluetooth tethering on iPhone works fine with no internet (you can spoof a bad cellular connection in dev tools), as long as you modify oref0-online to stop trying to renew the connection. Is this a restriction imposed by some carriers? Is the inverted architecture better for other reasons?
Scott Leibrand
@scottleibrand
Oct 15 2017 23:42
Never mind dev tools: put your iPhone in airplane mode and try to do a personal hotspot. It won't. Nor will it work with no service in an airplane. If you already have a hotspot going it will keep running, but if it dies it won't restart.
In airplane mode it greys out the switch.
jaylagorio
@jaylagorio
Oct 15 2017 23:45
FWIW, I fly fairly often (and have encountered as many problems with TSA as @danamlewis ) and am really excited about a hotspot I can connect to to see live data!
Scott Leibrand
@scottleibrand
Oct 15 2017 23:51
You mean "as few"? :smile:
jaylagorio
@jaylagorio
Oct 15 2017 23:51
Yes, I meant "as many" to mean zero. None. Not one, not even a little side eye.
Paul Dickens
@thebookins
Oct 15 2017 23:52
@scottleibrand got it. The rig being the hotspot means potentially more than one device could connect too yeah?
Scott Leibrand
@scottleibrand
Oct 15 2017 23:53
Yep
Paul Dickens
@thebookins
Oct 15 2017 23:53
:+1:
jaylagorio
@jaylagorio
Oct 15 2017 23:54
Is the AP going to be Open or WPA2 protected with a key we can define
?
Scott Leibrand
@scottleibrand
Oct 15 2017 23:58
That's a TODO for someone who wants to implement it. We'll need some form of security when we add a web interface that can set temp targets.
jaylagorio
@jaylagorio
Oct 15 2017 23:59
Ah, if it's a read-only interface first then I'm cool with it being Open.
Scott Leibrand
@scottleibrand
Oct 15 2017 23:59
Right now it's no interface, just ssh