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

1st
Feb 2016
Jason Curry
@mccgm
Feb 01 2016 00:11
OK, I got this, but ......I'm having trouble understanding what the loop and loop-alias aliases would do.
pi@raspberrypi:~/ayeletssail $ cat enact/suggested.json
{"temp":"absolute","bg":286,"tick":"+4","eventualBG":217,"snoozeBG":296,"reason"
pi@raspberrypi:~/ayeletssail $ openaps enact
langerhans://JSON/set_temp_basal/enact/enacted.json
reporting enact/enacted.json
pi@raspberrypi:~/ayeletssail $ openaps loop
curl://text/shell/monitor/glucose.json
reporting monitor/glucose.json
bash: Openaps: command not found
No CGM data.
pi@raspberrypi:~/ayeletssail $ openaps preflight
langerhans://JSON/read_clock/monitor/clock.json
reporting monitor/clock.json
PREFLIGHT OK
lizarragakevin
@lizarragakevin
Feb 01 2016 00:22
i found inside menus of pump 754 a opcion called remote control, reading the manuals is about a aditional device that i don't have, but i believe that if someone of the group have this device as worked with the carelink for discover its funcionality for create openAPS, also can try with this device and in that way enable the temp basal
Scott Leibrand
@scottleibrand
Feb 01 2016 00:23
Remote only easy boluses or suspends. It can't issue temp basals.
@mccgm Linux is case sensitive. You capitalized Openaps somewhere: should be openaps.
Jason Curry
@mccgm
Feb 01 2016 00:24
I double checked in my alias and it is not capitalized
Scott Leibrand
@scottleibrand
Feb 01 2016 00:24
grep Openaps openaps.ini
tazitoo
@tazitoo
Feb 01 2016 00:27
I'm working on my loop, and just saw this:
"reason": "Eventual BG 120>120, no temp, setting 1.183U/hr",
Did I mess some step up? Why the high temp?
Scott Leibrand
@scottleibrand
Feb 01 2016 00:29
What is your configured basal?
tazitoo
@tazitoo
Feb 01 2016 00:29
0.95 U/hr
rounding error?
Scott Leibrand
@scottleibrand
Feb 01 2016 00:30
it should say >=120
it's trying to correct you down from 120 to target
tazitoo
@tazitoo
Feb 01 2016 00:30
so if I enacted it, the next time around it would undo it?
Scott Leibrand
@scottleibrand
Feb 01 2016 00:30
what is your min_bg?
tazitoo
@tazitoo
Feb 01 2016 00:30
100
Scott Leibrand
@scottleibrand
Feb 01 2016 00:30
not unless eventualBG dropped to 119 or lower
so target is 110
tazitoo
@tazitoo
Feb 01 2016 00:31
got it - thanks
Scott Leibrand
@scottleibrand
Feb 01 2016 00:31
feel free to PR a fix for >= if you want. :-)
or change the logic to actually be > instead of >=
or open an oref0 issue for me to do it if you're not comfortable in js
tazitoo
@tazitoo
Feb 01 2016 00:32
or even easier -change my limits to 110 to 130 :-)
Jason Curry
@mccgm
Feb 01 2016 00:32
grep found it. I'm code blind, thanks @scottleibrand
Scott Leibrand
@scottleibrand
Feb 01 2016 00:32
If you prefer. :-)
Jason Curry
@mccgm
Feb 01 2016 00:33
My first successful loop. So grateful
tazitoo
@tazitoo
Feb 01 2016 00:33
@mcgm - Congrats!
Scott Leibrand
@scottleibrand
Feb 01 2016 00:38
:+1:
tazitoo
@tazitoo
Feb 01 2016 00:38
Changed the range to 110 to 130 (seems more in keeping with the uncertainty of the measurement of BG), and just got this:
"reason": "121 is in range. No temp required; cancel",
nice!
Dana Lewis
@danamlewis
Feb 01 2016 00:39
:)
tazitoo
@tazitoo
Feb 01 2016 00:43
</me heads off for dinner > Thanks!
John Males
@johnmales
Feb 01 2016 01:47
Had an issue last night. Loop appeared to be running, communication with pump fine. The iter_glucose report was running, but the last glucose reading being reported all night was at 22:40. Looking at the pump the glucose data was up to date all night. The iter_glucose report started working as expected again around 05:30 the next morning when I logged into the rPi, but I don’t think I did anything to get the glucose data flowing again. I can’t explain this. Any thoughts? I vaguely remember a discussion about “pages” on medtronic pumps getting “stuck” when going to a new page.
dougtakeuti
@dougtakeuti
Feb 01 2016 01:57
@johnmales not sure, but my loop was running ok when I used Iter_glucose_hours and started to give me weird formatting issues when I tried iter_glucose
John Males
@johnmales
Feb 01 2016 01:59
@juliatakeuti oops I am running iter_glucose_hours as well - thanks for the thought though
dougtakeuti
@dougtakeuti
Feb 01 2016 02:00
My cron does not seem to work even though service cron status says it is. What would be a simple way to test it? Something that would print to the console.
Scott Leibrand
@scottleibrand
Feb 01 2016 02:02
You'll have to print to a log file instead.
John Males
@johnmales
Feb 01 2016 02:02
Do you have a log file for your loop somewhere? If you do, you can do tail -F /var/log/openaps.log or whatever your log file is called, and then whenever something is added to your log it will be displayed in your terminal window
dougtakeuti
@dougtakeuti
Feb 01 2016 02:04

I tried

SHELL=bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
*/1 * * * * echo "Hello world" > /var/log/openaps/loop.log

Is this correct?

