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

5th
May 2018
Ghost
@ghost~57172786187bb6f0eae05406
May 05 2018 03:26
Has anyone successfully used the minimed 630/640 pump with OpenAPS and the Contour Next Link 2.4g meter connected with a USB-A to Micro/USB-C OTG cable?
Dana Lewis
@danamlewis
May 05 2018 03:57
No. There isn't the ability to temp basal, so no close loop with that pump.
Martin Haeberli
@mhaeberli
May 05 2018 08:25
Never seen anything like it! Zero temp more than an hour; IOB -1.4; 2 x 30 grams fast carbs added 45 and then 15 minutes ago; BG 87 and falling. Ideas / suggestions?
fidoman
@efidoman
May 05 2018 12:16
@mhaeberli - I've only seen something similar to that once or twice. My theory was the infusion set port was somehow a bit clogged and the insulin built-up over time and was "shook loose" or unclogged releasing a lot of insulin that OpenAPS thought was already absorbed a while back. I call it a "ghost" bolus.
peterfulvi
@peterfulvi
May 05 2018 13:02
Does the G6 work with openaps
achris2000
@achris2000
May 05 2018 14:51
I managed to reproduce the situation where rig is connected to the internet, but oref0-pump-loop fails because of too old BG data:
Starting oref0-pump-loop at Sat May 5 17:41:02 EEST 2018 with 15 second wait_for_silence:
Waiting up to 4 minutes for new BG: ........................Radio ok. Listening: .No interfering pump comms detected from other rigs (this is a good thing!)
Preflight fail. Retrying preflight
Preflight OK. Profile less than 60m old; Profile valid. Refreshed pumphistory
Warning: setting mealCOB to 0 because currentDeviation is null/undefined
and meal.json
Checking pump clock: "2018-05-05T17:46:24+03:00" is within 90s of current time: Sat May 5 17:46:27 EEST 2018
Temp refreshed
Autotune exists! Hoorah! You can use microbolus-related features.
{"carbs":65,"nsCarbs":0,"bwCarbs":65,"journalCarbs":0,"mealCOB":0,"currentDeviation":null,"maxDeviation":0,"minDeviation":999,"slopeFromMaxDeviation":0,"slopeFromMinDeviation":999,"allDeviations":[],"lastCarbTime":1525529178000,"bwFound":true}
{"iob":5.59,"activity":0.0475,"basaliob":-0.001,"bolusiob":5.591,"netbasalinsulin":-0.7,"bolusinsulin":10.7,"time":"2018-05-05T14:46:30.000Z","iobWithZeroTemp":{"iob":5.59,"activity":0.0475,"basaliob":-0.001,"bolusiob":5.591,"netbasalinsulin":-0.7,"bolusinsulin":10.7,"time":"2018-05-05T14:46:30.000Z"},"lastBolusTime":1525529178000,"lastTemp":{"rate":0,"timestamp":"2018-05-05T11:17:38+03:00","started_at":"2018-05-05T08:17:38.000Z","date":1525508258000,"duration":60}}
{"delta":8,"glucose":177,"noise":1,"short_avgdelta":8.89,"long_avgdelta":8.62,"date":1525507546935}
null
No deliverAt found.
{"reason":"If current system time Sat May 05 2018 17:46:38 GMT+0300 (EEST) is correct, then BG data is too old. The last BG data was read 400.9m ago at Sat May 05 2018 11:05:46 GMT+0300 (EEST). Temp 0 <= current basal 1.4U/hr; doing nothing. "}
Couldn't smb_verify_suggested
oref0-pump-loop failed. Waiting up to 4 minutes for new BG: ........................Unsuccessful oref0-pump-loop (BG too old) at Sat May 5 17:50:43 EEST 2018
root@dinaki:/var/log/openaps# ping google.com
PING google.com (172.217.16.206) 56(84) bytes of data.
64 bytes from fra16s08-in-f206.1e100.net (172.217.16.206): icmp_seq=1 ttl=48 time=76.2 ms
64 bytes from fra16s08-in-f206.1e100.net (172.217.16.206): icmp_seq=2 ttl=48 time=119 ms
64 bytes from fra16s08-in-f206.1e100.net (172.217.16.206): icmp_seq=3 ttl=48 time=111 ms
This will go on until I run ./oref0-runagain.sh
Martin Haeberli
@mhaeberli
May 05 2018 14:57
@efidoman thx
achris2000
@achris2000
May 05 2018 14:57
root@dinaki:~/myopenaps/monitor# ls -rtl
total 256
-rw-r--r-- 1 root root 114369 May 5 11:08 glucose.json
-rw-r--r-- 1 root root 6857 May 5 11:08 carbhistory.json
-rw-r--r-- 1 root root 37 May 5 11:42 edison-battery.json
-rw-r--r-- 1 root root 1371 May 5 17:04 mmtune.json
-rw-r--r-- 1 root root 3962 May 5 17:56 pumphistory.json
-rw-r--r-- 1 root root 4004 May 5 17:56 pumphistory-zoned.json
-rw-r--r-- 1 root root 5 May 5 17:56 reservoir.json
-rw-r--r-- 1 root root 44 May 5 17:56 battery.json
-rw-r--r-- 1 root root 69 May 5 17:56 status.json
-rw-r--r-- 1 root root 89170 May 5 17:56 pumphistory-merged.json
-rw-r--r-- 1 root root 244 May 5 17:56 meal.json
-rw-r--r-- 1 root root 5 May 5 17:56 lastreservoir.json
-rw-r--r-- 1 root root 58 May 5 17:56 temp_basal.json
-rw-r--r-- 1 root root 21 May 5 17:57 clock.json
-rw-r--r-- 1 root root 27 May 5 17:57 clock-zoned.json
-rw-r--r-- 1 root root 0 May 5 17:57 iob.json
the 3 first files are not being updated...
but Nightscout data is up to date
Can anyone help troubleshoot this ?
Martin Haeberli
@mhaeberli
May 05 2018 15:00
Things are a little wonky. Screen shots a little later. I set a temp target through careportal of 109-109. OpenAPS insists its target is pump default target of 120. Yet if I set temp target to 160-160, 160 is used as the target. What the heck?
@achris2000 I may be WAY off base, but I wonder if your mongolab database is (near) full?
Andrew Kirkby
@kirkbysound
May 05 2018 15:03
I have a query if someone could fill me in. Till now I've been connecting over SSH and moving to the autotune folder in myopenaps then using a text editor to view autotune_recommendations.log. Is this the best way to view the latest autotune information? The only reason I ask is that there's a mismatch between my current recommendations file and what I'm expecting. I changed pump sensitivity the other day and the recommendations file doesn't reflect the change. I suspect my battery died while tuning last time so it's missing a log file but want to be sure. Thanks in advance!
achris2000
@achris2000
May 05 2018 15:04
@mhaeberli I cleared the mongolab database couple of weeks ago, currently it is only 112 MB
Martin Haeberli
@mhaeberli
May 05 2018 15:08
@achris2000 sorry- I had seen what you describe intermittently last year some oref0 versions ago but not since. I have some vague inkling but can’t pull it out of brain at the moment. What I remember doing then is confirming I can pull glucose entries into OpenAPS within the Shell using curl and the NS API ; sometimes that would fail despite connectivity being ok.
achris2000
@achris2000
May 05 2018 15:18
@mhaeberli This rig uses now 0.6.1-dev and is running since last September.
I just noticed that xdripAPS is having an issue
root@dinaki:~/myopenaps/xdrip# curl -s http://localhost:5000/api/v1/entries?count=288
{"message": "Internal Server Error"}
So both online and offline methods do not update BG values on the rig currently.
But if I will run ./oref0-runagain.sh , it will recover.
Martin Haeberli
@mhaeberli
May 05 2018 15:19
so - temp targets are getting into OpenAPS correctly per papertrail. but Nightscout is not (not always) reflecting them correctly. What the heck? (Time for my own advice about fixing mlab?)
Jon Cluck
@cluckj
May 05 2018 15:22
@achris2000 which version of xdrip+ are you using?
there have been some xdrip+ and xdripAPS compatibility bugs that have been fixed in the last couple months
achris2000
@achris2000
May 05 2018 15:29
@cluckj xdrip+ should be 1-2 weeks old, but I have faced this issue many times, with several openAPS / xdrip+ versions. My daughter is not here now to check xdrip+ version. I am logged in to the rig remotely (I use permanent openvpn tunnel from the rig).
Martin Haeberli
@mhaeberli
May 05 2018 15:30
@achris2000 - my issues never involved xDrip+… always Dex share -> Nightscout -> rig, for what it’s worth
Jon Cluck
@cluckj
May 05 2018 15:30
ah okay
are you using token-based authentication on nightscout?
achris2000
@achris2000
May 05 2018 15:31
@cluckj nope
Jon Cluck
@cluckj
May 05 2018 15:35
"If current system time Sat May 05 2018 17:46:38 GMT+0300 (EEST) is correct, then BG data is too old. The last BG data was read 400.9m ago at Sat May 05 2018 11:05:46 GMT+0300 (EEST)"
achris2000
@achris2000
May 05 2018 15:35
@mhaeberli I started openAPS with Libre + Sony smartwatch, now we use Libre+Blucon. Where I live, Dexcom is stupidly expensive. And I have twins both with T1D...
Jon Cluck
@cluckj
May 05 2018 15:36
is 11:05 about the time they went out?
or left wifi range...
Martin Haeberli
@mhaeberli
May 05 2018 15:38

