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

29th
Sep 2016
Scott Leibrand
@scottleibrand
Sep 29 2016 00:00
and are you using an oref0-setup loop, or a manually installed one?
garykidd
@garykidd
Sep 29 2016 00:01
oh...right...didn't turn on AMA on my current instance...... I did enable it with my second instance but still need to figure out the RF thing...
but yes oref0- dev
Scott Leibrand
@scottleibrand
Sep 29 2016 00:01
so yeah, you'll need AMA to get the purple line arrays uploaded
garykidd
@garykidd
Sep 29 2016 00:02
OK, is there something separate ENABLE variable as well
Scott Leibrand
@scottleibrand
Sep 29 2016 00:03
yeah
env SHOW_FORECAST="openaps ar2"
David
@davidkeddydb
Sep 29 2016 00:10
@scottleibrand Awesome. Is the dev Oref0 up now on openaps.org or do you have it somewhere separate in Github? I want try to try it before stuff arrives for my portable rig
Dana Lewis
@danamlewis
Sep 29 2016 00:14
If you want dev, just change the branch. It's not separate.
Scott Leibrand
@scottleibrand
Sep 29 2016 00:16
@davidkeddydb I would recommend following http://openaps.readthedocs.io/en/oref0-setup/index.html (which includes directions for oref0-setup.sh). Please then comment on openaps/docs#393 and let us know if there's anything that needs to be changed...
David
@davidkeddydb
Sep 29 2016 00:21
@scottleibrand @danamlewis Will do. I am the perfect test dummy as the only linux and git I know I learned setting this up! Here we go..
Dana Lewis
@danamlewis
Sep 29 2016 00:22
:+1:
fiberfan
@fiberfan
Sep 29 2016 00:30
@mhaeberli , thanks for that link! I still have more to read but it is very interesting - I work for a company that makes both diagnostic and research systems.
garykidd
@garykidd
Sep 29 2016 00:49
Do folks prefer the Panasonic 18650 batteries for their rigs or the thinner lipo batteries?
garykidd
@garykidd
Sep 29 2016 00:56
This message was deleted
@scottleibrand any chance you might be able to test the mmtune.py default frequency change I was trying the other night?
garykidd
@garykidd
Sep 29 2016 01:50
Was curious if ppl are working on hacking "PC Connect" pumps...are is it not worth the effort?
David
@davidkeddydb
Sep 29 2016 01:52
@scottleibrand Ok, I have commented. It is pretty slick, some issues with some of the reports not loading direct. NS upload doesn't work. I am rechecking I didn't screw up secret or something right now
I am looping in all of what took under 5 minutes.
Dana Lewis
@danamlewis
Sep 29 2016 01:55
@garykidd the pc connect ones time out after a minute..so not enough time to read/write in that time frame reliably
David
@davidkeddydb
Sep 29 2016 01:56
Does crontab run just in order of the commands, top to bottom or does it run by time, ie you have something every 1/ minute; it goes and then 5/ minute goes? Does that make sense?
garykidd
@garykidd
Sep 29 2016 01:57
hmmm...but are you able to get data off them without manually selected the PC Connect option...or can that be remotely triggered?
I wish I could take my 712 and my 715 and smash them together and create a 722 or 723.....
and I'm guessing MM just ended up destroying thousands of them when ppl were upgrading......such a shame.
@danamlewis I know you have like 7 or more rigs but what are you using for batteries for edison rig/s?
Dana Lewis
@danamlewis
Sep 29 2016 02:01
2200mah batteries typically
garykidd
@garykidd
Sep 29 2016 02:02
the flat, lithium polymer batteries?
Hey, slightly off topic but would you...or do you ever eat at subway, dana?
garykidd
@garykidd
Sep 29 2016 02:07
I understand that there are options--especially out west....gradually spreading around here too (east Coast)
I don't think...wait I pretty much know that I would never............
Eric Jensen
@elnjensen
Sep 29 2016 02:11
@davidkeddydb crontab runs by time - order in the file doesn't matter at all. Something with * in the first column will run every minute (starting right on the minute, i.e. at :00). Something like */5 runs every five minutes, on the multiples of 5.
If you type man 5 crontab on your rig you'll be the help page ('man page' in linux parlance) that explains how it's structured. Lots there, but if you scroll down a page or so it explains the time fields.
In @scottleibrand's default crontab from the oref0 setup script, all the different loops run simultaneously, every minute. That seemed like overkill for me (and was also maxing out my Azure daily CPU limit :worried:), so I changed them to every five minutes. Then I also staggered them a little, by adding sleep 1m; to the start of one and sleep 2m to the start of another.
garykidd
@garykidd
Sep 29 2016 02:14
@elnjensen left you a one-on-one message in case you didn't see it.
Eric Jensen
@elnjensen
Sep 29 2016 02:15
OK, thx @garykidd
So that part of my crontab looks like this:
*/5 * * * * sleep 1m; cd /home/pi/myopenaps_advanced && ps aux | grep -v grep | grep -q 'openaps get-bg' || ( date; openaps get-bg ; cat cgm/glucose.json | json -a sgv dateString | head -1 ) | tee -a /var/log/openaps/cgm-loop.log
*/5 * * * * sleep 2m; cd /home/pi/myopenaps_advanced && ps aux | grep -v grep | grep -q 'openaps ns-loop' || openaps ns-loop-nobg | tee -a /var/log/openaps/ns-loop.log
*/5 * * * * cd /home/pi/myopenaps_advanced && ( ps aux | grep -v grep | grep -q 'openaps pump-loop' || openaps pump-loop ) 2>&1 | tee -a /var/log/openaps/pump-loop.log
David
@davidkeddydb
Sep 29 2016 02:16
@elnjensen Thanks. I was looking at it and thinking along those same lines but I didnt know how to switch it, ie the delay
Eric Jensen
@elnjensen
Sep 29 2016 02:17
You could do it other ways like list all the times you want it to run, e.g. 6,11,16,21 etc. but that's pretty tedious if all you want is every five minutes plus some offset.
I also have some things I run only at night vs. day, so entries like this:
# Night loop 11 PM - 7 AM; - no push, no reporting to Nightscout (offline use). 
*/5 0-6,22-23 * * * cd $OPENAPS_DIR ; (openaps suggest && openaps enact) |& logger -t openaps_loop
That's every five minutes (first field) and on hours (second field) of 10 PM through 6 AM (well really through 6:59 AM).
David
@davidkeddydb
Sep 29 2016 02:18
Don't cringe but some of the cron stuff with the reset of the usb's for example, I am ok if it doesnt run every 5 mins. I will tinker with it now that I know it is just time specific
@elnjensen Awesome. I may set those up as I am doing this to get prepped for edison and going portable
though I will likely just have 2 rigs
on the cron tab set up on Oref0 dev there is some issue with the set up it gets hung up, or it may be my carelink stick is causing the whole problem
Scott Leibrand
@scottleibrand
Sep 29 2016 02:21
@elnjensen you can just do 1-59/5 or 2-59/5 etc rather than writing them all out
@davidkeddydb why are you fiddling with cron?
oref0-setup is designed so you don't have to. it shouldn't actually do much except when a new BG comes in (every 5 minutes) anyway
David
@davidkeddydb
Sep 29 2016 02:23
When it comes out of Dev direct there is no time set in Cron, I thought when I looked at it they were all just * with no times set? Did I screw up it in editing? I will undo and retry
Scott Leibrand
@scottleibrand
Sep 29 2016 02:24
@elnjensen If we need to be gentler on NS, we can adjust the ns-loop timing if you want, but absolutely no reason to slow down pump-loop
@davidkeddydb that * * * * * is exactly what it should be
that means "run this every minute", but the first thing it does when running is check to see if another instance is already running. if so, it quits and waits until the next minute
but sounds like you were having some other issue that might be worth investigating?
garykidd
@garykidd
Sep 29 2016 02:25
Was just testing the PC Connect Option on a MM 751NAS pump..it look slike when you select Utilities...Connect Devices.....PC Connect.....Change Settings...... the pump will wait for Change Settings and presumably? be open to receiving commands for exactly 3 mins....
Scott Leibrand
@scottleibrand
Sep 29 2016 02:26
@garykidd correct. but there's no way to extend that 3 minutes, so that makes it fairly worthless for anything other than... (wait for it...) changing settings. ;-)
@davidkeddydb did you enter your plain text api secret or your hashed api secret into oref0-setup.sh?
@garykidd yes, I can look at mmtune.py tonight. :)
garykidd
@garykidd
Sep 29 2016 02:27
You couldn't conceivably break up the coms to fit nicely well inside 3 minutes? I would've thought that was possible
@scottleibrand sweeet
Scott Leibrand
@scottleibrand
Sep 29 2016 02:27
problem is you have no way to loop again 5 minutes later
you have to push the physical buttons to get it into PC Connect mode again
so it's fine for testing, but not for actually looping
garykidd
@garykidd
Sep 29 2016 02:28
so you cant remotely trigger the PC connect...Change Settings...
Scott Leibrand
@scottleibrand
Sep 29 2016 02:28
right
David
@davidkeddydb
Sep 29 2016 02:28
@scottleibrand I entered where it asked in the setup. Trying again. Given how quick it goes, I am happy to do it. :smile:
Scott Leibrand
@scottleibrand
Sep 29 2016 02:29
@davidkeddydb but what did you enter? a really long string of hexadecimal characters (0-9 and a-f) or a shorter plain text password?
the long string of hex is a hash, which won't work. you have to enter the plain text API secret.
David
@davidkeddydb
Sep 29 2016 02:30
short plan text password which I think it then converted
Scott Leibrand
@scottleibrand
Sep 29 2016 02:30
ok, that's fine
if you do the already-converted version it'll convert it a second time, which won't work
but sounds like that's not your issue
David
@davidkeddydb
Sep 29 2016 02:30
I also have to knock out the cron tab so it can reset it when I reinstall as I messed it up.
Scott Leibrand
@scottleibrand
Sep 29 2016 02:31
ya, if you want you can just delete the crontab contents and re-run oref0-setup
Scott Leibrand
@scottleibrand
Sep 29 2016 02:38
ok @garykidd I just changed my mmtune.py and openaps use pump mmtune picked up the changes
David
@davidkeddydb
Sep 29 2016 02:38
@scottleibrand ok. Went back and reinstalled and saved the Cron as it was
Scott Leibrand
@scottleibrand
Sep 29 2016 02:38
@garykidd from ~/src/mmeowlink I edited mmeowlink/mmtune.py, then did python setup.py install
want to give that another try?
David
@davidkeddydb
Sep 29 2016 02:39
I am getting a boatload of Sep 28 22:38:37 raspberrypi bad zero CRC? Wondering if this is the carelink stick
Scott Leibrand
@scottleibrand
Sep 29 2016 02:39
@davidkeddydb where do those show up?
I think those are harmless warnings you can ignore, at least usually
garykidd
@garykidd
Sep 29 2016 02:39
@scottleibrand yes.
brb
David
@davidkeddydb
Sep 29 2016 02:40
@scottleibrand ep 28 22:38:37 raspberrypi bad zero CRC?
Sep 28 22:38:48 raspberrypi bad zero CRC?
Sep 28 22:38:51 raspberrypi Stick transmit[TransmitPacket:ReadProfile_STD512:data:unknown] reader[ReadRadio:size:206] download_i[2] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]:download(attempts[2],expect[0],results[0]:data[0]):BAD AILING
Sep 28 22:38:54 raspberrypi Stick transmit[TransmitPacket:ReadProfile_STD512:data:unknown] reader[ReadRadio:size:206] download_i[3] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]:download(attempts[3],expect[0],results[0]:data[0]):BAD AILING
Think it is the stick. Will take it out and set it again
Scott Leibrand
@scottleibrand
Sep 29 2016 02:41
@davidkeddydb I wasn't asking what you were seeing, but where you were seeing it. what log file is that, or what command did you run?
but yeah, reseating the stick sounds like a good idea
David
@davidkeddydb
Sep 29 2016 02:41
sorry, tail -f /var/log/syslog
Scott Leibrand
@scottleibrand
Sep 29 2016 02:41
k
FWIW none of the useful stuff outputs to syslog with an oref0-setup loop by default
David
@davidkeddydb
Sep 29 2016 02:42
Yeah I see that. With my luck my carelink stick has decided to die
Scott Leibrand
@scottleibrand
Sep 29 2016 02:43
instead you can use the command in step 3 of http://openaps.readthedocs.io/en/oref0-setup/docs/walkthrough/phase-2/oref0-setup.html to look at the pump-loop
but the underlying decocare stuff still logs to syslog, obviously
David
@davidkeddydb
Sep 29 2016 02:46
looping ok just cant see it on nightscout for some reason.
garykidd
@garykidd
Sep 29 2016 02:47
pi@raspberrypi:~/src/mmeowlink $ python setup.py install
running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-10912.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /usr/local/lib/python2.7/dist-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.
sudo somewhere?
Scott Leibrand
@scottleibrand
Sep 29 2016 02:47
yeah, sudo python setup.py install
@davidkeddydb check the first two lines of your crontab and see if the NS host and API secret are right
you should be able to paste the NS host into a browser, of course
where are you getting BG? CGM over USB? NS?
garykidd
@garykidd
Sep 29 2016 02:49
hmmmm...thought that would've worked for sure.....
  "916.876", 
      0, 
      -99
    ]
  ], 
  "setFreq": 916.63, 
  "usedDefault": true
}pi@raspberrypi:~/APS301 $
Scott Leibrand
@scottleibrand
Sep 29 2016 02:50
This message was deleted
no, nevermind
David
@davidkeddydb
Sep 29 2016 02:50
CGM over USB. No NS option in the set up. I assume the secret api is right but it is converted to hex. I put it in as plain text
garykidd
@garykidd
Sep 29 2016 02:50
default should be 916.708 well that seems to be the best...and more importantly what I edited in mmtune.py.
Scott Leibrand
@scottleibrand
Sep 29 2016 02:51
@davidkeddydb if you unplug the CGM it should try to use NS for BG, if you entered NS info
garykidd
@garykidd
Sep 29 2016 02:51
it appeared to take edit fine with nano...that couldn't need a sudo prefix as well....
Scott Leibrand
@scottleibrand
Sep 29 2016 02:51
@garykidd no, no sudo needed when editing
next step I think is to look at the sudo python setup.py install output
@elnjensen reference for the cron offset stuff: http://serverfault.com/a/429397
garykidd
@garykidd
Sep 29 2016 02:53