and the I tail -f /var/log/openaps/loop.log
John Males
@johnmales
Feb 01 2016 02:11
a single > will overwrite each time, a >> will append to the file
dougtakeuti
@dougtakeuti
Feb 01 2016 02:12
I don't see anything in the file
John Males
@johnmales
Feb 01 2016 02:12
So */1 * * * * echo "Hello world" >> /var/log/openaps/loop.log will append “Hello world” each time
How are you editing the cron file?
dougtakeuti
@dougtakeuti
Feb 01 2016 02:13
crontab -e
John Males
@johnmales
Feb 01 2016 02:14
Hmm that looks correct
Scott Leibrand
@scottleibrand
Feb 01 2016 02:15
Do you have a PATH?
dougtakeuti
@dougtakeuti
Feb 01 2016 02:16
It was working ok before, but I decided to start afresh with openaps. I solved all my issues by doing so, but cron now is the problem.
Scott Leibrand
@scottleibrand
Feb 01 2016 02:16
Also, ls -la /var/log/openaps/
to check perms.
dougtakeuti
@dougtakeuti
Feb 01 2016 02:17
 $ ls -la /var/log/openaps/
total 8
drwxr-xr-x  2 root root 4096 Jan 31 22:05 .
drwxr-xr-x 10 root root 4096 Jan 31 22:04 ..
-rw-r--r--  1 root root    0 Jan 31 22:05 loop.log
Scott Leibrand
@scottleibrand
Feb 01 2016 02:17
There's your problem.
Youll need to chown it
dougtakeuti
@dougtakeuti
Feb 01 2016 02:18
to pi?
chown pi /var/log/openaps/ ?
Scott Leibrand
@scottleibrand
Feb 01 2016 02:21
ya, or pi.pi
To get both the user and group changed.
and sudo
dougtakeuti
@dougtakeuti
Feb 01 2016 02:22
Thanks. I had tried that but not pi.pi. Let's see...
Scott Leibrand
@scottleibrand
Feb 01 2016 02:27
Try echo hi >> /var/log/openaps/loop.log manually to test perms.
You might need to chown loop.log too
dougtakeuti
@dougtakeuti
Feb 01 2016 02:36

I was successful with echo hi >> /var/log/openaps/loop.log from the command line and I've chown loop.log, but cron still doesn't seem to work. Then I included echo hi >> /var/log/openaps/loop.log in cron to see what happens and I got

crontab: installing new crontab
"/tmp/crontab.K9B6Wk/crontab":26: bad command
errors in crontab file, can't install.
Do you want to retry the same edit? (y/n)

when I tried to save it

Scott Leibrand
@scottleibrand
Feb 01 2016 02:37
What was the crontab it was erroring on?
that means you had a syntax error, so need to see t.
*it
dougtakeuti
@dougtakeuti
Feb 01 2016 02:40

The only content was

SHELL=bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
echo Hi >> /var/log/openaps/loop.log

everything else had been commented out.