from papertrail:

May 05 08:36:05 etghopenaps0 ns-loop.log:  Latest NS temptargets: {"target":150,"duration":120,"start":"2018-05-05T15:20:20.283Z"}
May 05 08:36:05 etghopenaps0 ns-loop.log:  Merging local temptargets: Temptargets merged: {"target":150,"duration":120,"start":"2018-05-05T15:20:20.283Z"}
May 05 08:37:05 etghopenaps0 ns-loop.log: Latest NS temptargets: {"target":150,"duration":120,"start":"2018-05-05T15:20:20.283Z"}
May 05 08:37:05 etghopenaps0 ns-loop.log: Merging local temptargets: Temptargets merged: {"target":150,"duration":120,"start":"2018-05-05T15:20:20.283Z"}

compare:

May 05 08:36:22 etghopenaps0 pump-loop.log: enact/smb-suggested.json: {"temp":"absolute","bg":148,"tick":-18,"eventualBG":-53,"insulinReq":0,"reservoir":"261.175","deliverAt":"2018-05-05T15:36:22.603Z","sensitivityRatio":0.7,"predBGs":{"IOB":[148,131,115,100,86,72,60,49,39,39,39,39,39],"ZT":[148,141,133,126,119,112,106,99,93,87,81,75,70,65,60,55,51,48,45,42,40,39,39,39,40,42,44,47,50,53,55,58,61,64,67,69,72,75,78,81,83,86,89,92,95,97]},"COB":0,"IOB":3.113,"reason":"COB: 0, Dev: -45, BGI: -7, ISF: 50, CR: 5.8, Target: 100, minPredBG 38, minGuardBG -38, IOBpredBG 39; 9 add'l carbs req w/in 30m; minGuardBG -38<70","carbsReq":9,"duration":120,"rate":0}

so WHY is Target as 100 when it sees the temptarget of 150?!!!

achris2000
@achris2000
May 05 2018 15:39
@cluckj Life360 shows 10:49 she left from home. Xdrip+ is from 22.04.2018.
Jon Cluck
@cluckj
May 05 2018 15:40
:)
Martin Haeberli
@mhaeberli
May 05 2018 15:41
restarted NS already; just rebooted rig; hope this settles it out...
Jon Cluck
@cluckj
May 05 2018 15:46
@achris2000 check /var/log/openaps/ns-loop.log and /var/log/openaps/xdrip-loop.log
achris2000
@achris2000
May 05 2018 15:48
@cluckj what should I be looking for ?
achris2000
@achris2000
May 05 2018 15:56

At the time she left home, this is what happens

Starting ns-loop at Sat May 5 10:45:03 EEST 2018:
ns://JSON/shell/cgm/ns-glucose.json
reporting cgm/ns-glucose.json
ns://JSON/shell/settings/temptargets.json
reporting settings/temptargets.json
get-profile://text/shell/settings/profile.json
reporting settings/profile.json
Refreshed temptargetsns://JSON/shell/monitor/carbhistory.json
reporting monitor/carbhistory.json
and meal-carbs
{"batteryVoltage":4143, "battery":96}
Uploaded
Starting ns-loop at Sat May 5 10:47:03 EEST 2018:
ns://JSON/shell/cgm/ns-glucose.json
No JSON object could be decoded