here's tail end...

```Installed /usr/local/lib/python2.7/dist-packages/mmeowlink-0.8.5-py2.7.egg
Processing dependencies for mmeowlink==0.8.5
Searching for pyserial==3.1.1
Best match: pyserial 3.1.1
Adding pyserial 3.1.1 to easy-install.pth file

Using /usr/local/lib/python2.7/dist-packages
Searching for python-dateutil==2.5.3
Best match: python-dateutil 2.5.3
Processing python_dateutil-2.5.3-py2.7.egg
python-dateutil 2.5.3 is already the active version in easy-install.pth

Using /usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg
Searching for decocare==0.0.31.dev0
Best match: decocare 0.0.31.dev0
decocare 0.0.31.dev0 is already the active version in easy-install.pth

Using /home/pi/src/decocare
Searching for argcomplete==1.4.1
Best match: argcomplete 1.4.1
Processing argcomplete-1.4.1-py2.7.egg
argcomplete 1.4.1 is already the active version in easy-install.pth
Installing activate-global-python-argcomplete script to /usr/local/bin
Installing python-argcomplete-check-easy-install-script script to /usr/local/bin
Installing register-python-argcomplete script to /usr/local/bin

Using /usr/local/lib/python2.7/dist-packages/argcomplete-1.4.1-py2.7.egg
Searching for six==1.10.0
Best match: six 1.10.0
Processing six-1.10.0-py2.7.egg
six 1.10.0 is already the active version in easy-install.pth

Using /usr/local/lib/python2.7/dist-packages/six-1.10.0-py2.7.egg
Finished processing dependencies for mmeowlink==0.8.5
```

