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

9th
Jun 2017
rsilvers129
@rsilvers129
Jun 09 2017 01:01
I can’t get that to work
Lin
@denglfddd
Jun 09 2017 01:25
@scottleibrand The computer no longer recognizes my edsion
Scott Leibrand
@scottleibrand
Jun 09 2017 01:26
@rsilvers129 Gitter troubleshooting 101: paste what you're doing and seeing
@denglfddd "recognizes" how? what exactly are you doing and seeing?
Lin
@denglfddd
Jun 09 2017 01:29
@scottleibrand I think it should be something I deleted,When I plug in EDSION, the device menu will not show edison, so now I can not re-flash
Scott Leibrand
@scottleibrand
Jun 09 2017 01:33
what do you see on console over the UART port when you reboot it?
Lin
@denglfddd
Jun 09 2017 01:34
屏幕快照 2017-06-08 08.45.23.png
Scott Leibrand
@scottleibrand
Jun 09 2017 01:36
That console output looks fine. does it eventually boot up, or does it stop there?
Lin
@denglfddd
Jun 09 2017 01:36
It has been stuck here
rsilvers129
@rsilvers129
Jun 09 2017 02:01
I turned off my WiFi router, and still got -99 from 69cm away.
PopcornPam
@PopcornPam_twitter
Jun 09 2017 02:18
bytearray index out of range
Google gives me no info about what this might mean
Dana Lewis
@danamlewis
Jun 09 2017 02:19
It usually self resolves
PopcornPam
@PopcornPam_twitter
Jun 09 2017 02:19
Just noticed I hadn't been looping for an hour. The rig was only a few feet away, and since putting it back in my pocket with the pump, it is fine, but not sure why it didn't connect for so long
seems that sometimes it can be two rooms away no problem, and other times on the other side of the couch and no good
kenkotch
@kenkotch
Jun 09 2017 02:20
to switch from running my rig online w/ NS to offline with G5 plugged into edison, am I correct that all i have to do is plug it in and add a usb battery? I can't get it to work
Dana Lewis
@danamlewis
Jun 09 2017 02:24
Data cables? Plugged in the otg port? Etc
kenkotch
@kenkotch
Jun 09 2017 02:25
yep otg to g5 receiver and power in uart
Dana Lewis
@danamlewis
Jun 09 2017 02:28
What version explorer do you have?
kenkotch
@kenkotch
Jun 09 2017 02:28
1.2
kenstack
@kenstack
Jun 09 2017 02:29
@rsilvers129 you are absolutely sure the serial number is correct right ? That is really strange
kenkotch
@kenkotch
Jun 09 2017 02:29
if it matters im running 0.2.0-dev
rsilvers129
@rsilvers129
Jun 09 2017 02:30
@kensack It works when it is closer than about a foot.
kenkotch
@kenkotch
Jun 09 2017 02:53
nevermind- it seems this rig isnt working at all right now. time for some troubleshooting
rsilvers129
@rsilvers129
Jun 09 2017 02:55
Capture.PNG
@PopcornPam_twitter The other side of the couch would be great. If my pump is in my right pocket, and my Explorer is in my left pocket, it probably won't work. Same pocket works.
kenkotch
@kenkotch
Jun 09 2017 03:21
@danamlewis re-running setup fixed whatever issues I was having. The updates made on setup are nice. I changed the max_iob during setup but it wasn't reflected in my pref file (obviously I was able to update it, just thought you should know)
@rsilvers129 are you making the files to print your case public? looks good.
kenkotch
@kenkotch
Jun 09 2017 03:23
thx
Dana Lewis
@danamlewis
Jun 09 2017 03:26
@kenkotch what version of dev are you on?
kenkotch
@kenkotch
Jun 09 2017 03:27
openaps 0.2.0-dev
Dana Lewis
@danamlewis
Jun 09 2017 03:28
When did you last pull a copy of dev though, complete w npm global install etc?
kenkotch
@kenkotch
Jun 09 2017 03:29
hmm...not today. this rig has been in a drawer for a week or so, so maybe end of may for complete npm global install
Dana Lewis
@danamlewis
Jun 09 2017 03:31
Heh. Ok. It would be great if you can re-do dev on that rig and try it again to confirm if it kept the maxiob you have it in the script, based off the latest code - or not
Made several tweaks even in past week
kenkotch
@kenkotch
Jun 09 2017 03:34
sure. i'll let you know - if not tonight, tomorrow
Dana Lewis
@danamlewis
Jun 09 2017 03:35
:+1:
kenkotch
@kenkotch
Jun 09 2017 03:44
@danamlewis just re-ran. here's the issue- I use 4.5 which seems to work for my setup:
/root/src/oref0/bin/oref0-setup.sh: line 489: [[: 4.5: syntax error: invalid arithmetic operator (error token is ".5")
Dana Lewis
@danamlewis
Jun 09 2017 03:48
For maxiob or another setting?
kenkotch
@kenkotch
Jun 09 2017 03:49
maxiob. I also use 1/2's for other settings
Dana Lewis
@danamlewis
Jun 09 2017 03:50
K. Hm, was fairly sure we had tested and fixed .5s
Will you log an issue so can check it out further tomorrow?
(And thanks for repulling and rerunning, too, to confirm)
kenkotch
@kenkotch
Jun 09 2017 03:53
yep- im still new to this, do i log the issue here: https://github.com/openaps/oref0/issues
Dana Lewis
@danamlewis
Jun 09 2017 03:54
Yup, exactly. Explain you got a fresh dev and include the error output
kenkotch
@kenkotch
Jun 09 2017 03:55
k. on it
Dana Lewis
@danamlewis
Jun 09 2017 04:03
:+1:
fidoman
@efidoman
Jun 09 2017 10:29
A word of caution related to autosens settings. I tried widening the range for autosens to 0.6 - 1.4 about 2 weeks ago. In my case, this contributed to 3 consecutive low bg's during the night following my change. I dug through the logs and found clearly that autosens was adjusting and causing the over-aggressiveness. I dialed back autosens to 0.95 - 1.05 and haven't had any troubles like that since.
marafie
@marafie
Jun 09 2017 12:39
In the offline looping for dexcom CGM users I have reached to the 1- add cron entry to start the microservice at start up "@reboot python /home/root/.xdripAPS/xdripAPS.py" ....... how can I add this ??
rsilvers129
@rsilvers129
Jun 09 2017 13:10
One thing that may be nice is to not get a carbsreq pushover if it is less than ISF/10.
rsilvers129
@rsilvers129
Jun 09 2017 13:42
@ericfeibelman I will keep that in mind if I have a problem, but I found that I had to widen it to 1.5 or else it was not able to lower me enough at times.
Scott Leibrand
@scottleibrand
Jun 09 2017 15:46
@rsilvers129 are you watching the oref0 repo? I just did openaps/oref0#494 instead.
marafie
@marafie
Jun 09 2017 15:47
The BT teething works with the phone
I followed the instruction mentioned on the Bluetooth tethering on Edison (optional) but when I restart the Edison it doesn't automatically connect
And the Bluetooth is not On
Scott Leibrand
@scottleibrand
Jun 09 2017 15:51
@ericfeibelman 5% is probably too narrow for autosens to do any good. Agreed that allowing it to detect 40% resistance might be a bit much, but why didn't you just revert it back to the defaults from before you widened it? Also, you can safely allow it to detect extra sensitivity without giving it the same leeway on resistance. The defaults already allow that somewhat: 0.7 to allow detecting 42% sensitivity (1/0.7) vs. only 1.2 to allow only 20% resistance.
Tim Street
@tim2000s
Jun 09 2017 16:58
@marafie What phone are you using and do you have wifi setup locally?
marafie
@marafie
Jun 09 2017 17:18
@tim2000s I am using Samsung S8 and yes I have a local wifi setup... I installed on my andriod auto BT
Seems to me the BT on the Edison does not work when reboot
jtsackdex
@jtsackdex
Jun 09 2017 18:06
I keep getting this error:"BG data is too old (it's probably this), or clock set incorrectly. The last BG data was read at Wed Jun 07 2017 06:50:23 GMT-0400 (EDT) but your system time currently is Fri Jun 09 2017 14:04:45 GMT-0400 (EDT)"}
Waiting for ntpd to synchronize... No!
ntpd did not synchronize.
Restarting ntp (via systemctl): ntp.service.
Waiting for ntpd to synchronize... No!
ntpd did not synchronize.
Setting system time to later of Fri Jun 9 14:05:00 EDT 2017 or "2017-06-09T14:03:20-04:00":
(date +%s; date -d 2017-06-09T14:03:20-04:00 +%s) | sort -g | tail -1 | while read line; do sudo date -s @$line; done;
Fri Jun 9 14:05:00 EDT 2017
Where and what should I be looking at to fix?
ericmtx
@ericmtx
Jun 09 2017 18:10
@jtsackdex it looks like your rig may not be able to connect to the internet to pull data (glucose) or sync it's date/time. Can you ping google.com from a terminal session on your rig?
jtsackdex
@jtsackdex
Jun 09 2017 18:15
It's like every other run in the loop?
@ericmtx 144 packets transmitted, 144 received, 0% packet loss, time 143214ms
rtt min/avg/max/mdev = 9.492/29.590/136.213/18.317 ms
ericmtx
@ericmtx
Jun 09 2017 18:17
huh - it gets glucose data OK every other loop also?
and you've checked the time across your various devices to make sure they're all the same?
jtsackdex
@jtsackdex
Jun 09 2017 18:18
Yes like every other. Sometimes every 3rd
ericmtx
@ericmtx
Jun 09 2017 18:19
your nightscout is showing recent blood glucose readings?
(assuming you're pulling BG from NS in your rig)
jtsackdex
@jtsackdex
Jun 09 2017 18:20
Yes gets each change no problem within seconds of xDrip+
OK within 1st minute
Now it spit this out in the log
Traceback (most recent call last):
File "/usr/local/bin/openaps-report", line 82, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 52, in call
self.epilog( )
File "/usr/local/bin/openaps-report", line 69, in epilog
super(ReportToolApp, self).epilog( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 75, in epilog
self.create_git_commit( )
File "/usr/local/lib/python2.7/dist-packages/openaps/cli/init.py", line 98, in create_git_commit
self.repo.index.commit(msg)
File "/usr/local/lib/python2.7/dist-packages/git/index/base.py", line 954, in commit
author_date=author_date, commit_date=commit_date)
File "/usr/local/lib/python2.7/dist-packages/git/objects/commit.py", line 393, in create_from_tree
repo.head.set_commit(new_commit, logmsg=message)
File "/usr/local/lib/python2.7/dist-packages/git/refs/symbolic.py", line 211, in set_commit
self.set_object(commit, logmsg)
File "/usr/local/lib/python2.7/dist-packages/git/refs/symbolic.py", line 240, in set_object
return self._get_reference().set_object(object, logmsg)
File "/usr/local/lib/python2.7/dist-packages/git/refs/reference.py", line 64, in set_object
super(Reference, self).set_object(object, logmsg)
File "/usr/local/lib/python2.7/dist-packages/git/refs/symbolic.py", line 237, in set_object
return self.set_reference(object, logmsg)
File "/usr/local/lib/python2.7/dist-packages/git/refs/symbolic.py", line 308, in set_reference
fd = lfd.open(write=True, stream=True)
File "/usr/local/lib/python2.7/dist-packages/gitdb/util.py", line 333, in open
raise IOError("Lock at %r could not be obtained" % self._lockfilepath())
IOError: Lock at '/root/myopenaps/.git/refs/heads/master.lock' could not be obtained
{"bg":105,"temp":"absolute","snoozeBG":100,"recieved":true,"predBGs":{"IOB":[105,104,103,103,102,101,101,100,100,100,100,100,100]},"rate":0.55,"reason":"COB: 0, Dev: -5,
Andy Sharrow
@dramageek
Jun 09 2017 18:32
@jtsackdex I assume you used xDrip as your CGM source in oref0-setup?
I get the "BG Data too old" error every so often too. I believe it's from when you switch back to wifi from BT- The rig looks for data directly from xDrip+, but doesn't see it. Since everything is still hitting nightscout, it pulls that history and gets it, and keeps looping.
jtsackdex
@jtsackdex
Jun 09 2017 18:41
@dramageek That is how I set it up. I was actually trying to do the xDrip Offline and haven't been sucessful yet. I think I may see where I went wrong. i.e. enter bluetooth address instead of WiFi address Would I then remove wifi access to stop confusion?
marafie
@marafie
Jun 09 2017 18:59
@jtsackdex once you found out how to work the x drip offline via blutooth please do tell me how .... I got it working on local wifi no idea who it would use the blutooth
jtsackdex
@jtsackdex
Jun 09 2017 19:05
@marafie There is a lot of self teaching. I fully back and understand the reasoning. But it can be painful for someone just learning...
I have always learned better from mistakes
Andy Sharrow
@dramageek
Jun 09 2017 19:12
@marafie @jtsackdex I'm trying to find it. Is the readthedocs site acting up for anyone else?
marafie
@marafie
Jun 09 2017 19:13
Today I faced several times up and down
Were it mentions page does. It exist
You'll have to set xDrip to upload to nightscout using the old MongoDB method, then use REST for loading directly to the rig.
marafie
@marafie
Jun 09 2017 19:15
@dramageek my BT is not working
Ahaa
Andy Sharrow
@dramageek
Jun 09 2017 19:16
So if the rig is on BT it gets updates directly from xDrip+, if it's online it pulls from Nightscout but complains sometimes. Still works, though.
marafie
@marafie
Jun 09 2017 19:16
It works fine with local wifi
Andy Sharrow
@dramageek
Jun 09 2017 19:17
How far did you make it with the BT instructions? Whenever I end up doing them (after a reflash), it takes a bunch of times. Just keep following them, and if it tells you to go back and do something again, do it.
marafie
@marafie
Jun 09 2017 19:23
@dramageek Dram I followed the instructions many time... one of them was ok... but not sure why it didn't connect to the mobile ... I am not sure if blutooth is ok after reboot
jtsackdex
@jtsackdex
Jun 09 2017 19:29
Did you type y or yes @marafie
cameronrenwick
@cameronrenwick
Jun 09 2017 19:31
sorry late to the convo here but some phones won't allow bluetooth tethering. I'm in that category and struggled for days - weeks - before figuring it out... just fyi-ing y'all
Eric
@ecc1
Jun 09 2017 19:32
I had a chance to watch my Edison boot while connected to a high resolution Tektronix current probe and a scope, so we could see the spikes in current usage. Although the rig idles at around 60 mA, and goes up to around 180 mA during my loop, I was quite surprised to see occasional spikes up to 750 mA (not correlated with looping). My hypothesis is that these are when the kernel is writing back data to the filesystems on eMMC, but I can't prove that yet.
The other thing that was easy to reproduce (by limiting the current on a bench power supply) was the Edison "boot loop", where it doesn't boot the kernel but keeps saying "waiting for application": that's due to an initial high current demand. If the USB port or cable can't supply that, the Edison exhibits that behavior which many of us have experienced.
Marco
@CaptainBalou
Jun 09 2017 19:40
@rsilvers129 Tried to do the openaps mmtune command as well. Explorer Board 1.2. 15cm distance "868.486", 5, -78. 30cm "868.390", 5, -82, 1m distance "868.438", 5, -82. Could be better but could also be worse.
marafie
@marafie
Jun 09 2017 19:41
@jtsackdex I types yes not y
Typed
dan lightner
@danimaniac
Jun 09 2017 19:51

@dramageek I did not realize this at first as the offline docs are not clear. You do not have to use the old MongoDB upload at all. The REST API can upload to both the rig and to NS. Enter your rig's local address AND your NS upload address in the REST API Base URL. The two address must be space delimited (type one, space, type the other). Works like a charm for me.

here it is: http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-1/offline-looping-and-monitoring.html#xdripaps-for-offline-bgs-for-android-users

marafie
@marafie
Jun 09 2017 19:53
@dramageek I did this too two address one for local wifi and one for blutooth
dan lightner
@danimaniac
Jun 09 2017 19:54
marafie
@marafie
Jun 09 2017 20:01
Should both of them have 5000/
???
During paring process I just got serviceresolved: yes paired: yes ..... then both of them became no
dan lightner
@danimaniac
Jun 09 2017 20:12
@marafie no. "http://secret@myaddress/api/v1/" points to your NS site and "http://secret@192.168.44.107:5000/api/v1" points to your rig's local address.
Scott Leibrand
@scottleibrand
Jun 09 2017 20:21
@danimaniac please PR in any improvements you can to the offline docs
Andy Sharrow
@dramageek
Jun 09 2017 20:36
@marafie Sweet! I was editing mine depending on if I was on my primary or backup rig. Great to know!
marafie
@marafie
Jun 09 2017 20:39
Once I get the BT solved I will move to the next step .. use it on my main pump
Matthias
@ceben80
Jun 09 2017 20:41
But be careful when setup URLs, for NS https, for xdrip BG uploading w/o "s" only http :exclamation:
Otherwise xdrip BG upload won't work
marafie
@marafie
Jun 09 2017 20:42
Not planning to use NS
Matthias
@ceben80
Jun 09 2017 20:43
Only FYI :wink:
marafie
@marafie
Jun 09 2017 20:45
Thanks will keep it in mind once I set it up for my kid after he kd out of the honey moon period
Matthias
@ceben80
Jun 09 2017 20:45
But recommended for reporting stuff :+1:
marafie
@marafie
Jun 09 2017 20:49
True... I am only lazy to go through it
Savek-CC
@savek-cc
Jun 09 2017 20:52
I just set up NS + HTTPS + username/password auth on a virtual linux server - 3h total work (starting from a plain ubuntu vserver) -- now it could probably be done in way less than that since I managed to stumble into every pitfall possible ;)
(No azure/mongolab/whatever)
marafie
@marafie
Jun 09 2017 21:04
Will try to set it up once I have all other things ready
Tim Street
@tim2000s
Jun 09 2017 21:07
@danimaniac If you enter both addresses for n the REST api setting, when you're offline, and can't reach Nightscout, it stops the upload getting to your rig as well.
Matthias
@ceben80
Jun 09 2017 21:09
Hey Tim :wink: ...evening
Tim Street
@tim2000s
Jun 09 2017 21:19
👋
dan lightner
@danimaniac
Jun 09 2017 21:31
@tim2000s When my phone is offline? Or when my rig is offline?
Tim Street
@tim2000s
Jun 09 2017 21:32
When you are operating with no internet access.
Really the only reason to use xdripaps is so that you have glucose data when there isn't internet access.
ericmtx
@ericmtx
Jun 09 2017 22:52
I have the newest version of the explorer board on back-order. My current is from mid/late 2016 and it's having issues with the two red leds staying on and locking during mmtune from time to time. Anyone find that the newest board design is more stable/reliable with that? I've reflashed the radio a couple of times but still see the issue
Luis Betancourt
@betluis
Jun 09 2017 22:57
hello all, I am starting to explore the functions of Oref1 and have a practical question. If a regular meal is announced by entering a bolo, what would be the ideal timing and amount of this bolo. Would this be some sort of pre-bolo?
also if the regular meal is announced instead by entering a rough amount of carbs, the question is how long in advance it is ideal to do this and then, right before the meal, the actual bolo should be reduced by certain amount?
@ericmtx I have four explorer boards also from mid/late 2016, no issues at all so far
Scott Leibrand
@scottleibrand
Jun 09 2017 23:21
@betluis that is very much a YDMV thing that is highly dependent on how you normally bolus for whatever you normally eat
but as a general rule, getting some insulin activity going before the meal helps limit the postprandial BG spike. that can mean an "eating soon" bolus or temp target, a regular pre-bolus, or pre-entry of carbs
if you do pre-enter the carbs, it's good to look at your resulting IOB and reduce your meal bolus accordingly
all of this advice is the same advice I'd give for using oref0 with AMA. oref1 isn't really any different in terms of what you need to do. the only real difference is it can get more insulin started faster if you pre-enter your carbs before you bolus