Scott Leibrand
@scottleibrand
Feb 01 2016 02:58
You're missing *'s
See @johnmales example earlier.
Jason Curry
@mccgm
Feb 01 2016 03:04
So I now have verified my cron directory path is set up set up correctly by having it create a new directory in my openaps folder. Would I then try something like:
```
&& 'openaps loop'
Scott Leibrand
@scottleibrand
Feb 01 2016 03:10
Something like * * * * * cd $directory && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' || openaps retry-loop ) 2>&1 | tee -a /var/log/openaps/loop.log"
checks if it's already running, and runs if not.
Or >> instead of | tee -a
dougtakeuti
@dougtakeuti
Feb 01 2016 03:14
@scottleibrand I did this and still no luck:
SHELL=bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
*/1 * * * * echo Hello world >> /var/log/openaps/loop.log
dougtakeuti
@dougtakeuti
Feb 01 2016 03:21
Do I have to chown /var/ or /var/log/?
Scott Leibrand
@scottleibrand
Feb 01 2016 03:25
Not if you can echo to that log file as the Pi user
that SHELL line may be wrong
Try removing it.
dougtakeuti
@dougtakeuti
Feb 01 2016 03:25
ok
Scott Leibrand
@scottleibrand
Feb 01 2016 03:25
Or put it below PATH
Not sure if it matters, but it isn't telling cron where to find bash
dougtakeuti
@dougtakeuti
Feb 01 2016 03:27
That was it - thanks!
Jason Curry
@mccgm
Feb 01 2016 03:51
This message was deleted
I set up my chron to run the loop string, then print a date stamp. It can't find openaps?
/bin/sh: 1: openaps: not found
Sun 31 Jan 20:50:01 MST 2016 Please work...
/bin/sh: 1: openaps: not found
Sun 31 Jan 20:51:02 MST 2016 Please work...
/bin/sh: 1: openaps: not found
Scott Leibrand
@scottleibrand
Feb 01 2016 03:53
Is that from cron? Do you have a PATH?
see @juliatakeuti's example above
Jason Curry
@mccgm
Feb 01 2016 03:55
pi@raspberrypi:~/ayeletssail $ cat /var/log/openaps/loop.log
hello worlds
/bin/sh: 1: openaps: not found
/bin/sh: 1: openaps: not found
/bin/sh: 1: openaps: not found
/bin/sh: 1: openaps: not found
/bin/sh: 1: openaps: not found
/bin/sh: 1: openaps: not found
Sun 31 Jan 20:51:02 MST 2016 Please work...
/bin/sh: 1: openaps: not found
Sun 31 Jan 20:52:01 MST 2016 Please work...
/bin/sh: 1: openaps: not found
Sun 31 Jan 20:53:02 MST 2016 Please work...
/bin/sh: 1: openaps: not found
Sun 31 Jan 20:54:01 MST 2016 Please work...
/bin/sh: 1: openaps: not found
Aaron Michelson
@Aaybob
Feb 01 2016 04:03
loop ! bash -c "(openaps preflight && openaps gather 2>/dev/null >/dev/null && openaps enact 2>/dev/null >/dev/null) || echo No CGM data."
gather ! bash -c "rm -f monitor/*; openaps monitor-cgm && openaps monitor-pump && openaps gather-profile"
enact ! bash -c "rm -f enact/suggested.json; openaps report invoke enact/suggested.json && cat enact/suggested.json && grep -q duration enact/suggested.json || echo No action required"
pancreas ! bash -c "openaps loop; cat enact/suggested.json && grep -q duration enact/suggested.json && openaps report invoke enact/enacted.json"
This is what I think its doing
pancreasloop is {(preflight;gather;remove file; invoke file; if file does not contain "duration" then echo "No action required") or echo "No CGM data"}
But see here "No CGM data and enact"
PREFLIGHT OK
{"temp":"absolute","bg":261,"tick":"+7","eventualBG":112,"snoozeBG":336,"reason":"112 is in range. No temp required"}
PREFLIGHT OK
{"temp":"absolute","bg":268,"tick":"+7","eventualBG":132,"snoozeBG":344,"reason":"Eventual BG 132>120, adj. req. rate:3.5 to maxSafeBasal:2.4, no temp, setting 2.4000000000000004U/hr","duration":30,"rate":2.4}
pumpbuilding://JSON/set_temp_basal/enact/enacted.json
reporting enact/enacted.json
PREFLIGHT OK
{"temp":"absolute","bg":267,"tick":-1,"eventualBG":126,"snoozeBG":324,"reason":"Eventual BG 126>120, temp 2.375 >~ req 2.16U/hr"}
PREFLIGHT OK
{"temp":"absolute","bg":261,"tick":-6,"eventualBG":108,"snoozeBG":290,"reason":"Eventual BG 108>90 but Delta -6 < Exp. Delta -2.8; cancel","duration":0,"rate":0}
pumpbuilding://JSON/set_temp_basal/enact/enacted.json
reporting enact/enacted.json
PREFLIGHT OK
No CGM data.
{"temp":"absolute","bg":261,"tick":-6,"eventualBG":108,"snoozeBG":290,"reason":"Eventual BG 108>90 but Delta -6 < Exp. Delta -2.8; cancel","duration":0,"rate":0}
enact/enacted.json raised bytearray index out of range
pumpbuilding://JSON/set_temp_basal/enact/enacted.json
Traceback (most recent call last):
...
received = True if self.data[0] is 0 else False
IndexError: bytearray index out of range
Scott Leibrand
@scottleibrand
Feb 01 2016 04:05
"No CGM data" is a really misleading error message there.
That error could mean anything failed.
It's probably usually a pump communications failure not missing CGM data.
Jason Calabrese
@jasoncalabrese
Feb 01 2016 04:08
bytearray index out of range is usually a carelink range issue
Aaron Michelson
@Aaybob
Feb 01 2016 04:10
preflight reported OK, and enact executed with error, so did gather fail?......I don't want to enact when suggested does not contain "duration".....what needs to change?
Scott Leibrand
@scottleibrand
Feb 01 2016 04:14
You should probably remove some of the /dev/null redirects so you can see what errors.
It looks like in that case gather probably succeeded and then enact itself failed (pump comms)
my enact alias tries twice
Aaron Michelson
@Aaybob
Feb 01 2016 04:19
yeah, gather doesn't fail much. So "No CGM data" warns that enact will fail...but shouldn't it report that after enact fails?
Jason Curry
@mccgm
Feb 01 2016 04:19
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
#The Path from APS Angels
SHELL=bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# The loop is run every minute and logged
* * * * * cd /home/pi/ayeletssail && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' || openaps retry-loop ) 2>&1 | tee -a /var/log/openaps/loop.log
# The date and a message is printed to the log file
* * * * * cd /home/pi/ayeletssail && echo $(date) Please work... >> /var/log/openaps/loop.log
Scott Leibrand
@scottleibrand
Feb 01 2016 04:20
@mccgm you copied the broken part too
see earlier discussion about SHELL
@Aaybob looks like you're doing enact in two places. The one inside loop is getting its output redirected to null. The one in pancreas isn't.
You should remove the redirect on enact.
and pick one place to enact, so you only do it once if it succeeds.
That pancreas loop is actually dangerous. It will keep enacting old suggestions: it doesn't have an rm
Scott Leibrand
@scottleibrand
Feb 01 2016 04:26
The enact alias is much safer.
Aaron Michelson
@Aaybob
Feb 01 2016 04:28
trying this:
preflight = ! bash -c "rm -f monitor/clock.json 2>/dev/null && openaps report invoke monitor/clock.json 2>/dev/null >/dev/null && grep -q T monitor/clock.json && echo PREFLIGHT OK || (mm-stick warmup || oref0-reset-usb; echo PREFLIGHT$
loop = ! bash -c "(openaps preflight && openaps gather 2>/dev/null >/dev/null && openaps enact) || echo "ENACT GATHER or PREFLIGHT Failure"
retry-loop = ! bash -c "until( ! mm-stick warmup || openaps loop); do sleep 5; done"
gather = ! bash -c "rm -f monitor/*; openaps monitor-cgm && openaps monitor-pump && openaps gather-profile"
enact = ! bash -c "rm -f enact/suggested.json; openaps report invoke enact/suggested.json && cat enact/suggested.json && grep -q duration enact/suggested.json; openaps report invoke enact/enacted.json || echo No action required"
Scott Leibrand
@scottleibrand
Feb 01 2016 04:33
That looks much safer
Now to test it and see if it actually works. :-)
Jason Curry
@mccgm
Feb 01 2016 04:33
I knew there was a reason I haven't copied/pasted until now. Thank you, thank you, thank you.
Scott Leibrand
@scottleibrand
Feb 01 2016 04:35
:-)
Aaron Michelson
@Aaybob
Feb 01 2016 04:36
command line: openaps loop
PREFLIGHT OK
determine-basal://text/shell/enact/suggested.json
{"delta..."sens":20}
reporting enact/suggested.json
{"temp...Delta -5.9; no temp to cancel"}
pumpbuilding://JSON/set_temp_basal/enact/enacted.json
enact/enacted.json raised unsupported operand type(s) for %: 'NoneType' and 'int'
Traceback (most recent call last):
...
TypeError: unsupported operand type(s) for %: 'NoneType' and 'int'
No action required
Aaron Michelson
@Aaybob
Feb 01 2016 04:37
So no action required but it tried to enact....how do I stop it from enacting when no action is required?
Scott Leibrand
@scottleibrand
Feb 01 2016 04:37
^^ re copy and paste. :-)
You want an && instead of a ; before openaps report invoke enact/enacted.json
so it will only enact if that grep returns true.
Jason Calabrese
@jasoncalabrese
Feb 01 2016 04:40
for anyone using the openaps NS plugin with multiple rigs, I've been working on nightscout/cgm-remote-monitor#1487
should fix some of the issues @eyim saw
Scott Leibrand
@scottleibrand
Feb 01 2016 04:43
We should have a contest to see who can find the most creative way to work https://en.m.wikipedia.org/wiki/Cargo_cult_programming (or links that better illustrate the principle) into the openaps/docs to effectively warn people against copying and pasting without understanding.
Jason Curry
@mccgm
Feb 01 2016 04:48
+1
eyim
@eyim
Feb 01 2016 04:48
@jasoncalabrese Thank you Jason! I'm deploying now and will test tonight.
Jason Curry
@mccgm
Feb 01 2016 04:50
@scottleibrand How about the frequent reminder that life is on the line?...and that the FDA is a regulatory agency?
Scott Leibrand
@scottleibrand
Feb 01 2016 04:55
I don't think the FDA is going to save you if you do something stupid without understanding. :)
(not what you meant, I know.) ;-)
Jason Curry
@mccgm
Feb 01 2016 04:59
Indeed. Two different points altogether! Thanks again for what you're doing.
Aaron Michelson
@Aaybob
Feb 01 2016 04:59
Does this mean I need to use sudo?
Power-cycling USB to fix dead Carelink stick
/usr/local/bin/oref0-reset-usb: 29: /usr/local/bin/oref0-reset-usb: cannot create /sys/devices/platform/soc/3f980000.usb/buspower: Permission denied
Scott Leibrand
@scottleibrand
Feb 01 2016 04:59
probably means your pi uses a different /sys/device than ours. lemme check
no, you are correct: you need sudo for that
openaps alias add preflight '! bash -c "rm -f monitor/clock.json && echo -n \"PREFLIGHT \" && openaps report invoke monitor/clock.json 2>/dev/null >/dev/null && grep -q T monitor/clock.json && echo OK || ( ( mm-stick warmup 2>&1 || sudo oref0-reset-usb ) | egrep -v \"^ \"; echo FAIL; openaps get-bg; sleep 120; exit 1 )"'
Aaron Michelson
@Aaybob
Feb 01 2016 05:18
alright thanks for helping me clean up the code and the log files. I'm of the opinion that setting up Nightscout is difficult and can't be done with the existant old documentation. I'm getting help on facebook but may need to restart the process. SSOOO would it be a good idea to re-do openaps using https://github.com/loudnate/xDripG5 as master? just bought galaxy s4 and htc x(which didn't work), but I wouldn't need them and I could use the non-wired nightscout solution.
Scott Leibrand
@scottleibrand
Feb 01 2016 05:19
https://github.com/loudnate/xDripG5 is a library for app developers to use. it's not a program.
and it runs on iOS, so no way to incorporate it into a loop running on Linux
Aaron Michelson
@Aaybob
Feb 01 2016 05:20
so i can't use G5?
Jason Curry
@mccgm
Feb 01 2016 05:20
@Aaybob I had no problem setting up and drawing data from Nightscout using existing docs
Aaron Michelson
@Aaybob
Feb 01 2016 05:22
@mccgm great! uhhh but then you aren't familiar with the troubleshooting documentations so as to be able to help me?
Scott Leibrand
@scottleibrand
Feb 01 2016 05:23
@Aaybob if you want to use G5, the way to do it is to set up NS with the share bridge to pull the BG from Dexcom's Share servers.
once you have that working you can look at using the G5 dexcom_reader branch for wired CGM data as well (for offline use)
Aaron Michelson
@Aaybob
Feb 01 2016 05:24
@scottleibrand I want both nightscout and openaps.....i thought there was a version of openaps library that worked with G5.
Scott Leibrand
@scottleibrand
Feb 01 2016 05:25
openaps will work fine if you do G5 -> Share -> NS -> openaps
if you mean something other than that, you'll have to be more specific
Aaron Michelson
@Aaybob
Feb 01 2016 05:28
I have an old G4, I started using it again because G5 didn't work with openaps. So leaving aside the questions about nightscout. Is there a version of openaps on git that I can make my master and run the same openaps.ini file and use the dexcom g5 ?
Scott Leibrand
@scottleibrand
Feb 01 2016 05:29
no
there is a custom branch of dexcom_reader you can install, but I don't remember what it is
last I heard the G5 code was incompatible with the G4 code, so they can't merge it into the main dexcom_reader until they get some version-detection logic added.
Aaron Michelson
@Aaybob
Feb 01 2016 05:31
I so wanted to get nightscout working this weekend
Scott Leibrand
@scottleibrand
Feb 01 2016 05:33
if you're interested in the G5 stuff, the gory details are at bewest/dexcom_reader#1
can you get it working with the G4 for now?
Jason Curry
@mccgm
Feb 01 2016 05:39
@Aaybob What step are you on with NS?
Aaron Michelson
@Aaybob
Feb 01 2016 05:39
It was working for a while, now the graph doesn't show on the android but the current bg and arrow do, the website doesn't show any information but I think it did before azure secret. I just did the first step of "visualization" and made a profile I think by naming it and changing it to color and selecting basal from none to default
Scott Leibrand
@scottleibrand
Feb 01 2016 05:39
are you trying to do android-uploader?
you probably want the share bridge instead
Aaron Michelson
@Aaybob
Feb 01 2016 05:40
i made a wired rig with my g4 no share
Jason Curry
@mccgm
Feb 01 2016 05:40
G4 wired to an android?
Aaron Michelson
@Aaybob
Feb 01 2016 05:40
yes
Scott Leibrand
@scottleibrand
Feb 01 2016 05:41
ok, that will work with a non-share G4, but there is an easier way to have NS pull the data direct from Share for both G4 and G5 support
scottleibrand @scottleibrand steps out to let @mccgm help :)
Aaron Michelson
@Aaybob
Feb 01 2016 05:42
i didn't upgrade to g4 with share i went from g4 without share to g5
Jason Curry
@mccgm
Feb 01 2016 05:42
Does your G4 do BT share?
oko
Aaron Michelson
@Aaybob
Feb 01 2016 05:42
I can't keep doing these late nights...........
Jason Curry
@mccgm
Feb 01 2016 05:43
You're using xdrip?
I found a lot of good info at: http://www.nightscout.info/
lizarragakevin
@lizarragakevin
Feb 01 2016 06:01
I have a problem, when I try to run the command (openaps init <filename>) it says that I don't have space on the device but I'm working with a 8Gb sd card
Scott Leibrand
@scottleibrand
Feb 01 2016 06:03
did you do the raspi-config expand file system thing?
Jason Calabrese
@jasoncalabrese
Feb 01 2016 06:03
hmm, I'm seeing more usb resets with multiple rigs hitting the pump
Scott Leibrand
@scottleibrand
Feb 01 2016 06:03
not surprised
lizarragakevin
@lizarragakevin
Feb 01 2016 06:04
Ahhh no i didn't
Jason Calabrese
@jasoncalabrese
Feb 01 2016 06:05
I thought that the mmstick warmup was only checking if the stick was connected, it's testing connection to pump too?
Scott Leibrand
@scottleibrand
Feb 01 2016 06:05
if that fixes it, you might want to fork the docs repo, update https://github.com/openaps/docs/blob/dev/docs/Resources/troubleshooting.md with the symptoms and the link to the fix, and submit a pull request to dev
@jasoncalabrese it's not querying the pump, but something about aborted comms seems to put the stick in the broken state
Jason Calabrese
@jasoncalabrese
Feb 01 2016 06:06
crazy that the ti stick is working from my desk downstairs
Scott Leibrand
@scottleibrand
Feb 01 2016 06:07
:-D
Jason Calabrese
@jasoncalabrese
Feb 01 2016 06:07
but wasn't working 5ft away earlier
Ali Mazaheri
@amazaheri
Feb 01 2016 06:13
Told you, its random :)
Radio Waves!
Scott Leibrand
@scottleibrand
Feb 01 2016 06:26
and interference from 900Mhz cordless phones and crap like that. :)
Jason Calabrese
@jasoncalabrese
Feb 01 2016 06:27
I was thinking of that, might make night time work better
Jason Calabrese
@jasoncalabrese
Feb 01 2016 06:54
Screen Shot 2016-01-31 at 10.53.07 PM.png
multiple devices, indy2, indy-e1, and indy1
Scott Leibrand
@scottleibrand
Feb 01 2016 07:01
nice
Sulka Haro
@sulkaharo
Feb 01 2016 07:03
Ooh Jason awesome
Dana Lewis
@danamlewis
Feb 01 2016 07:07
Those are looking good, @jasoncalabrese
Sulka Haro
@sulkaharo
Feb 01 2016 07:14
Hey regarding data visualization -> what probably would work quite well is, any time the APS enacts a change, we should label the data updates, so we could more easily cherry pick updates to the timeline. The amount of data needed for the scrolling back to get the updates is just too much, NS killing browsers with the openaps data.
Jason Calabrese
@jasoncalabrese
Feb 01 2016 07:32
I was thinking that maybe we could load retro data when you start to scrollback
if we could get that to work, we could jump to another date/time
lots of perf work needed, would be great if someone with a fresh eye could do some review, run the profiler, etc
Scott Leibrand
@scottleibrand
Feb 01 2016 07:34
:+1:
is there anyone in #nightscout/public we could recruit?
Jason Calabrese
@jasoncalabrese
Feb 01 2016 07:37
a lot of the perf issues are related to all the extra openaps stuff, so unless someone is also looping I don't think they'd see the issues
Scott Leibrand
@scottleibrand
Feb 01 2016 07:38
true
unless we gave them access to a site
Jason Calabrese
@jasoncalabrese
Feb 01 2016 07:39
I need a better way to setup a test site too
the old mongodump/restore isn't working great now that data is getting bigger
eyim
@eyim
Feb 01 2016 08:38
@jasoncalabrese Do I need to do anything to get the device name to show up? In mine it simply says from device
blob
Jason Calabrese
@jasoncalabrese
Feb 01 2016 08:42
You need to latest dev version of oref0, it send the hostname of the device
eyim
@eyim
Feb 01 2016 08:52
Worked great!!
:+1:
dougtakeuti
@dougtakeuti
Feb 01 2016 10:20
I started afresh with openaps this weekend, to the point of getting a new SD card and configuring the pi from scratch. I read the docs from the very beginning and there was SO MUCH improvement! Congratulations to whoever worked on it! Thank you, thank you, thank you!
Scott Leibrand
@scottleibrand
Feb 01 2016 10:33
lots of people have been contributing: really glad it's helping!
dougtakeuti
@dougtakeuti
Feb 01 2016 11:11
That picture of the SF meeting on Twitter was really cool. I wish I could be there to hang out with such pioneers! However, 6500 miles is a bit of a stretch. I might go to the US in May, so maybe I'll get the chance...
dougtakeuti
@dougtakeuti
Feb 01 2016 17:12
@scottleibrand I really needed that restart. It's also so much easier now that I have a better grasp of how the system works. All the mistakes I made and the basic questions that I had to ask forced me to dig into different parts of Linux and openaps. I'm very grateful for the great bunch of people who helped me so far.
But... there are more questions! So I got cron to work last night and I basically have
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
*/5 * * * * cd /home/pi/jujuba &&  openaps loop >> /var/log/openaps/loop.log
dougtakeuti
@dougtakeuti
Feb 01 2016 17:20
The loop alias has everything: preflight, rm old stuff, gather, calculate iob, suggest, enact. I also have an upload_to_ns alias. I tried to include another line in cron, just like the one above, but no luck. I also tried to include this alias into loop, maintaining cron as one line, but that didn't work either. What is the proper way of doing this?
Scott Leibrand
@scottleibrand
Feb 01 2016 17:50
I'll need to know how it "didn't work"
Sulka Haro
@sulkaharo
Feb 01 2016 18:43
Ha, just learned today that a colleague is T1. She wasn't aware of Nightscout or OpenAPS, showing her everything tomorrow :)
Dana Lewis
@danamlewis
Feb 01 2016 18:43
:)
Sulka Haro
@sulkaharo
Feb 01 2016 18:44
Incidentally she's a software developer in charge of our continuous integration systems including unit testing, so she'd make an amazing addition to the openaps team :)
Dana Lewis
@danamlewis
Feb 01 2016 18:44
:D
Scott Leibrand
@scottleibrand
Feb 01 2016 18:49
Sweet! Get her hooked! ;-)
Jason Calabrese
@jasoncalabrese
Feb 01 2016 18:53
:+1:
Sulka Haro
@sulkaharo
Feb 01 2016 19:04
Will do my best. She'd have to pay Dex 100% out of pocket though, which might take some convincing.
Dana Lewis
@danamlewis
Feb 01 2016 19:12
yea. but 2x sensor life comparatively to other CGMs.
speaking of sensor life: my sensors can last two weeks, but the third week they instantly go to heck in a handbasket, not sure why. But, I’ve been consistently putting in a new sensor and setting my OLD DEAD transmitter on it for a day (to protect the new one), to let it “soak”, before putting the live transmitter on it and restarting the CGMs.
I was’t sure it was making that much of a difference..but was on a sensor last night that totally bit the dust (was just starting 3rd week), had to put on a sensor without letting it soak for any time at all, and it was horribly crappy and jumpy for hours. So, I’m sold on the “soak your new sensor” for a while concept, and highly recommend trying that if anyone is unhappy with jumpy day 1 sensor nonsense.
Toby Canning
@TC2013
Feb 01 2016 19:28
Hi All. I'm attempting to create an alias I can run to set an alternate basal profile. I tried: mm-send-comm.py --serial 123456 --port /dev/ttyMFD1 ManualCommand 74 --params 2 I get an long error that indicates the attempt to use the manual command failed. Any thoughts on how to correctly send this command?
Oh, and I am running the command from the decocare directory
Toby Canning
@TC2013
Feb 01 2016 19:50
Progress: the command works just fine using the CareLink (as long as I remember to wake the pump first), but not using the RileyLink
Ben West
@bewest
Feb 01 2016 19:59
does that switch basal profiles?
interesting
should be supported better
Jason Calabrese
@jasoncalabrese
Feb 01 2016 20:04
I thought that didn't work, there was an issue with some comments about those types of commands
Ben West
@bewest
Feb 01 2016 20:23
those are potentially dangerous, all the guards come off
Toby Canning
@TC2013
Feb 01 2016 20:23
Yes, that command switches the basal profiles.. If you are in profile A or B and you hit ESC, it shows PATTERN A or PATTERN B
Ben West
@bewest
Feb 01 2016 20:24
oh
just used tweak SelectBasalProfile
it's supported
er
SelectBasalProfileSTD
SelectBasalProfileSTD vs SelectBasalProfileA, vs SelectBasalProfileB
just run those tweak commands with no params
Jason Calabrese
@jasoncalabrese
Feb 01 2016 20:25
@TC2013 when are you automating the basal profile change?
Ben West
@bewest
Feb 01 2016 20:25
sounds like he's doing it manually
can make this usable in openaps pretty easily
Toby Canning
@TC2013
Feb 01 2016 20:25
Manually for now, but I was planning on having them switch on weekends and some other events
Dana Lewis
@danamlewis
Feb 01 2016 20:26
:D :D :D :D
Toby Canning
@TC2013
Feb 01 2016 20:27
One idea I want to try out is having Pattern B exactly 25% higher than STD, then if BGs stay above a certain range for more than 4 hours, that OpenAPS will switch to Pattern B
Ben West
@bewest
Feb 01 2016 20:27
use pump select_basal_profile_{STD,A,B}? or use pump activate_basal_profile <input> (like basal/temp-basal)
yeah, that's interesting
Dana Lewis
@danamlewis
Feb 01 2016 20:27
@TC2013 ya. we’ve been working on some auto-detection of sensitivities, too :) cc @scottleibrand
Ben West
@bewest
Feb 01 2016 20:27
keto mode
there's a way to upload new rates to basal profiles
so that'd be fun too
Dana Lewis
@danamlewis
Feb 01 2016 20:28
@bewest really?
Ben West
@bewest
Feb 01 2016 20:28
yeah, I just haven't mastered the technique yet
Dana Lewis
@danamlewis
Feb 01 2016 20:28
YES. because with only 3, that’s kind of a pain. but if you could reload, you’d save like 10 and be able to swap them in as needed...
Ben West
@bewest
Feb 01 2016 20:28
yeah
you can swap/cp them
adjust just one thing, cp it back in
they used to sell a program that did this
er, not sell
they used to give away a program that did this
C-Ville
@C-Ville
Feb 01 2016 20:31
@bewest do you happen to know if the program could modify more setup settings, would totally make sense if you want so switch pumps or set one up initially
Ben West
@bewest
Feb 01 2016 20:32
yes, it can
C-Ville
@C-Ville
Feb 01 2016 20:33
that sounds great
Jason Calabrese
@jasoncalabrese
Feb 01 2016 20:33
openaps/oref0#58
Ben West
@bewest
Feb 01 2016 20:36
@TC2013 did what I say about using tweak SelectBasalProfile * make sense?
https://github.com/bewest/decoding-carelink/blob/master/decocare/commands.py#L243-L253 is the params, they are built into those commands (no params needed for the specific selector commands)
C-Ville
@C-Ville
Feb 01 2016 20:38
@danamlewis was too early aksing who might go to ATTD, just had to cancel my trip today :-(
Dana Lewis
@danamlewis
Feb 01 2016 20:40
:/
Matthias Granberry
@mgranberry
Feb 01 2016 20:42
@danamlewis is there a discussion of auto-determining sensitivities somewhere? I've done some experiments where I fit data to the Havorka model and had decent luck for long-term shifts in sensitivity, but I never figured anything out that worked well short-term
Scott Leibrand
@scottleibrand
Feb 01 2016 20:42
yeah, that link @jasoncalabrese just posted
Dana Lewis
@danamlewis
Feb 01 2016 20:42
openaps/oref0#58 w
we just started playing around with it, @scottleibrand pulled some ratios but I haven’t had time to correlate them with what i’ve seen yesterday/today, so don’t have a strong opinion on it yet
Scott Leibrand
@scottleibrand
Feb 01 2016 20:43
happy to explain the parts that don't make sense. I think I'm the only one that understands what I've done so far. :)
basic idea is that, at each BG data point for the last 24h, you can see that the 15m avgdelta is and compare that to BGI (how much BG should be dropping from insulin alone) to get an array of deviations. when sensitivity is normal and basals are well tuned, somewhere between 30% and 50% of the deviations should be negative, and the other 50 to 70% should be positive. if you're outside of that range, you are probably running sensitive or resistant, so we can adjust accordingly
the reason more than 50% should be positive is that for about 1/4 of the day your deviation is positive because you're absorbing food
Matthias Granberry
@mgranberry
Feb 01 2016 20:50
it looks like it would be fairly sensitive to incorrectly-set basal rates
Toby Canning
@TC2013
Feb 01 2016 20:53
@bewest Sorry Ben! I had to jump back into my day job... I'll give that a try tonight, but yes, it makes sense.
Ben West
@bewest
Feb 01 2016 20:56
ok great, opinions welcome on openaps' usages to expose this
Matthias Granberry
@mgranberry
Feb 01 2016 20:57
my knee-jerk reaction is that the same thing could be accomplished with a lot less code, but I'm not seeing how right now. It seems like it should work, but it feels a little chintzy without any modeling of food absorption along with it. My biggest indicator of insulin resistance is often the massive meal spikes that it leads to.
this looks like it isn't going to be particularly sensitive to that, but perhaps more sensitive to food-free drift.
Ben West
@bewest
Feb 01 2016 20:58
anyone's pi clock drifting like crazy?
ntp is running but it still loses time
Matthias Granberry
@mgranberry
Feb 01 2016 20:59
it also looks dead-simple, though, and like it works on some old known-resistant days that I keep around for testing
Scott Leibrand
@scottleibrand
Feb 01 2016 20:59
also, the output of that code is a single ratio number, which I use to adjust the baseline basal rate as well as the sensitivity
so if you're running super-sensitive (just ran a marathon), it'll increase ISF from 40 to 80 and reduce the starting basal rate from 1.0 to 0.5U/hr and then adjust from there.
Matthias Granberry
@mgranberry
Feb 01 2016 21:01
@bewest have you restarted ntp? You might add the -x argument if there is a lot of drift. ntpd limits the clock slew rate to prevent programs from going crazy, but the clock might be having problems.
there are knobs that you can set to increase the maximum slew rate too if it's variable.
Scott Leibrand
@scottleibrand
Feb 01 2016 21:02
so yes, it is designed to be sensitive to food-free downward drift, due to basal rates being too high for the current state of the body, and adjust basals downward to compensate
the other meal-assist algorithms do a pretty good job of dealing with larger than expected post-meal spikes due to resistance: this new auto-sensitivity stuff would only come into play for resistance when you're sick or otherwise riding high even without food
it certainly would be possible to write a carb-absorption-aware version of this algorithm: we had basically done so with the old wip/iob-cob branch of nightscout back before openaps existed.
but so far we've tried to stay away from assumptions about carb absorption curves in openaps, since they vary so much between people and diets.
Matthias Granberry
@mgranberry
Feb 01 2016 21:05
then my quick read and 2 minutes of experimentation says that it looks like it identified a few nighttime lows after hiking trips and a sick day. I'm impressed that something so simple works.
Scott Leibrand
@scottleibrand
Feb 01 2016 21:06
how are you running/testing it for experimentation?
and glad to hear it: it seems like most of my contribution to this project is thinking hard about the simplest possible algorithm to accomplish our goals. :)
Dana Lewis
@danamlewis
Feb 01 2016 21:07
:D +1
Scott Leibrand
@scottleibrand
Feb 01 2016 21:08
I haven't yet back-tested the algorithm on Dana's data, so am curious how to do so easily.
Matthias Granberry
@mgranberry
Feb 01 2016 21:08
I wrote a script to hard-code data and pasted it into the script
Scott Leibrand
@scottleibrand
Feb 01 2016 21:09
need you writing unit tests. :)
Sulka Haro
@sulkaharo
Feb 01 2016 21:09
hey btw does someone here know someone at Dexcom well? I have a potentially sensitive thing that I feel needs passing on
Matthias Granberry
@mgranberry
Feb 01 2016 21:09
that's what my boss said. I'm usually resistant to writing tests..
Scott Leibrand
@scottleibrand
Feb 01 2016 21:09
heh
Dana Lewis
@danamlewis
Feb 01 2016 21:10
@sulkaharo we can connect you with Nate, or depending on the topic someone else
(but yes)
Scott Leibrand
@scottleibrand
Feb 01 2016 21:10
@mgranberry can you share what you did so I can see if it's something I can do with our data?
I'm also curious what the ratio was when it did detect sensitive and resistant days
Matthias Granberry
@mgranberry
Feb 01 2016 21:13
yeah. Some of it depends on some code I don't own, but I can do a reimplementation tonight and make a gist
Scott Leibrand
@scottleibrand
Feb 01 2016 21:14
ah, fancy analytics tools? :)
Matthias Granberry
@mgranberry
Feb 01 2016 21:15
I'm not sure fancy's the right word, but we are starting to collect a decent bag of tricks
Scott Leibrand
@scottleibrand
Feb 01 2016 21:18
:+1:
I wonder if I need to up my game and learn how to use real analytics tools instead of just looking at data, thinking about it, and writing code.
Matthias Granberry
@mgranberry
Feb 01 2016 21:20
a 3-day backpacking trip led to a .8 ratio recommendation
Scott Leibrand
@scottleibrand
Feb 01 2016 21:20
That sounds reasonable.
Our DIYPS sensitivity mode was also 20%
(is)
Matthias Granberry
@mgranberry
Feb 01 2016 21:21
"real analytics tools" are often awful, but it's nice being able to look at a scatter plot and get some information about predictions/actual occurrences visually without time interfering
scottleibrand @scottleibrand nods
Matthias Granberry
@mgranberry
Feb 01 2016 21:23
but I've also done most of my analytics works for small (usually broke) start-ups, so I haven't played with many of the big boy tools
Scott Leibrand
@scottleibrand
Feb 01 2016 21:23
i forget: are you looping yet?
Matthias Granberry
@mgranberry
Feb 01 2016 21:24
no. I keep putting it off because I was hoping to break into my t:slim vs. deal with all of the comm issues on the medtronic pumps. I now have a 722 but no supplies or carelink stick.
Scott Leibrand
@scottleibrand
Feb 01 2016 21:25
You might be able to skip straight to the TI cc1111 stick if you can't get a Carelink.
Matthias Granberry
@mgranberry
Feb 01 2016 21:25
Running OpenAPS as an open-loop controller on my pump/cgm data makes good recommendations, though, so I should bite the bullet and run with it.
yeah, that was my plan
Scott Leibrand
@scottleibrand
Feb 01 2016 21:25
That would probably also be useful for RE on other pumps too.
Sulka Haro
@sulkaharo
Feb 01 2016 22:22
Hey autosens sounds pretty cool, @scottleibrand wanna share what the magic is
Sulka Haro
@sulkaharo
Feb 01 2016 22:27
That's awesome.
Dana Lewis
@danamlewis
Feb 01 2016 22:28
:+1:
More testing & work to come!
Jason Calabrese
@jasoncalabrese
Feb 01 2016 22:33
I was thinking how great it is that things like autosens and meal-assist can go from idea to experiment so quickly
Scott Leibrand
@scottleibrand
Feb 01 2016 22:39
yeah, that's the beauty of OpenAPS
Jim Matheson
@jmatheson
Feb 01 2016 22:42
Nice re #58. I was thinking it’d be great to have a solution to auto adjust for altitude (I was thinking via iOS altimeter). #58 may just take care of that - especially with everyone being different, or at least take care of it with a little delay.
Scott Leibrand
@scottleibrand
Feb 01 2016 22:44
just updated openaps/oref0#58 with my earlier description of how it works, for anyone who doesn't read all the scrollback. :)
I wonder what kinds of timeframes we should be using. I've been mostly doing 24h so far, but perhaps we could do something as short as 8h, perhaps with wider acceptable percentile ranges.
otherwise it takes 12-24h to detect sensitivity, which is a bit too late to help with the initial lows the night after big exercise or something
Ben West
@bewest
Feb 01 2016 23:51
got a basic hello world daemon running https://gist.github.com/bewest/eef6d3a5a127ae5f7f89
I can easily export any openaps/admin tools over ble interface
if anyone wants to help drive a mobile/desktop app or similar...
Jason Calabrese
@jasoncalabrese
Feb 01 2016 23:56
a daemon makes sense for working with ble devices so you could try keeping a connection open
and if you want to talk to the loop
but does add complexity since you're not starting fresh each loop