Scott Leibrand
@scottleibrand
Sep 29 2016 02:53
need a newline after the first three backticks
that looks good
garykidd
@garykidd
Sep 29 2016 02:54
yeah---messed that up..was gonna fix but ...
is it that my mmeowlink is installed in different directory perhaps?
Scott Leibrand
@scottleibrand
Sep 29 2016 02:55
root@edison-eb ~/src/mmeowlink # which mmtune.py
/usr/local/bin/mmtune.py
root@edison-eb ~/src/mmeowlink # cat `which mmtune.py`
#!/usr/bin/python
# EASY-INSTALL-SCRIPT: 'mmeowlink==0.8.5','mmtune.py'
__requires__ = 'mmeowlink==0.8.5'
__import__('pkg_resources').run_script('mmeowlink==0.8.5', 'mmtune.py')
garykidd
@garykidd
Sep 29 2016 02:56
}pi@raspberrypi:~/APS301 $ which mmtune.py
/usr/local/bin/mmtune.py
pi@raspberrypi:~/src/mmeowlink $ which mmtune.py
/usr/local/bin/mmtune.py
David
@davidkeddydb
Sep 29 2016 02:57
@scottleibrand I am going to revert back to my old set up for the meantime. The new is way easier than the old and if it actually just works off NS when uplugged vs having to change the files, that is great. I still have the upload issue to NS and my secret api and host name are both correct
Scott Leibrand
@scottleibrand
Sep 29 2016 02:58
@davidkeddydb if you have to go for the night, that's fine. or we can try to figure out why it's not uploading, if/when you have time
@garykidd try grep US /usr/local/lib/python2.7/dist-packages/mmeowlink-0.8.5-py2.7.egg/mmeowlink/mmtune.py
Eric Jensen
@elnjensen
Sep 29 2016 02:59

@scottleibrand Thanks for the cron mojo - didn't know you could do that, very useful.

Re: pump loop timing. IMO it's not that useful to run the pump loop every minute, given that there's only new CGM information with 5-minute intervals. Now you could (and maybe will :smile: ) argue that you want to take advantage of that as soon as possible, and not checking frequently means that you could add up to another 4.999 minute delay (if you run every 5 minutes and get unlucky; but avg. 2.5 min. anyway). But every minute? Seems like that almost guarantees you'll be fighting with yourself, having to jump through hoops to make sure one process isn't interfering with another. There are ways to do that, obviously, but a simpler way is to wait a bit.

David
@davidkeddydb
Sep 29 2016 02:59
@scottleibrand I can give it a little longer. What should I look at in NS
garykidd
@garykidd
Sep 29 2016 02:59
pi@raspberrypi:~/src/mmeowlink $ cat `which mmtune.py`
#!/usr/bin/python
# EASY-INSTALL-SCRIPT: 'mmeowlink==0.8.5','mmtune.py'
__requires__ = 'mmeowlink==0.8.5'
__import__('pkg_resources').run_script('mmeowlink==0.8.5', 'mmtune.py')
Eric Jensen
@elnjensen
Sep 29 2016 02:59
That's just my view - not trying at all to impose that on others or suggest that that's how it should be set up in the script.
Scott Leibrand
@scottleibrand
Sep 29 2016 03:00
@elnjensen if you're building your own loop, I agree with everything you said. but I've solved all those problems in oref0-setup, which enables us to do lots of cool things we couldn't before
garykidd
@garykidd
Sep 29 2016 03:00
pi@raspberrypi:~/src/mmeowlink $ grep US /usr/local/lib/python2.7/dist-packages/mmeowlink-0.8.5-py2.7.egg/mmeowlink/mmtune.py
    'US': { 'start': 916.300, 'end': 916.900, 'default': 916.708 },
  def __init__(self, link, pumpserial, radio_locale='US'):