ns://JSON/shell/settings/temptargets.json
No JSON object could be decoded

{"batteryVoltage":4133, "battery":95}
Uploaded

I can see ns-loops without errors since 11:16.
Current ns-loop outputs look like this

Starting ns-loop at Sat May 5 18:46:02 EEST 2018:
ns://JSON/shell/cgm/ns-glucose.json
reporting cgm/ns-glucose.json
ns://JSON/shell/settings/temptargets.json
reporting settings/temptargets.json
get-profile://text/shell/settings/profile.json
reporting settings/profile.json
{"batteryVoltage":4098, "battery":92}
Uploaded

@cluckj xdrip-aps looks like this
Sat May 5 10:50:02 EEST 2018
Sat May 5 10:51:01 EEST 2018
Sat May 5 10:52:02 EEST 2018
Sat May 5 10:53:02 EEST 2018
Sat May 5 10:54:02 EEST 2018
Sat May 5 10:55:02 EEST 2018
Sat May 5 10:56:02 EEST 2018
Sat May 5 10:57:02 EEST 2018
Sat May 5 10:58:02 EEST 2018
Sat May 5 10:59:02 EEST 2018
Sat May 5 11:00:02 EEST 2018
Sat May 5 11:01:02 EEST 2018
Sat May 5 11:02:02 EEST 2018
Sat May 5 11:03:01 EEST 2018
Sat May 5 11:04:02 EEST 2018
Sat May 5 11:05:02 EEST 2018
Jon Cluck
@cluckj
May 05 2018 15:58
any more recent entries than 11:05 in the xdrip log?
achris2000
@achris2000
May 05 2018 16:01
@cluckj yes, all look the same until now
Dana Lewis
@danamlewis
May 05 2018 16:03
@peterfulvi no one has one yet; will sort it out when someone does. Cloud based BG should work the same out of the box, but offline may need more work
Jon Cluck
@cluckj
May 05 2018 16:08
@achris2000 what does the topmost (newest) record in monitor/glucose.json look like?
what it could be is that openaps doesn't like the switch from pulling data from NS to xdripAPS, or that xdripAPS is broken
achris2000
@achris2000
May 05 2018 16:10
@cluckj
[
{
"direction": "FortyFiveUp",
"noise": 1,
"delta": 7.966,
"rssi": 100,
"dateString": "2018-05-05T11:05:46.935000+03:00",
"sgv": 177,
"device": "xDrip-LimiTTer",
"unfiltered": 239176,
"sysTime": "2018-05-05T11:05:46.935+0300",
"date": 1525507546935,
"filtered": 239176,
"_id": "5aed65e6f987841064fa6f49",
"type": "sgv",
"glucose": 177
},
Martin Haeberli
@mhaeberli
May 05 2018 16:10
OpenAPS pill target shows 100 . temp target set to 150-150. why the discrepancy?
also, OpenAPS pill shows 3 add’l carbs req w/in 40 mins - does this mean 3 x 15 grams? or 3 grams? (yes RTD, but sorry, had a tough night…)
achris2000
@achris2000
May 05 2018 16:14
@cluckj I wonder why the rig doesn't pull BG data from NS since 11:05, internet access is available for some hours now.
Jon Cluck
@cluckj
May 05 2018 16:15
@achris2000 yeah me too; it's uploading to NS, right?
Dana Lewis
@danamlewis
May 05 2018 16:16
@mhaeberli 3 grams
Martin Haeberli
@mhaeberli
May 05 2018 16:16
@danamlewis thx
achris2000
@achris2000
May 05 2018 16:17
@cluckj yes, it does
Martin Haeberli
@mhaeberli
May 05 2018 16:20

also wondering why

May 05 09:13:26 etghopenaps0 pump-loop.log:  enact/smb-suggested.json: {"temp":"absolute","deliverAt":"2018-05-05T16:13:26.630Z","reason":"Warning: currenttemp running but lastTemp from pumphistory ended 7m ago; setting neutral temp of 0.75.","duration":30,"rate":0.75}

vs

May 05 09:15:24 etghopenaps0 ns-loop.log:  [{"duration":30,"raw_duration":{"_type":"TempBasalDuration","_description":"TempBasalDuration 2018-05-05T09:13:30 head[2], body[0] op[0x16]","timestamp":"2018-05-05T09:13:30-07:00","_body":"","_head":"1601","duration (min)":30,"_date":"5e4d094512"},"timestamp":"2018-05-05T09:13:30-07:00","absolute":0.75,"rate":0.75,"raw_rate":{"_type":"TempBasal","temp":"absolute","_description":"TempBasal 2018-05-05T09:13:30 head[2], body[1] op[0x33]","timestamp":"2018-05-05T09:13:30-07:00","_body":"00","_head":"331e","rate":0.75,"_date":"5e4d094512"},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2018-05-05T09:13:30-07:00","enteredBy":"openaps://medtronic/723","_id":"5aedd89cb29f61711f26130b"}]

more to follow...

vs

May 05 09:17:22 etghopenaps0 ns-loop.log:  [{"duration":60,"raw_duration":{"_type":"TempBasalDuration","_description":"TempBasalDuration 2018-05-05T09:16:28 head[2], body[0] op[0x16]","timestamp":"2018-05-05T09:16:28-07:00","_body":"","_head":"1602","duration (min)":60,"_date":"5c50094512"},"timestamp":"2018-05-05T09:16:28-07:00","absolute":0,"rate":0,"raw_rate":{"_type":"TempBasal","temp":"absolute","_description":"TempBasal 2018-05-05T09:16:28 head[2], body[1] op[0x33]","timestamp":"2018-05-05T09:16:28-07:00","_body":"00","_head":"3300","rate":0,"_date":"5c50094512"},"eventType":"Temp Basal","medtronic":"mm://openaps/mm-format-ns-treatments/Temp Basal","created_at":"2018-05-05T09:16:28-07:00","enteredBy":"openaps://medtronic/723","_id":"5aedd912b29f61711f262099”}]

here, despite forecasted low low, got a little bump of basal insulin per the 09:15:24 log entry above

so the question was - why?
Why is pill target showing 100 when temp target set to 150-150? What am I missing? restarted rig and NS instance, just in case
Jon Cluck
@cluckj
May 05 2018 16:26
@achris2000 try that curl command again, but with a different number of entries, like: curl -s http://localhost:5000/api/v1/entries?count=1
achris2000
@achris2000
May 05 2018 16:27
@cluckj
root@dinaki:~/myopenaps# curl -s http://localhost:5000/api/v1/entries?count=1
{"message": "Internal Server Error"}
Jon Cluck
@cluckj
May 05 2018 16:29
have you rebooted the rig?
achris2000
@achris2000
May 05 2018 16:30
@cluckj no, I will do it now.
Jon Cluck
@cluckj
May 05 2018 16:30
nooooo wait
ah whatever, xdripAPS might need restarting
rebooting the whole thing will do that :laughing:
Martin Haeberli
@mhaeberli
May 05 2018 16:40
@scottleibrand @danamlewis somehow our temp targets no longer govern what openaps is doing. nothing changed in any configuration settings. Why is pill target showing 100 when temp target set to 150-150? What am I missing? restarted rig and NS instance, just in case
canceled NightScout temp target of 150-150. Target in pill now showing 190 vs 100 before. Where does the 190 come from? By the way, the ‘natural’ pump internal target setting is 120, as I understand; i’ll confirm with T1 when she’s awake
achris2000
@achris2000
May 05 2018 16:45
@cluckj oh sorry. /monitor/glucose.json, carbhistory.json and edison-battery.json are still not being updated. Curl continues to cause "Internal server error".
Jon Cluck
@cluckj
May 05 2018 16:45
after the reboot?
achris2000
@achris2000
May 05 2018 16:49
@cluckj yes, after the reboot. Every time this happens, I need to run ./oref0-runagain.sh to recover.
achris2000
@achris2000
May 05 2018 16:57
@cluckj I can provide ssh access through a vpn tunnel if it helps troubleshooting. I need to mention that I reinstalled a couple of days ago, by renaming myopenaps to backupmyopenaps and starting ./oref0-runagain.sh from there.
Martin Haeberli
@mhaeberli
May 05 2018 17:04
new data point - an ‘activity’ target entered through CarePortal just now took effect, but ‘manual’ targets entered manually or through IFTTT had wonky results.
logs show the temptargets in all cases being accurately merged.
but then sort of random targets took effect.
Jon Cluck
@cluckj
May 05 2018 18:06
@achris2000 can you curl glucose entries from nightscout, from the rig?
there might be some paths that are wonky from that kind of reinstall, too
achris2000
@achris2000
May 05 2018 18:12
@cluckj yep
2018-05-05T21:06:30.205+0300 1525543590205 273 Flat xDrip-LimiTTer
Jon Cluck
@cluckj
May 05 2018 18:14
:\
openaps should be pulling entries from NS, when xdripAPS is broken
achris2000
@achris2000
May 05 2018 18:14
exactly
I think I will setup a new edison/explorer rig from scratch, since the preordered hat's have not been delivered yet. Thanks anyway.
achris2000
@achris2000
May 05 2018 18:21
In fact I setup a new rig with 0.7.0-dev some days ago, and it was running fine. I could use this one as primary, or is it too risky ?
Scott Leibrand
@scottleibrand
May 05 2018 18:30
Several folks have been using 0.7.0-dev rigs exclusively. Just make sure you have the latest code, including the latest openaps.jq. If unsure, git pull and run oref0-runagain.
There was a 0.7.0-dev bug that reset IOB to zero at midnight, which is now fixed.
@mhaeberli the pump-loop.log has more details about how it chose the target.
Martin Haeberli
@mhaeberli
May 05 2018 18:33
ok, thx, I’ll take a look once I can log back in to the rig (or maybe figure out whether I can mine it from papertrail
@scottleibrand what might i look for in the log to reflect that decision?
Scott Leibrand
@scottleibrand
May 05 2018 18:37
Try searching papertrail for target
Martin Haeberli
@mhaeberli
May 05 2018 18:37
:+1:
May 05 07:50:08 etghopenaps0 ns-loop.log: Latest NS temptargets: {"target":109,"duration":300,"start":"2018-05-05T14:07:45.096Z"}
May 05 07:50:08 etghopenaps0 ns-loop.log: Merging local temptargets: Temptargets merged: {"target":109,"duration":300,"start":"2018-05-05T14:07:45.096Z"}
May 05 07:50:34 etghopenaps0 pump-loop.log: enact/smb-suggested.json: {"temp":"absolute","bg":251,"tick":-3,"eventualBG":108,"insulinReq":0,"reservoir":"261.175","deliverAt":"2018-05-05T14:50:33.844Z","sensitivityRatio":0.94,"predBGs":{"IOB":[251,248,245,241,236,232,227,222,216,211,206,201,196,190,185,180,175,170,164,159,155,150,145,140,136,132,128,124,121,117,114,112,111,110,109],"ZT":[251,248,244,240,236,231,227,222,217,212,207,203,198,194,190,185,181,177,174,170,167,163,160,158,155,153,151,149,148,147,147,147],"UAM":[251,248,244,240,236,231,226,221,216,210,205,200,195,190,185,179,174,169,164,159,154,149,144,140,135,131,127,123,120,117,114,112,110,109,109,108]},"COB":0,"IOB":4.516,"reason":"COB: 0, Dev: 0, BGI: -3, ISF: 37, CR: 5.8, Target: 120, minPredBG 128, minGuardBG 108, IOBpredBG 109, UAMpredBG 108; Eventual BG 108 < 120, setting 60m zero temp. ","duration":60,"rate":0}
so here we see a 109 temp target
but the enact target is 100

another example:

May 05 07:42:05 etghopenaps0 ns-loop.log: Latest NS temptargets: {"target":109,"duration":300,"start":"2018-05-05T14:07:45.096Z"}
May 05 07:42:05 etghopenaps0 ns-loop.log: Merging local temptargets: Temptargets merged: {"target":109,"duration":300,"start":"2018-05-05T14:07:45.096Z"}
May 05 07:42:26 etghopenaps0 pump-loop.log: enact/smb-suggested.json: {"temp":"absolute","bg":254,"tick":"+3","eventualBG":137,"insulinReq":0.46,"reservoir":"261.5","deliverAt":"2018-05-05T14:42:25.942Z","sensitivityRatio":0.94,"predBGs":{"IOB":[254,257,258,259,259,258,257,254,251,247,243,238,233,228,223,218,213,207,202,197,192,188,183,178,174,169,165,161,157,153,150,147,144,142,141,140,139],"ZT":[254,252,249,246,242,238,234,230,225,220,215,211,206,202,198,194,190,186,182,179,175,172,169,166,164,161,159,157,155,154,153,153,153,153],"UAM":[254,257,258,259,259,258,256,253,249,245,240,235,230,225,220,215,210,205,200,195,190,185,180,175,171,166,162,158,154,151,147,144,141,139,138,137]},"COB":0,"IOB":4.611,"reason":"COB: 0, Dev: 32, BGI: -2, ISF: 37, CR: 5.8, Target: 120, minPredBG 145, minGuardBG 137, IOBpredBG 139, UAMpredBG 137; Eventual BG 137 >= 120, insulinReq 0.46; setting 30m low temp of 0.5U/h. Microbolusing 0.2U. ","units":0.2,"rate":0.5,"duration":30}

NS target 109, Target in enact/ 120

Scott Leibrand
@scottleibrand
May 05 2018 18:42
You’re repeating yourself.
Martin Haeberli
@mhaeberli
May 05 2018 18:42
(revised above to include the Latest NS temptarget)
Scott Leibrand
@scottleibrand
May 05 2018 18:43
We need to know what pump-loop.log debug output says.
Martin Haeberli
@mhaeberli
May 05 2018 18:43
I assume I can get that from papertrail? or do I need to pull it from device
Jon Cluck
@cluckj
May 05 2018 18:45
@achris2000 sorry that we couldn't figure out the issue! I've been running 0.7.0-dev for....a while, it should be okay as long as you can keep an eye on it regularly
Scott Leibrand
@scottleibrand
May 05 2018 18:45
Please stop assuming and go look.
Martin Haeberli
@mhaeberli
May 05 2018 18:46
@scottleibrand - i appear to have annoyed you. for which I am sorry. I AM looking
the matches I sent above are the ONLY matches in papertrail. Looking on the device needs me to get my remote tunnel fixed to our daughter. Which I can escalate to do.
Jon Cluck
@cluckj
May 05 2018 18:47
@achris2000 there's something wonky happening when the rig transitions from "home" to "not at home" mode
Scott Leibrand
@scottleibrand
May 05 2018 18:50
@mhaeberli everything from pump-loop.log should be in papertrail. you can click on pump-loop.log to see the full contents
Martin Haeberli
@mhaeberli
May 05 2018 18:51
@scottleibrand ok, thx
Scott Leibrand
@scottleibrand
May 05 2018 18:51
there might be a line like this:
Autosens ratio: 0.78; Adjusting basal from 1.1 to 0.85; target_bg from 95 to 105; ISF from 55.5 to 71.1; CR: 10.15
you might have to search for target_bg instead of just target: not sure if papertrail does substring searches or whole-word
Martin Haeberli
@mhaeberli
May 05 2018 18:52
May 05 07:50:33 etghopenaps0 pump-loop.log: Autosens ratio: 0.94; Adjusting basal from 1.2 to 1.15; ISF from 35 to 37.2; CR: 5.8
Scott Leibrand
@scottleibrand
May 05 2018 18:52
ok, so no mention of target there
Martin Haeberli
@mhaeberli
May 05 2018 18:52
in this log, no instance of target_bg in the relevant time range
correct
but I’ll go ask papertrail for target_bg just in case
Scott Leibrand
@scottleibrand
May 05 2018 18:53
do you have a copy of the preferences.json, or does that require getting on the rig?
Martin Haeberli
@mhaeberli
May 05 2018 18:53
have it; will paste anon
Scott Leibrand
@scottleibrand
May 05 2018 18:54
grep target preferences.json
I'm interested in the preferences around target adjustment
Martin Haeberli
@mhaeberli
May 05 2018 18:55
prefs coming in a minute; ZERO hits in papertrail on target_bg
Scott Leibrand
@scottleibrand
May 05 2018 18:56
the defaults are:
    , high_temptarget_raises_sensitivity: false // raise sensitivity for temptargets >= 111.  synonym for exercise_mode
    , low_temptarget_lowers_sensitivity: false // lower sensitivity for temptargets <= 99.
    , sensitivity_raises_target: true // raise BG target when autosens detects sensitivity
    , resistance_lowers_target: false // lower BG target when autosens detects resistance
    , adv_target_adjustments: false // lower target automatically when BG and eventualBG are high
    , exercise_mode: false // when true, > 105 mg/dL high temp target adjusts sensitivityRatio for exercise_mode. This majorly changes the behavior of high temp targets from before. synonmym for high_temptarget_raises_sensitivity
    , half_basal_exercise_target: 160 // when temptarget is 160 mg/dL *and* exercise_mode=true, run 50% basal at this level (120 = 75%; 140 = 60%)
    , wide_bg_target_range: false // by default use only the low end of the pump's BG target range as OpenAPS target
    , enableSMB_with_temptarget: false // enable supermicrobolus for eating soon temp targets
    , enableSMB_always: false // always enable supermicrobolus (unless disabled by high temptarget)
    , allowSMB_with_high_temptarget: false // allow supermicrobolus (if otherwise enabled) even with high temp targets
    , noisyCGMTargetMultiplier: 1.3 // increase target by this amount when looping off raw/noisy CGM data
Martin Haeberli
@mhaeberli
May 05 2018 18:56
{
    "max_iob": 8,
    "max_daily_safety_multiplier": 3,
    "current_basal_safety_multiplier": 7,
    "autosens_max": 1.2,
    "autosens_min": 0.7,
    "rewind_resets_autosens": true,
    "adv_target_adjustments": false,
    "exercise_mode": false,
    "wide_bg_target_range": false,
    "sensitivity_raises_target": true,
    "unsuspend_if_no_temp": true,
    "enableSMB_with_COB": true,
    "enableSMB_with_temptarget": true,
    "enableUAM": true,
    "curve": "rapid-acting",
    "offline_hotspot": false,
    "carbsReqThreshold": 1,
        "": "high_temptarget_raises_sensitivity default false",
        "high_temptarget_raises_sensitivity": true,
        "": "low_temptarget_lowers_sensitivity default false",
        "low_temptarget_lowers_sensitivity": false,
        "": "sensitivity_raises_target default false",
        "sensitivity_raises_target": false,
        "": "resistance_lowers_target default false",
        "resistance_lowers_target": false,
        "": "autosens_adjust_targets default false",
        "autosens_adjust_targets": false,
        "": "skip_neutral_temps default false",
        "skip_neutral_temps": false,
        "": "bolussnooze_dia_divisor default 2",
        "bolussnooze_dia_divisor": 2,
        "": "min_5m_carbimpact default 8",
        "min_5m_carbimpact": 8,
        "": "carbratio_adjustmentratio default 1",
        "carbratio_adjustmentratio": 1,
        "": "maxCOB default 120",
        "maxCOB": 120,
        "": "autotune_isf_adjustmentFraction default 0.5",
        "autotune_isf_adjustmentFraction": 0.5,
        "": "wide_bg_target_range default false",
        "wide_bg_target_range": false,
        "": "A52_risk_enable default false",
        "A52_risk_enable": true,
        "": "maxSMBBasalMinutes default 30",
        "maxSMBBasalMinutes": 30,
        "": "allowSMB_with_high_temptarget default false",
        "allowSMB_with_high_temptarget": true,
        "": "enableSMB_always default false",
        "enableSMB_always": true
}
from sister rig which SHOULD be clone of this one, will check real one asap.
thx 4 standard list; I’ll diff those in a minute
Scott Leibrand
@scottleibrand
May 05 2018 18:57
I think that target_bg only shows up if you have sensitivity_raises_target or resistance_lowers_target enabled
yep: if ( profile.sensitivity_raises_target && autosens_data.ratio < 1 || profile.resistance_lowers_target && autosens_data.ratio > 1 ) {
Martin Haeberli
@mhaeberli
May 05 2018 18:58
:+1:
so then i’m still scratching my head on root cause for discrepancy between NS temp target (seen in papertrail log and merged) and target used for enact. any suggestions on where I might look next?
Jon Cluck
@cluckj
May 05 2018 18:59
it looks like there's conflicting settings there?
Scott Leibrand
@scottleibrand
May 05 2018 18:59
for future reference, when pasting long single lines, it's easier to read if you use a single backtick instead of three, so it wraps properly on narrow screens
Martin Haeberli
@mhaeberli
May 05 2018 18:59
ok thx
Scott Leibrand
@scottleibrand
May 05 2018 18:59
@cluckj are you referring to his "": comments?
Jon Cluck
@cluckj
May 05 2018 19:00
yeah, am I just parsing those wrong?
Scott Leibrand
@scottleibrand
May 05 2018 19:00
they're no-ops
there is a null key with a value of "high_temptarget_raises_sensitivity default false" that then gets overridden with a value of "low_temptarget_lowers_sensitivity default false" etc.
that empty key never actually gets used: it's just a way to put comments in json
Jon Cluck
@cluckj
May 05 2018 19:02
oh; I'm talking about: "sensitivity_raises_target": true, then farther down: "sensitivity_raises_target": false,
Scott Leibrand
@scottleibrand
May 05 2018 19:02
ah, gotcha. that is a dupe then
Martin Haeberli
@mhaeberli
May 05 2018 19:02
good catch, thx @cluckj
Jon Cluck
@cluckj
May 05 2018 19:03
:thumbsup:
I have no idea if that is doing anything though
Scott Leibrand
@scottleibrand
May 05 2018 19:04

for readability, reposting this: May 05 07:42:05 etghopenaps0 ns-loop.log: Latest NS temptargets: {"target":109,"duration":300,"start":"2018-05-05T14:07:45.096Z"}

May 05 07:42:05 etghopenaps0 ns-loop.log: Merging local temptargets: Temptargets merged: {"target":109,"duration":300,"start":"2018-05-05T14:07:45.096Z"}

May 05 07:42:26 etghopenaps0 pump-loop.log: enact/smb-suggested.json: {"temp":"absolute","bg":254,"tick":"+3","eventualBG":137,"insulinReq":0.46,"reservoir":"261.5","deliverAt":"2018-05-05T14:42:25.942Z","sensitivityRatio":0.94,"predBGs":{"IOB":[254,257,258,259,259,258,257,254,251,247,243,238,233,228,223,218,213,207,202,197,192,188,183,178,174,169,165,161,157,153,150,147,144,142,141,140,139],"ZT":[254,252,249,246,242,238,234,230,225,220,215,211,206,202,198,194,190,186,182,179,175,172,169,166,164,161,159,157,155,154,153,153,153,153],"UAM":[254,257,258,259,259,258,256,253,249,245,240,235,230,225,220,215,210,205,200,195,190,185,180,175,171,166,162,158,154,151,147,144,141,139,138,137]},"COB":0,"IOB":4.611,"reason":"COB: 0, Dev: 32, BGI: -2, ISF: 37, CR: 5.8, Target: 120, minPredBG 145, minGuardBG 137, IOBpredBG 139, UAMpredBG 137; Eventual BG 137 >= 120, insulinReq 0.46; setting 30m low temp of 0.5U/h. Microbolusing 0.2U. ","units":0.2,"rate":0.5,"duration":30}

Jon Cluck
@cluckj
May 05 2018 19:06
yeah it's letting sensitivity change the target despite that being what you don't want it to do
Martin Haeberli
@mhaeberli
May 05 2018 19:07
:+1:
achris2000
@achris2000
May 05 2018 19:08
@cluckj I agree. Especially the transition from wifi to bluetooth tethering seems wonky. If it doesn't work at once, the rig remains not connected until I reboot it. It actually connects to bluetooth, but does not get an IP from the phone. Wifi tether is more reliable, but you need a powerbank.
Jon Cluck
@cluckj
May 05 2018 19:10
@achris2000 do you have something like BT-autotether running on the phone?
achris2000
@achris2000
May 05 2018 19:11
@cluckj yes I do.
Jon Cluck
@cluckj
May 05 2018 19:13
where does the VPN come in?
Martin Haeberli
@mhaeberli
May 05 2018 19:13
@scottleibrand - so continuing / trying to wrap this up - the state of that setting is ambiguous in my preferences.json. working to fix that now. But IF it was perceived as true by the OpenAPS code, THEN as I understand it we would expect to have seen ‘target_bg” entries in the log reflecting that it was computed and applied. But the empirical evidence looks like it was applied but NO target_bg log entries found anywhere...
I’ll get the prefs fixed to remove the ambiguity.
but welcome your thoughts if you’ve the energy; if not, i’ll just move forward.
Scott Leibrand
@scottleibrand
May 05 2018 19:15
I'm not sure yet which code path you went down to get the result you got. I don't know that the ambiguous setting alone can explain what we saw
Martin Haeberli
@mhaeberli
May 05 2018 19:17
k thx. i’ll (finish) fixing prefs on the remote openaps instances, then just keep a weather eye
achris2000
@achris2000
May 05 2018 19:17
@cluckj I have installed openvpn on both my kids rigs, and let them autoconnect to a Pi based openvpn server in my office (static IP). I can login to the same vpn server from everywhere and reach the rigs over their tun0 IP, the one they get from the openvpn server. So, whenever the rigs have internet access they are also logged in to the vpn.
Martin Haeberli
@mhaeberli
May 05 2018 19:18
a corrolary question - per earlier discussion, for example, for highs, if the target is below 110, the down-correction from SMB etc can be much more aggressive than if it’s above 110. is this ‘the target’ based on the pre-target_bg adusted value, or post?
(OK, time for me to read the code again…)
Jon Cluck
@cluckj
May 05 2018 19:20
@achris2000 ah okay :) xdrip+ is set up to REST-API upload to both the rig (over bluetooth) and NS? check out the xdrip+ logs when you can, there might be additional info there
Scott Leibrand
@scottleibrand
May 05 2018 19:20
@mhaeberli if you see it happen again at a time when you have access to the rig, I'd like to see the contents of the profile.json, in particular grep -i target settings/profile.json and cat settings/profile.json | jq -c .bg_targets
Martin Haeberli
@mhaeberli
May 05 2018 19:21
:+1:
Scott Leibrand
@scottleibrand
May 05 2018 19:22
you have "high_temptarget_raises_sensitivity": true, and "low_temptarget_lowers_sensitivity": false,, so any high target (hard-coded as > 110) will cause it to calculate IOB using a correspondingly higher ISF
temp targets are supposed to override any autosens adjustments
so you should never get target_bg adjusted if it's a temporary target, unless you have noisy CGM data
which will show in the logs as process.stderr.write("Raising target_bg for noisy / raw CGM data, from "+target_bg+" to "+adjustedTargetBG+"; ");
achris2000
@achris2000
May 05 2018 19:24
@cluckj yes, I use 3 url's in the xdrip+ REST-API, one for NS, one for BT-tether and one for wifi-tether. Bluetooth/wifi tether also provides mobile internet access for the NS url. If there is no mobile access, bluetooth tether gets shutdown on the phone. Only wifi-tether keeps the private network active for offline xdripAPS looping.
Martin Haeberli
@mhaeberli
May 05 2018 19:24
k thx - what you describe is what we have been seeing, except intermittently in the last 24 hours ...
Jon Cluck
@cluckj
May 05 2018 19:30
@achris2000 are there recent glucose.json files in ~/myopenaps/xdrip/?
achris2000
@achris2000
May 05 2018 19:32
@cluckj yes, but showing the error.
root@dinaki:~/myopenaps/xdrip# ls -rtl
total 8
-rw-r--r-- 1 root root 41 May 5 22:31 last-glucose.json
-rw-r--r-- 1 root root 41 May 5 22:31 glucose.json
root@dinaki:~/myopenaps/xdrip# cat glucose.json
{
"message": "Internal Server Error"
}
In the meantime I started ./oref0-runagain.sh and the rig is looping again.
Jon Cluck
@cluckj
May 05 2018 19:33
lol okay
Scott Leibrand
@scottleibrand
May 05 2018 19:35
openaps/oref0#995
achris2000
@achris2000
May 05 2018 19:36
My ssh intervention is only possible thanks to the vpn. She is 100km away for the weekend with only mobile access.
Jon Cluck
@cluckj
May 05 2018 19:37
ah
Martin Haeberli
@mhaeberli
May 05 2018 19:38
@achris2000 always interested in learning - how is your VPN configured? I’m using a cron job on the rig to try to keep a tunnel open to a Digital Ocean secure droplet that I ssh into and then I can (sometimes) ssh further into the rig. sometimes it doesn’t go...
achris2000
@achris2000
May 05 2018 19:38
@cluckj thanks
Jon Cluck
@cluckj
May 05 2018 19:38
I'm thinking that xdripAPS is set up on a "bad" interface
achris2000
@achris2000
May 05 2018 19:40
@cluckj I will replace the rig with the 0.7.0-dev one tomorrow when she gets back home. The 'faulty' one will be re-flashed.
Jon Cluck
@cluckj
May 05 2018 19:40
:thumbsup:
achris2000
@achris2000
May 05 2018 19:49
@mhaeberli The openvpn client on the rig can be setup as permanent, by editing /etc/default/openvpn and uncommenting the line AUTOSTART="all". This makes the rig try to connect to the openvpn server continuously. If internet access is available, it connects. I login to the vpn server from my mobile or laptop, do a cat /etc/openvpn/log/openvpn-status.log (run with a shortcut) and get the rig IP's on the vpn. This way the rigs of my kids are always accesible with ssh.
Martin Haeberli
@mhaeberli
May 05 2018 19:50
@achris2000 :+1:
statuur
@statuur
May 05 2018 19:51
@danamlewis just PR'ed the v2 of the Can_I_close_the_loop_with_this_pump infographic.
sorry it took a while
Dana Lewis
@danamlewis
May 05 2018 19:52
@statuur no need to apologize. I took way longer than you did! 🤦‍♀️
@achris2000 @cluckj on topic of xdripaps..anyone care to review this docs PR and give it a thumbs up or otherwise comment if it needs further edits? openaps/docs#1209
statuur
@statuur
May 05 2018 19:57
working on version 3 with DANAR and DANARS now
Jon Cluck
@cluckj
May 05 2018 20:09
@danamlewis seems okay
I did not know about the "Changing between xDripAPS and Nightscout as sources for CGM data may lead to problems with the calculation of carbohydrate absorption. This can be avoided by leaving the OpenAPS rig tethered to the phone via Bluetooth or WiFi as long as there are carbs on board."
:scream:
Andrew Kirkby
@mrkirkby_twitter
May 05 2018 20:17
Thanks @danamlewis I think my autotune might be broken but I'll have a look at why that may be first before coming back here.
alimhassam
@alimhassam
May 05 2018 20:19
@cluckj any idea what is the cause of these problems?
Andrew Kirkby
@mrkirkby_twitter
May 05 2018 20:21
In my autotune log I'm getting
Screen Shot 2018-05-05 at 21.20.58.png
Then running cat-autotune gives me:
Screen Shot 2018-05-05 at 21.21.28.png
There's an error in the log and the two files don't match.
Or more accurately, the data doesn't match
Dana Lewis
@danamlewis
May 05 2018 20:24
That's a warning, not an error. What is the isf on your pump?
Also, wasn't sure from earlier comments why you were moving your Autotune files around. Where exactly are you running it? And why do you need the extra steps you were doing?
Andrew Kirkby
@mrkirkby_twitter
May 05 2018 20:25
ISF is 3.2 mmol/l on the pump so 57.6 roughtly.
The intention wasn't to move them. I SCP them from the rig to a local machine in order to graph changes in excel.
But my settings seem way off just now. I'm having a lot of hypos
Dana Lewis
@danamlewis
May 05 2018 20:28
Ah I re-read and understand better now: you were logging in (e.g. Moving yourself into) folder, not moving files
Andrew Kirkby
@mrkirkby_twitter
May 05 2018 20:29
yup.. I'd missed the symbolic for cat-autotune until now too so that makes that part easier ;)
What I'm not sure of is why the data is different between that of the end of the log and the autotune_recommendations file
Dana Lewis
@danamlewis
May 05 2018 20:31
I'd dig in and look at the individual day run files and see if they have the correct base isf or the wonky (50) one. Seems like the cat Autotune one is stuck and isn't getting copied from the daily run. You could try deleting it and re-creating it copied from today's result, if it was correct, to see if that resolves it (run Autotune again manually then and see if it is still correct after that or recreates the problem)
You're right that it's not supposed to be different
Andrew Kirkby
@mrkirkby_twitter
May 05 2018 20:32
Ok, I'll give it a bash. What's the best command to run autotune manually? Not found that script in the docs yet.
Dana Lewis
@danamlewis
May 05 2018 20:35
It's on the Autotune page in docs, or you can copy it from cron
Andrew Kirkby
@mrkirkby_twitter
May 05 2018 20:35
Looking at the autotune folder, I can see a set of files with a date on them. They seem to end on the 20th April. I think something broke..
Screen Shot 2018-05-05 at 21.36.53.png
Excuse the tiny font ;/
Also, I made the .old file and rm'd the recommendations one before I noticed the dates. They were there before I took the screenshot.
Ah hold on, this might be my logging in as root catching me ~/myopenaps will be a different folder to /root
Andrew Kirkby
@mrkirkby_twitter
May 05 2018 20:45
There's something really quite wrong with my rig. There's a myopenaps folder in the myopenaps folder which appears to contain the active openaps system. I'm guessing an update went strangely but that's where all of the current data seems to be.
Dana Lewis
@danamlewis
May 05 2018 20:49
That certainly sounds like what can be causing the symptoms and mismatched files. For safety, I'd wipe and start over with a fresh install.
Andrew Kirkby
@mrkirkby_twitter
May 05 2018 20:50
That's my thinking too.. Given what's going on with my control just now, it looks like I've been referencing two sets of data for about 4 weeks. Is the best way to do that to start with a re-flash? And should I back up any data at all? I'm guessing a new install will just pull everything it needs from the nightscout history.
Jon Cluck
@cluckj
May 05 2018 21:00
@alimhassam no, but I think I'm getting closer to figuring it out :D
Scott Leibrand
@scottleibrand
May 05 2018 21:04
@kirkbysound you can delete all instances of myopenaps and clear out crontab, then re-run oref0-setup.
Andrew Kirkby
@mrkirkby_twitter
May 05 2018 21:07
Thanks @scottleibrand I wonder if given how messy this seems to be, it's perhaps best to go back to bare metal and re install the whole lot. If nothing more it'll clear out /var/log and so on too making things a little easier if I run into other unrelated issues.
alimhassam
@alimhassam
May 05 2018 21:17
@cluckj maybe we can create an issue, I wasn't aware
(if there isn't one already)
Scott Leibrand
@scottleibrand
May 05 2018 21:22
@kirkbysound no harm in reflashing if you’re comfortable with that. Just back up your preferences.json.
Andrew Kirkby
@mrkirkby_twitter
May 05 2018 21:23
Shall do! I just SCP'd the whole folder over to my mac so I should have anything else if I need to reference it.
Martin Haeberli
@mhaeberli
May 05 2018 23:10
naively, how long are newly-added carbs assumed to last (by default)?
Scott Leibrand
@scottleibrand
May 05 2018 23:12
Are you asking what the assumed absorption curve is prior to observing any positive deviations? Or a more general rule of thumb?
Martin Haeberli
@mhaeberli
May 05 2018 23:13
@scottleibrand I didn’t really know what I was asking, but I think the first. 18 g carbs added at 14:40, but down to less than 4g on board maybe an hour later, per openaps internal model
trying to understand how long a tail to assume. now, of course, in the real world, depends on YDMV and what carbs
Scott Leibrand
@scottleibrand
May 05 2018 23:16
Sounds like you’re thinking about it differently than the OpenAPS carb absorption model.
Martin Haeberli
@mhaeberli
May 05 2018 23:17
ok so RTD … thanks! :-)
Martin Haeberli
@mhaeberli
May 05 2018 23:36
along similar lines - is there any benefit or risk to adding via CarePortal a retrospective carb correction, say, 3 - 6 hours old - maybe so autotune when it runs overnight has the needed meta-knowledge?
[good idea or not, sometimes we want to add carb corrections without telling openaps (in lieu of adding a high temp target) to prevent openaps from pushing too much insulin too early before she has come up high enough ...]