Scott Leibrand
@scottleibrand
Sep 29 2016 03:00
@garykidd so that's the one we just installed, but apparently not the one it's running
@davidkeddydb can you check whether ns-loop is successfully downloading BG data from NS?
Eric Jensen
@elnjensen
Sep 29 2016 03:00
@scottleibrand Understood - I think we're on the same page. (Or at least in the same chapter... :wink: )
Scott Leibrand
@scottleibrand
Sep 29 2016 03:02
:) cool. specific cool things include enacting immediately after new BG (even with flaky comms), as you already mentioned, plus ability to have multiple rigs running and refreshing data as needed (without stepping on each other) and guarantee prompt enacts even with up to 6 rigs in range...
Eric Jensen
@elnjensen
Sep 29 2016 03:02
@scottleibrand Do you see advantages to the every-minute pump loop besides being able to take advantage of new BG data as soon as it arrives? That's the obvious one to me, but maybe I'm missing something else.
Scott Leibrand
@scottleibrand
Sep 29 2016 03:02
generally it's just a big step up for reliability
with a normal loop, if any one thing fails, you have to wait for the next 5 minute run
garykidd
@garykidd
Sep 29 2016 03:03
hmmm...I have no idea how to get the right mmtune.py to run though
Eric Jensen
@elnjensen
Sep 29 2016 03:03
6 rigs? Holy cow. :cow:
Scott Leibrand
@scottleibrand
Sep 29 2016 03:03
with this retry-loop, it will retry just the thing it needs to immediately (after checking for other rigs already talking to the pump)
normally we "only" have 4 scattered across the house
but I've had up to 7 going at once
@garykidd try this: sudo apt-get -y install locateand then sudo updatedb and then locate mmtune.py
Eric Jensen
@elnjensen
Sep 29 2016 03:04
Clearly you're operating at a scale that's beyond my setup!
Scott Leibrand
@scottleibrand
Sep 29 2016 03:05
@elnjensen you can just run oref0-setup and you'll be right there with me. :)
Eric Jensen
@elnjensen
Sep 29 2016 03:05
I ran it, then tweaked it! But it didn't create 7 hardware setups for me...
Scott Leibrand
@scottleibrand
Sep 29 2016 03:05
not on the multiple rigs, but on the reliability front at least. ;-)
Eric Jensen
@elnjensen
Sep 29 2016 03:05
Right.
Scott Leibrand
@scottleibrand
Sep 29 2016 03:05
although sounds like you disabled some of the reliability features?
@davidkeddydb there should be a cgm/ns-glucose.json in your loop dir
Eric Jensen
@elnjensen
Sep 29 2016 03:07
I guess it depends on your definition of reliability - the first day I ran it I was down for half a day because it killed my Azure setup by going over quota... :worried:
So that was a little less reliable. :wink:
Scott Leibrand
@scottleibrand
Sep 29 2016 03:07
yeah, we need to get it fixed up to use the ns device to start with
David
@davidkeddydb
Sep 29 2016 03:07
sorry ns-loop ns://JSON/shell/cgm/ns-glucose.json
json: error: input is not JSON: Unexpected '<' at line 1, column 1:
<!DOCTYPE html>
^
json: error: input is not JSON: Unexpected '<' at line 1, column 1:
<!DOCTYPE html>
^
Scott Leibrand
@scottleibrand
Sep 29 2016 03:07
I haven't quite got any volunteers to do that work yet. :)
Eric Jensen
@elnjensen
Sep 29 2016 03:07
Will that change the CPU usage? Not clear to me what happens on the NS end in responding to queries.
Scott Leibrand
@scottleibrand
Sep 29 2016 03:08
I suspect my upload mechanics are doing extra unnecessary stuff
garykidd
@garykidd
Sep 29 2016 03:08
hmmm....
pi@raspberrypi:~/src/mmeowlink $ sudo updatedb
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
/usr/bin/find: `/run/user/1000/gvfs': Permission denied
Eric Jensen
@elnjensen
Sep 29 2016 03:08
Obviously more queries = more cycles, but some are probably worse than others.
Scott Leibrand
@scottleibrand
Sep 29 2016 03:08
so replacing those with the standard documented way using the ns device should help
@garykidd ignore those. dunno what they are, but the droid we're looking for isn't in that dir. :)
garykidd
@garykidd
Sep 29 2016 03:09
sudo apt-get -y install locate seemed to work fine though
Scott Leibrand
@scottleibrand
Sep 29 2016 03:09
@davidkeddydb hmm that is odd. can you PM me your NIGHTSCOUT_HOST?
@garykidd after all the permissions errors it should give you your prompt back, and you can do locate mmtune.py
updatedb is just indexing the entire file system, so you can locate stuff
garykidd
@garykidd
Sep 29 2016 03:09
pi@raspberrypi:~/src/mmeowlink $ locate mmtune.py
/home/pi/mmeowlink-source/bin/mmtune.py
/home/pi/mmeowlink-source/mmeowlink/mmtune.py
/home/pi/src/mmeowlink/bin/mmtune.py
/home/pi/src/mmeowlink/build/lib.linux-armv7l-2.7/mmeowlink/mmtune.py
/home/pi/src/mmeowlink/build/scripts-2.7/mmtune.py
/home/pi/src/mmeowlink/mmeowlink/mmtune.py
/usr/local/bin/mmtune.py
/usr/local/lib/python2.7/dist-packages/mmeowlink-0.8.5-py2.7.egg/EGG-INFO/scripts/mmtune.py
/usr/local/lib/python2.7/dist-packages/mmeowlink-0.8.5-py2.7.egg/mmeowlink/mmtune.py
/usr/local/lib/python2.7/dist-packages/mmeowlink-0.8.5-py2.7.egg/mmeowlink/mmtune.pyc
/usr/local/lib/python2.7/dist-packages/mmeowlink/mmtune.py
/usr/local/lib/python2.7/dist-packages/mmeowlink/mmtune.pyc
Eric Jensen
@elnjensen
Sep 29 2016 03:10
I do like the various other features - oref0-setup allowed me to get up and running with AMA and temp targets quite painlessly, for example.
Scott Leibrand
@scottleibrand
Sep 29 2016 03:10
@garykidd ok, let's do the grep US thing on each of those mmtune.py files
so grep US /usr/local/lib/python2.7/dist-packages/mmeowlink/mmtune.py for example
garykidd
@garykidd
Sep 29 2016 03:10
If I can figure this RF thing out...I'm gonna move over to a fresh oref0-setup installation
Scott Leibrand
@scottleibrand
Sep 29 2016 03:11
we're looking for one that has the old 916.630 default in it
Eric Jensen
@elnjensen
Sep 29 2016 03:12
Really the only things I've changed are: 1) only pulling BGs from NS if receiver isn't plugged in; 2) changing meal stuff to use pump carbs rather than pulling NS carbs; and 3) running everything a bit less frequently. But you may have persuaded me to re-up the frequency on the pump loop a bit.
garykidd
@garykidd
Sep 29 2016 03:12
pi@raspberrypi:~/src/mmeowlink $ grep US /usr/local/lib/python2.7/dist-packages/mmeowlink/mmtune.py
    'US': { 'start': 916.300, 'end': 916.900, 'default': 916.630 },
  def __init__(self, link, pumpserial, radio_locale='US'):
hmmm but is that the only one?
Scott Leibrand
@scottleibrand
Sep 29 2016 03:12
@elnjensen 1) sounds like a good enhancement to PR back into the main oref0-setup
@garykidd it's the one I don't have, so likely
@garykidd try mv /usr/local/lib/python2.7/dist-packages/mmeowlink/mmtune.py /tmp/ and mv /usr/local/lib/python2.7/dist-packages/mmeowlink/mmtune.pyc /tmp/
and then openaps use pump mmtune again
garykidd
@garykidd
Sep 29 2016 03:14
if I got permoission denied...add sudo?
Scott Leibrand
@scottleibrand
Sep 29 2016 03:14
ya
@elnjensen 2) should already be that way: perhaps I have a bug?
@davidkeddydb if your NIGHTSCOUT_HOST is missing the http:// or https:// in front of it, try re-running oref0-setup.sh with the full URL including that
garykidd
@garykidd
Sep 29 2016 03:16
pi@raspberrypi:~/src/mmeowlink $ mv /usr/local/lib/python2.7/dist-packages/mmeowlink/mmtune.py /tmp/
mv: cannot move ‘/usr/local/lib/python2.7/dist-packages/mmeowlink/mmtune.py’ to ‘/tmp/mmtune.py’: Permission denied
pi@raspberrypi:~/src/mmeowlink $ sudo mv /usr/local/lib/python2.7/dist-packages/mmeowlink/mmtune.py /tmp/
pi@raspberrypi:~/src/mmeowlink $ mv /usr/local/lib/python2.7/dist-packages/mmeowlink/mmtune.pyc /tmp/
mv: cannot move ‘/usr/local/lib/python2.7/dist-packages/mmeowlink/mmtune.pyc’ to ‘/tmp/mmtune.pyc’: Permission denied
pi@raspberrypi:~/src/mmeowlink $ sudo mv /usr/local/lib/python2.7/dist-packages/mmeowlink/mmtune.pyc /tmp/
pi@raspberrypi:~/src/mmeowlink $ cd ..
pi@raspberrypi:~/src $ cd ..
pi@raspberrypi:~ $ cd APS301
pi@raspberrypi:~/APS301 $ openaps use pump mmtune
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 63, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 47, in __call__
    self.configure_parser(self.parser)
  File "/usr/local/bin/openaps-use", line 31, in configure_parser
    available = devices.get_device_map(self.config)
  File "/usr/local/lib/python2.7/dist-packages/openaps/devices/__init__.py", line 21, in get_device_map
    for device in Device.FromConfig(vendors, conf):
  File "/usr/local/lib/python2.7/dist-packages/openaps/devices/device.py", line 77, in FromConfig
    vendor = vendors.lookup(config.get(candidate, 'vendor').split('.').pop( ), config)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/__init__.py", line 27, in lookup
    return get_map(config)[name]
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/__init__.py", line 22, in get_map
    vendors = all_vendors(config)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/__init__.py", line 36, in all_vendors
    return get_vendors( ) + find_plugins(config)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/__init__.py", line 16, in find_plugins
    return [ v.get_module( ) for v in vendors ]
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/plugins/vendor.py", line 19, in get_module
    return importlib.import_module(self.name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/mmeowlink/vendors/mmeowlink.py", line 14, in <module>
    from .. mmtune import MMTune
ImportError: No module named mmtune
Scott Leibrand
@scottleibrand
Sep 29 2016 03:17
ok, try re-running the setup.py install
garykidd
@garykidd
Sep 29 2016 03:18
does it matter from what directory?
Eric Jensen
@elnjensen
Sep 29 2016 03:18
Re: carbs. The default setup always requests carbs from NS (ns-meal-carbs) and creates a carbhistory.json report, I believe. From the docs I was able to find on AMA, putting a blank carbs = field in the meal setup is the way to force it to use pump carbs.
Unless that has changed in the past 4-5 days. It's a fast-moving target, I know! :smile:
Scott Leibrand
@scottleibrand
Sep 29 2016 03:19
@garykidd yeah, from mmeowlink directory one level up from where you modified the mmtune.py
mine is ~/src/mmeowlink/
Eric Jensen
@elnjensen
Sep 29 2016 03:20
Re: getting BGs from NS only if receiver is not plugged in, I use this logic: if [ ! -e /dev/ttyACM0 ]; then openaps get-ns-bg; fi but don't know how portable that is. Will receiver always show up at that address?
Scott Leibrand
@scottleibrand
Sep 29 2016 03:20
@elnjensen I believe the logic behind ns-meal-carbs is it tries to download carbhistory from NS, and then if the downloaded file contains enough info to calculate COB, it overwrites the pump data with that
@elnjensen no, that is sometimes the address of the TI stick over USB. :)
Eric Jensen
@elnjensen
Sep 29 2016 03:21
Right, so it's not clear how to generalize for others.
David
@davidkeddydb
Sep 29 2016 03:21
@scottleibrand It isnt missing that, I just gave you the website. sorry, I know it has https:://. I am now getting something but the openaps status is unknown
Scott Leibrand
@scottleibrand
Sep 29 2016 03:21
@elnjensen sounds like you want to reverse the ns-meal-carbs logic, and only download from NS if the pumphistory doesn't have carb info
Eric Jensen
@elnjensen
Sep 29 2016 03:22
Yeah, hard to see for me how that would ever happen for my use case.
Scott Leibrand
@scottleibrand
Sep 29 2016 03:22
@davidkeddydb ah, ok. I am quite literal when working with computers, since they're even more so. :)
David
@davidkeddydb
Sep 29 2016 03:22
I should be also, sorry
Scott Leibrand
@scottleibrand
Sep 29 2016 03:22
@elnjensen yeah, fine for you to optimize for your specific case, but I think we can make a generalizable improvement here too
@elnjensen so there are some commands to check if a CGM is plugged in that we could use...
David
@davidkeddydb
Sep 29 2016 03:23
Screenshot 2016-09-28 23.22.53.png
Scott Leibrand
@scottleibrand
Sep 29 2016 03:23
@elnjensen what does lsusb | grep "ID 22a3" show for you?
Eric Jensen
@elnjensen
Sep 29 2016 03:24
OK, @scottleibrand, I need to sleep - will think about whether there are variations of these things we could generalize, and will try to look at ns device improvements to script soon. Basically anywhere there's a curl it might be replaceable with ns device?
Scott Leibrand
@scottleibrand
Sep 29 2016 03:24
@davidkeddydb did this rig upload that zero temp
@elnjensen sounds good, thx. yeah, more or less.
Eric Jensen
@elnjensen
Sep 29 2016 03:24
pi@raspberrypi:~/myopenaps_advanced $ lsusb | grep "ID 22a3"
Bus 001 Device 004: ID 22a3:0047
Scott Leibrand
@scottleibrand
Sep 29 2016 03:24
perfect. if you unplug the CGM that line should go away
so that's our check right there
Eric Jensen
@elnjensen
Sep 29 2016 03:25
Let's see... (and then really to bed.)
Scott Leibrand
@scottleibrand
Sep 29 2016 03:25
probably lsusb | grep "ID 22a3:0047" to be specific
Eric Jensen
@elnjensen
Sep 29 2016 03:25
pi@raspberrypi:~/myopenaps_advanced $ lsusb | grep "ID 22a3"
pi@raspberrypi:~/myopenaps_advanced $
Looks good! What's that ID?
garykidd
@garykidd
Sep 29 2016 03:25
ahhhh
Scott Leibrand
@scottleibrand
Sep 29 2016 03:25
the device ID of the dexcom
garykidd
@garykidd
Sep 29 2016 03:25
not sure where I am looking now
Eric Jensen
@elnjensen
Sep 29 2016 03:26
OK, looks promising. Off to bed now!
David
@davidkeddydb
Sep 29 2016 03:26

@scottleibrand yes, now it is uploading. I do get an error when I run openaps ns-loop Warning: Argument order has changed: please update your oref0-meal device and meal.json report to place carbhistory.json after basalprofile.json

/usr/local/lib/node_modules/oref0/lib/meal/history.js:19
for (var i=0; i < carbHistory.length; i++) {
^
TypeError: Cannot read property 'length' of undefined
at findMealInputs (/usr/local/lib/node_modules/oref0/lib/meal/history.js:19:34)
at generate (/usr/local/lib/node_modules/oref0/lib/meal/index.js:8:20)
at Object.<anonymous> (/usr/local/lib/node_modules/oref0/bin/oref0-meal.js:99:21)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
and meal-carbs

Scott Leibrand
@scottleibrand
Sep 29 2016 03:27
@elnjensen apparently they're called "idVendor" and "idProduct" in USB land: https://github.com/oskarpearson/mmeowlink/wiki/Installing-MMeowlink#using-udev-rules-to-make-meaningful-device-names
"1d50:8001" is the string for subg_rfspy USB devices
@davidkeddydb that argument order thing is a known issue. I thought I fixed it, but it's harmless either way.
@davidkeddydb that meal thing is because you've never entered any carbs, so it has no data to do meal assist with
do you normally enter carbs via pump bolus wizard or NS?
David
@davidkeddydb
Sep 29 2016 03:29
I enter them through pump
garykidd
@garykidd
Sep 29 2016 03:30
wasnt this the directory...
pi@raspberrypi:~/src/mmeowlink $ sudo python setup.py install
David
@davidkeddydb
Sep 29 2016 03:31
@scottleibrand last entry was 38 grams at 7:11 p
Scott Leibrand
@scottleibrand
Sep 29 2016 03:32
@garykidd yeah that looks right
@davidkeddydb I think you ran into a similar assumptions bug to what Eric was seeing: we assume that you've entered (or uploaded) at least one carb entry into NS at some point
his workaround might work for you, until I code up a proper fix
garykidd
@garykidd
Sep 29 2016 03:33
@scottleibrand I ran the command above but when I switched directories back to my APS instance...I got same mmtune error
Scott Leibrand
@scottleibrand
Sep 29 2016 03:33
@garykidd odd. ok, let's do a manual install hack then
David
@davidkeddydb
Sep 29 2016 03:34
@scottleibrand ok. I will search what he did and put it in place
garykidd
@garykidd
Sep 29 2016 03:34
sounds good
Scott Leibrand
@scottleibrand
Sep 29 2016 03:34
sudo cp /home/pi/src/mmeowlink/mmeowlink/mmtune.py /usr/local/lib/python2.7/dist-packages/mmeowlink/mmtune.py
This message was deleted
@davidkeddydb :point_up: September 28, 2016 8:18 PM
garykidd
@garykidd
Sep 29 2016 03:36
B-I-N-G-O !
   [
      "916.852", 
      0, 
      -99
    ], 
    [
      "916.876", 
      0, 
      -99
    ]
  ], 
  "setFreq": 916.708, 
  "usedDefault": true
}pi@raspberrypi:~/APS301 $ openaps use pump model
"715"pi@raspberrypi:~/APS301 $
Scott Leibrand
@scottleibrand
Sep 29 2016 03:37
nice!
now if you ever want to change that, you're gonna have to do that manual cp again
garykidd
@garykidd
Sep 29 2016 03:37
note all 99s...but picked my choice 916.708....and even though all 99s use model worked...hoping this will solve a lot of issues now.
gotta learn that grep command---useful.
Scott Leibrand
@scottleibrand
Sep 29 2016 03:38
yeah, grep is pretty powerful
it also has a recursive flag, to search the contents of all files under a certain directory
garykidd
@garykidd
Sep 29 2016 03:39
I'm thinking I hopefully wont have this issue...if I startover some scratch with new sd card...and new oref0-setup
Scott Leibrand
@scottleibrand
Sep 29 2016 03:39
cd /usr/local/ && grep -r 916.6 * is what I should've had you do. :)
garykidd
@garykidd
Sep 29 2016 03:40
what's the -r reflect?
Scott Leibrand
@scottleibrand
Sep 29 2016 03:40
or now that you've fixed it, cd /usr/local/ && grep -r 916.7 *
that's the recursive search
David
@davidkeddydb
Sep 29 2016 03:41
@scottleibrand Thanks. i will get back to the carb thing hopefully at some point. I am calling it night. Thanks again.
Scott Leibrand
@scottleibrand
Sep 29 2016 03:41
you can do -h or --help after most any unix command to get help, or put man in front of it.
garykidd
@garykidd
Sep 29 2016 03:41
right..
Scott Leibrand
@scottleibrand
Sep 29 2016 03:41
so grep --help or man grep will tell you all about all the options, including -r
garykidd
@garykidd
Sep 29 2016 03:41
so was actually expecting to see it in the one location only but
pi@raspberrypi:~/APS301 $ cd /usr/local/ && grep -r 916.7 *
lib/python2.7/dist-packages/mmeowlink-0.8.5-py2.7.egg/mmeowlink/mmtune.py:    'US': { 'start': 916.300, 'end': 916.900, 'default': 916.708 },
lib/python2.7/dist-packages/mmeowlink/mmtune.py:    'US': { 'start': 916.300, 'end': 916.900, 'default': 916.708 },
maybe that's expected?
sorry maybe that should be expected?
Scott Leibrand
@scottleibrand
Sep 29 2016 03:43
I don't know why you have two. the first one is the one setup.py placed. the second mustve come from somewhere else
now that I think of it, maybe that came from pip?
maybe pip uninstall mmeowlink (before the setup.py install) is all we would've needed
garykidd
@garykidd
Sep 29 2016 03:44
so I guess I'll have to test it...but does it make sense that when you reboot ....whatever freq. that had been selected....is lost? Was thinking that's what happened but not certain
I don't suppose there's any harm in entering pip uninstall mmeowlink now right?
and that cam about because of the use...along the way...of various package managers....?
Gonna leave it and run/test it for a bit....hopefully this will give me more reliable communication with pump
@scottleibrand THANKS! Hitting the hay...gonna hate my alarm tomorrow....
Scott Leibrand
@scottleibrand
Sep 29 2016 03:56
glad we got it working! :)
yes, when you reboot you lose your tuning, until you run mmtune again
an oref0-setup loop will retune after a few failures, which usually only takes 5m or so
mwright408
@mwright408
Sep 29 2016 05:34

Hi Everyone,

Very very new to all this..

I'm trying to configuring OpenAPS and trying to "Create a new instance of openaps in a new directory"

But I keep getting the message "No script named 'openaps'

Any ideas? I'm stuck at this point

Scott Leibrand
@scottleibrand
Sep 29 2016 05:35
you might try the brand-new simplified docs at http://openaps.readthedocs.io/en/oref0-setup/
mwright408
@mwright408
Sep 29 2016 05:36
Okay. Looks promising. Thanks
Mitchell Slep
@moomoobloo
Sep 29 2016 06:11
@C-Ville you can get to IOB with several button presses but there is no dose history. The remote is also a meter so it has history of the meter readings, but not any other BGs. Not sure about carb history (haven't used Ping in a couple of months).
John Sjolund
@sjolundjohn
Sep 29 2016 09:11
It has happened to me a few times that I have forgotten to resume the pump after I disconnect and suspend. It happened last night and was suspended for a few hours. Not ideal and the beep doesn't wake me is there any automated way to read this from Nightscout and alarm? I would want a customer alert such as If suspended for more than 1h after 22:00, send a push notification.
Sandra Keßler
@SandraK82
Sep 29 2016 09:54
all problems resolved :) loops runs :tada:
Sandra Keßler
@SandraK82
Sep 29 2016 10:14
@/all thanks for the support!
Jim is CrushingT1D
@CrushingT1D
Sep 29 2016 10:46
@sjolundjohn no way to know suspend, only that comms arent working
I decided to simply not suspend when i disconnect. That causes other minor issues though
Matthias
@ceben80
Sep 29 2016 11:30
@SandraK82 fantastic, new loop member :star2:
Jason Calabrese
@jasoncalabrese
Sep 29 2016 13:46
@sjolundjohn openaps/oref0#175
garykidd
@garykidd
Sep 29 2016 15:59
@scottleibrand Thanks again for help last night. Was wondering how it may be possible to simply set a defined frequency...without an mmtune. It seems my pump/ti stick work fairly reliably at the 916.708......and ironically...every now and again when I run mmtune (nad not press the buttons) it'll pick the best freq...but it 's actually horrible...meniang like 98 and 1 recognized response or something like that...it almost always fails...which is a good thing becuase then it'll pick the default freq that we defined...any way it just all comes back to being able to force a defined freq.......maybe take this to mmeowlink?
garykidd
@garykidd
Sep 29 2016 16:49
@jasoncalabrese looks interesting but it seems that there could be pretty significant consequence to auto resuming...in the face of very low BG..right?
Tim Street
@tim2000s
Sep 29 2016 16:51
Scott Leibrand
@scottleibrand
Sep 29 2016 16:55
@garykidd should be pretty easy to comment out the lines in mmtune.py that do the actual tuning, or change a conditional, so it always skips tuning and goes straight to default
Scott Leibrand
@scottleibrand
Sep 29 2016 17:03
@sjolundjohn @CrushingT1D we can tell when the pump is refusing to enact temps, and then there is a status check that will show it's suspended. the issue @jasoncalabrese linked (openaps/oref0#175) is for exactly this issue: we still need to decide if resuming after an extended suspend is the safest thing to do, or if we need to build in some sort of alarm instead. @garykidd I'm not that worried about resuming the pump in the face of low BG, as we'll be temping to zero at the same time. we could also hold off on resuming until we need a high-temp...
garykidd
@garykidd
Sep 29 2016 17:35
@scottleibrand that makes sense to me ..including the high temp requirement..
John Sjolund
@sjolundjohn
Sep 29 2016 18:04

@scottleibrand @jasoncalabrese That feature request is exactly the solution.

I have just briefly reflected on it, but so long as looping takes priority over the suspend re-enact, it seems like this would be a ideal solution.

I never use the suspend function if I am going to manually stop insulin delivery for some reason, always temp bolus.

I do however use suspend frequently when disconnecting.

garykidd
@garykidd
Sep 29 2016 18:10
I've actually forgotten to complete the prime process more than once and only discovered after BG shot thru roof.
David
@davidkeddydb
Sep 29 2016 18:12
@sjolundjohn Sorry but I don't get it. If I disconnect I put in a temp basal of Zero for whatever period of time, and then I reconnect I stop it. What am I missing? Why suspend when disconnecting? (I don't often disconnect for that long so a lot of the time I just disconnect and let it continue to run.)
garykidd
@garykidd
Sep 29 2016 18:13
DO n't know if this is already incoporated into oref0 or not.....being able to detect an infusion set going bad and triggereing push-oever or other approriate alarm......I guess if the actual outcome deviated enough from what was predicted it might indicate a lapse in delivery....
John Sjolund
@sjolundjohn
Sep 29 2016 18:14

@davidkeddydb that is the nature of these devices I suppose, there are many ways to accomplish the same thing. You set a temp basal of zero (which the Loop would then stop right away I pressure if it isn't what it suggest) vs. I suspend. With suspend, no insulin goes to waste and drips out.

Mostly, suspend is less button pushes to accomplish and hence why I do it.

David
@davidkeddydb
Sep 29 2016 18:19
@sjolundjohn I like less buttons. (No judgement by the way). My doctor who is T1 read me the riot acts years ago about suspending vs zero temp, so I barely ever suspend now. Can I say in the room that I miss my Omnipod? I liked being tubeless, but I like Openaps way better so I will stay tubed.
Dana Lewis
@danamlewis
Sep 29 2016 18:20
If you’re in range of a loop and need a different temp, the loop may adjust your zero temp.
John Sjolund
@sjolundjohn
Sep 29 2016 18:20
Hi - well the Dr. is probably right, it would have avoided the issues that I have had with forgetting to re-enable. However temp bolus wouldn't work since the loop should correct that right away. As a result, solution would be to disconnect and accept leakage
Dana Lewis
@danamlewis
Sep 29 2016 18:20
So suspend would “lock in” your zero temp
similarly, you should cancel any running temps and do a zero temp and suspend when you get in the shower, so your iob will be accurate
John Sjolund
@sjolundjohn
Sep 29 2016 18:21
I think the feature that @jasoncalabrese would work well for me - but certainly needs to be considered very carefully as to normal and fringe cases
Dana Lewis
@danamlewis
Sep 29 2016 18:21
:+1:
John Sjolund
@sjolundjohn
Sep 29 2016 18:21
@danamlewis won't a straight suspend do the trick? You need to stop temp, do zero temp, then suspend? That is a lot of work
Dana Lewis
@danamlewis
Sep 29 2016 18:22
no, because the code can’t recognize suspends. Nate’s code does, but ours doesn’t. for most people, 5-10 minutes doesn’t matter. but for now, if you’re a longer shower taker, I do recommend re-setting the temp to zero before suspending.
garykidd
@garykidd
Sep 29 2016 18:22
when I've been disconnected for awhile I just let the pump run...if its been over 30 mins...I might just prime what I estmated what I lost--so it doesnt look like extra IOB...not precise but close
David
@davidkeddydb
Sep 29 2016 18:22
I can do all this stupid stuff now as I am not within range of my loop long enough to worry. I only have one Pi rig at present. Once I am mobile, or have more rigs, I will have to change my ways.
Dana Lewis
@danamlewis
Sep 29 2016 18:23
(IMO it’s faster to hit cancel temp, set new temp, 30, up down to get to 0, but admittedly i have two years of practice)
so it maybe less work to integrate Nate’s approach of incorporating suspends..but just wanted to lay out what you’d do now if you want a 100% accurate picture of iob activity
John Sjolund
@sjolundjohn
Sep 29 2016 18:24

Thanks for this - I hadn't even thought that way, had assumed.

Perhaps a note somewhere in docs as a tip/trick of using the Loop

John Sjolund
@sjolundjohn
Sep 29 2016 18:26
fantastic, thanks
Dana Lewis
@danamlewis
Sep 29 2016 18:27
feel free to PR to make that even more clear if it’s not..
for the new setup scripts/docs flow I am going to try to move more of those major things (like don’t use square wave or it’ll block looping capability, temp and suspend during shower, etc.) to be more up front
John Sjolund
@sjolundjohn
Sep 29 2016 18:28
Even if oref0 doesn't pick this up before a shower, it will grab it from this history I pressume. Right?
Dana Lewis
@danamlewis
Sep 29 2016 18:28
correct
Scott Hanselman
@shanselman
Sep 29 2016 18:33
I just let my pump run when I'm in the shower and if I get a little raise, it'll get noticed. I never suspend if I can avoid it.
Tim Street
@tim2000s
Sep 29 2016 19:02
Does preferences.json accept a carb absorption rate that's not an integer?
Scott Leibrand
@scottleibrand
Sep 29 2016 19:09
@tim2000s preferences.json doesn't need a carb absorption rate at all
AMA calculates the current observed carb absorption rate and uses that
Tim Street
@tim2000s
Sep 29 2016 19:15
Okay. That's easier.
Tim Street
@tim2000s
Sep 29 2016 19:21
Well it all definitely works much better with Dexcom hooked up. Far fewer issues with lost sgvs.
(Although that's not to say that it doesn't work pretty damn effectively on data once every fifteen minutes 😊)
Scott Leibrand
@scottleibrand
Sep 29 2016 19:26
:-D
Hristina Dimova
@xpucuto
Sep 29 2016 19:47
https://www.dropbox.com/s/kbdl6emjdr3uxju/Photo%2029.09.16%20%D0%B3.%2C%2021%2008%2035.png?dl=0 I was out with my daughter running so I suspended my pump . Of course I forgot to resume it and got high . Then I manually started a temp basal of 10u/h for 30 min . This is approximately where you can see the 5u bolus . I did that manually . After that I set another temp basal of 10u/h for about 15 minutes more . Unfortunately NS doesn't show correctly the temp basal and iob . I am exhausted and already in bed but wanted to send this now because most of you are online .
C-Ville
@C-Ville
Sep 29 2016 19:50
did anyone solve the problem on the edison (ubilinux) for not reliably switching between networks?
Scott Leibrand
@scottleibrand
Sep 29 2016 19:55
@xpucuto sounds like you're running into the same 1-byte temp basal bug that @ps2 ran into on Loop, and that is also still present in decocare. I think the reason it hasn't been an issue for others is that openaps itself can't set a temp that high, so it only affects temps set manually like yours.
As a result, IOB will likely be underestimated until the effect of those temps wear off. I would set a high temp target for safety, and then let that expire and let the loop bring BG down further after DIA hours.
and in future if you need to deliver more than 6.4 U/hr, I would do it as a bolus rather than a high-temp, at least until that bug is fixed.
Hristina Dimova
@xpucuto
Sep 29 2016 19:58
Makes sense my maxsafebasal is 4.5 u/h . Thanks I will get my target higher and get a juice box ready :)
Bolus doesn't affect that fast as high temp basal I have tested that before
I will have it in mind ;) until the fix
Scott Leibrand
@scottleibrand
Sep 29 2016 19:59
not sure how they would be any different. the same insulin gets infused either way
I could certainly see boluses being no better than a high temp, but can't think of any physical or physiological effect that would make them worse
ig888ack
@ig888ack
Sep 29 2016 20:00
Hi everyone. I'm about to start purchasing equipment to make my first rig (I just got my 722 pump). I've read about this new Explorer Board for the Edison and I'm very interested. Is that close enough to production that I should wait for it? Or is it still a ways off?
Dana Lewis
@danamlewis
Sep 29 2016 20:01
@ig888ack unfortunately still a ways off! I’d go ahead and pick another rig
ig888ack
@ig888ack
Sep 29 2016 20:01
Ok thanks @danamlewis !
Dana Lewis
@danamlewis
Sep 29 2016 20:01
You could go a Pi route, or the intel edison + another board for now route, which would make it easy to swap in the new board later, whatever you’re more comfortable with development wise
Scott Leibrand
@scottleibrand
Sep 29 2016 20:01
bewest/decoding-carelink#116 is one of the issues related to the 6.4U/hr basal. not sure if there's one open for the decoding bug as well.
Hristina Dimova
@xpucuto
Sep 29 2016 20:08
This is my experience . I will just be extra cautious .
Scott Leibrand
@scottleibrand
Sep 29 2016 20:13
I suspect that with expectedDelta, oref0 will cut off high-temps as soon as those previous ones start to take effect, and you won't get too much extra IOB. If BG starts falling, though, it won't be quite as quick to low-temp: hence the high temp target (and juice ready is also a good idea)
please let us know tomorrow how it goes
Dana Lewis
@danamlewis
Sep 29 2016 20:14
:+1: + maybe set higher than usual CGM alarms?
Scott Leibrand
@scottleibrand
Sep 29 2016 20:14
:+1: good idea
also make sure the dexcom falling alarm is set on the more sensitive setting (2mg/dL/5m)
garykidd
@garykidd
Sep 29 2016 20:34
Didnt get achance to really audit this but was thinking that my basal delivery jumped back on/up too soon....
blob
Scott Leibrand
@scottleibrand
Sep 29 2016 20:35
how much negative IOB did you have when it kicked back on/up?
generally what's happening when you see that is it's starting to get IOB back to zero once you've flattened out and it doesn't need to zero-temp hard to prevent a predicted low
Tim Street
@tim2000s
Sep 29 2016 20:36
That's reflective of my comments about the way that the SmartGuard algo doesn't react soon enough during a suspend before low state to avoid rebounding too high.
Scott Leibrand
@scottleibrand
Sep 29 2016 20:37
obviously if you start to drop again it will cancel any high-temp, and low-temp again if needed, but we've found it's OK to let BG gradually drift down to 80 without continuing to aggressively zero-temp, provided that you already have a lot of negative IOB (which will bring BG back up before too long)
yeah. the naive reaction is that you want it to keep zero-temping until you're absolutely sure you don't need it any longer (like 640G does), but in reality that results in a roller-coaster, so it's better to resume normal basal and wait for BG to flatten out and come up slowly.
Tim Street
@tim2000s
Sep 29 2016 20:38
Yes - agree completely.
Scott Leibrand
@scottleibrand
Sep 29 2016 20:38
there are of course cases where aggressive zero-temping is justified for reasons other than IOB and BG, and in those cases you can set a high temp target to get it to keep zero-temping longer and avoid high-temping as much on the rebound
garykidd
@garykidd
Sep 29 2016 20:42
a bit of negative IOB....
blob
Scott Leibrand
@scottleibrand
Sep 29 2016 20:44
yeah, that's about what I would expect by the time you get down to 80. depending on your ISF, -0.6 would probably be enough to get you back above 100...
garykidd
@garykidd
Sep 29 2016 20:48
more or less...95.....but I think I need to reset bg targets range.....maybe not even have a range...just one target. I understand YDMV but I'm curious if folks have generally tightened their bg targets ranges when switching to APS
Scott Leibrand
@scottleibrand
Sep 29 2016 20:49
yes, most people have a very tight (or even zero) range, usually something above 100
Dana Lewis
@danamlewis
Sep 29 2016 20:49
what’s your range currently?
David
@davidkeddydb
Sep 29 2016 20:49
Screenshot 2016-09-29 16.46.49.png
Auto-sensitivity, meal-assist = AWESOME
Dana Lewis
@danamlewis
Sep 29 2016 20:49
:D :clap:
Scott Leibrand
@scottleibrand
Sep 29 2016 20:50
:-D :+1:
garykidd
@garykidd
Sep 29 2016 20:50
varies by time of day...and in fact I just tweaked but it was 95-120.
Dana Lewis
@danamlewis
Sep 29 2016 20:50
that seems a bit wide and is probably contributing to confusion about what it’s doing, when
garykidd
@garykidd
Sep 29 2016 20:51
yup
Scott Leibrand
@scottleibrand
Sep 29 2016 20:51
I would try starting with 120-120 then, and gradually bring it down if you want after getting experience with it
Dana Lewis
@danamlewis
Sep 29 2016 20:51
I’d suggest narrowing it down to a range of 0-10.
garykidd
@garykidd
Sep 29 2016 20:52
yeah...maybe a little higher overnight even
garykidd
@garykidd
Sep 29 2016 20:56
Thanks....I recall that but good to review...I may just be a bit aggressive here but not wildly so.
Scott Leibrand
@scottleibrand
Sep 29 2016 20:57
yeah, seems like you're taking a reasonable approach, just make note of the part at the end about a 0-10 delta between min and max. if you have any suggestions for making that clearer, PRs are always welcome. :)
garykidd
@garykidd
Sep 29 2016 21:30
@scottleibrand was curious though and I guess should already know this...but if you're low and you have negative IOB that should theoreticallly get you back above you're low target.....and yet you're falling and you continue to fall despite the existing negoative IOB.....does oref0 keep negative ot low temping then?
am thinking that basals may need to be re-evaluating and/or DIA...there was only a very little bit of exercise...and an early lunch involved. but keep falling....it's gonna break soon
blob
Scott Leibrand
@scottleibrand
Sep 29 2016 21:37
It's actually the insulin activity, not the IOB, that it looks at. if your insulin activity (from negative IOB) is such that you should be rising 3 mg/dL/5m (that's BGI), and you're actually falling 2 mg/dL/5m, that will be considered a 5 mg/dL/5m delta. it takes the average such delta over 30 minutes and uses it to adjust the eventualBG, so if you're falling when you're supposed to be rising, it will low-temp you a lot more easily (despite a fair bit of negative IOB) than if you're falling when the insulin activity from a meal says you should be.
garykidd
@garykidd
Sep 29 2016 21:40
  1. I think I understand and 2. That's cool.
Scott Leibrand
@scottleibrand
Sep 29 2016 21:41
yeah, expectedDelta was a cool way to simplify a lot of stuff when I came up with it. :)
the concept isn't quite as simple as the basic algorithm, but it simplifies a lot of heuristics we'd otherwise need to respond proactively to BG excursions
garykidd
@garykidd
Sep 29 2016 21:47
yeah at one point I was wondering why it wouldnt work to apply an algorithm that if you're above target, how much extra insulin do I deliver spread over x time...and if you're below target just cut insulin delivery until you're in target range
Scott Leibrand
@scottleibrand
Sep 29 2016 21:47
yeah, that's the core of what we do
garykidd
@garykidd
Sep 29 2016 21:52
I'll be intersted in autosensitivity feature....I keep falling.....maybe just the higher basal that I've been getting has been masked by boluses...been awhile since I 've tested basal rates...I always thought that it'd be more accurate to just fast for an entire day to test.....but I guess it isnt necessary
Did you ever consider making the full oref0.json available on NS?
Scott Leibrand
@scottleibrand
Sep 29 2016 22:02
what doesn't get sent to devicestatus?
Kelly Watson
@kellyisworking
Sep 29 2016 22:03
Out of curiosity on oref algorithm? Did it take into consideration anything from Doyle's group?
Scott Leibrand
@scottleibrand
Sep 29 2016 22:03
not sure. who's that again?
if so, it was indirectly, since I don't know who that is by name. :)
Dana Lewis
@danamlewis
Sep 29 2016 22:04
it’s based on the same diabetes math a PWD does
we didn’t use any academic models
garykidd
@garykidd
Sep 29 2016 22:04
Was thinking that after I said that myself.....was actually getting useed to reading the text in the oref0.json file and was thking it might be cool to show something like that as an option ---clearly wouldnt be for everyone.
Scott Leibrand
@scottleibrand
Sep 29 2016 22:05
the "reason" field is already uploaded and shown in the oref0 status pill
the predBG arrays are used to make the purple prediction lines
garykidd
@garykidd
Sep 29 2016 22:06
cool, I don't have the oref0 pill will have to add that.....and I guess you can add the predicted BG without having to add AMA?
Scott Leibrand
@scottleibrand
Sep 29 2016 22:07
there are no predBGs unless you're running the dev branch of oref0
garykidd
@garykidd
Sep 29 2016 22:07
I am
Scott Leibrand
@scottleibrand
Sep 29 2016 22:07
whether or not you actually enter carbs and do a meal.json, you can still get the single IOB predBG line
garykidd
@garykidd
Sep 29 2016 22:07
but I defintely dont have that enabled on NS
Kelly Watson
@kellyisworking
Sep 29 2016 22:08
Gotcha @danamlewis - Doyle @scottleibrand Francis Doyle out of Harvard. I think there's some relationship there with iLet, though I'm haven't recently checked that out
Scott Leibrand
@scottleibrand
Sep 29 2016 22:09
nope, oref0 is completely independent of any of their work
Kelly Watson
@kellyisworking
Sep 29 2016 22:12
@scottleibrand you all continue to amaze
Dana Lewis
@danamlewis
Sep 29 2016 22:12
the reference design has the plain language explanation of the thinking & approach behind the algorithm code: https://openaps.org/reference-design/
Jim is CrushingT1D
@CrushingT1D
Sep 29 2016 22:15
@scottleibrand awesome! Re #175
I hear about the suspend issue all the time
Scott Leibrand
@scottleibrand
Sep 29 2016 22:17
please comment on openaps/oref0#175 with how you think we should proceed
we haven't done anything yet because it's not entirely clear if canceling a suspend is a good idea, or if we should rather be alerting
Sandra Keßler
@SandraK82
Sep 29 2016 23:10
some info on the state of my campaign to get the libre to be an cgm http://unendlichkeit.net/wordpress/?p=253&lang=en
Gina
@gclyon
Sep 29 2016 23:14
just curious... would there be any way to get the data that's being sent to Dexcom servers (G5, ios) sent elsewhere? (thinking local implementation)
Sandra Keßler
@SandraK82
Sep 29 2016 23:16
@gclyon unlikely, as you can not intercept any data on a unrooted/ not jailbroken iOS device
Scott Leibrand
@scottleibrand
Sep 29 2016 23:20
@gclyon I think you'd have to connect to a special wifi hotspot that does a MITM attack on the connection to dexcom (along with deploying your own custom SSL cert to the device to get it to trust your attacker). that's what they did to initially decipher what the dexcom API looked like.
that said, the Loop app has a way of sniffing on the BT connection between the transmitter and the G5 app, which allows it to get the BG data. that is a much better approach.