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

21st
Sep 2016
Garrett Webb
@garetis
Sep 21 2016 00:21
Quick question... what is a "segmentation fault"?
garykidd
@garykidd
Sep 21 2016 00:34
@scottleibrand how do I update to your latest script?
cassknox
@cassknox
Sep 21 2016 00:35
@danamlewis my NS is running version 0.8.5 and when I did the check for updates, it gave me the star saying mine was up to date, is that right?
garykidd
@garykidd
Sep 21 2016 00:37
@SandraK82 DO your local NS/Mongo ever converge...or are they totally separate indefeintely?
Jason Calabrese
@jasoncalabrese
Sep 21 2016 00:38
@cassknox you'll need to be on the NS dev branch
Scott Leibrand
@scottleibrand
Sep 21 2016 00:41
@tim2000s there are some ways to do things based on whether or not the timestamp on a file is recent or not (see my various "recent" aliases set up by oref0-setup.sh). but I'd need to know exactly what you're trying to compare to what to be any more specific than that
cassknox
@cassknox
Sep 21 2016 00:43
@jasoncalabrese does that mean forking the github page? That's what I did, I went to the cgm-remote-monitor on github and forked it to mine like the instructions said, is that how I messed up?
cassknox
@cassknox
Sep 21 2016 00:49
@jasoncalabrese not sure if this matters, but I'm following the nightscout with iOS and Dexcom Share (bridge) setup instructions because I'm on the G5?
Ali Mazaheri
@amazaheri
Sep 21 2016 00:52
@rdsteed Python, Node.js and powershell 😀 this was before Bash ...
R. Dennis Steed
@rdsteed
Sep 21 2016 00:58
@amazaheri Thanks - good to know Windows is a possibility for openaps. Been doing a little reading. Sounds like Bash on windows is currently USB device unfriendly, but it's on their todo list. I'll keep an eye on it.
diabeticgonewild
@diabeticgonewild
Sep 21 2016 01:39
Oh, the joys of drinking 8-10 oz (240-300 mL) per day of Imodium, because you are out of opium tincture 10% for your diarrhea. I mean, it's not the safest thing, as it is 4-5 times the maximum dose...but it's better than ****ting your pants. Sucks...
I went on a trip and my diet changed, hence had to take more opium, to keep things at bay.
Autonomic neuropathy really sucks.
diabeticgonewild
@diabeticgonewild
Sep 21 2016 01:51
I have about 5 more days left of doing this.
Garrett Webb
@garetis
Sep 21 2016 01:52
Hey @scottleibrand, are you familiar with what segmentation faults are? Or do you know anyone that might be?
Garrett Webb
@garetis
Sep 21 2016 02:01
Oh, thanks @diabeticgonewild, I didn't realize it was a linux thing, and thought it was specific to OpenAPS. But, that specific article leads me to question -- has anyone else encountered a segmentation fault with their rig, and how could I go about resolving it (without recoding the program, as the page suggests)? Was this fixed in an update?
Anything I try to execute with openaps gets the fault returned.
diabeticgonewild
@diabeticgonewild
Sep 21 2016 02:03
It's a programming thing, not so much a Linux thing...
I personally haven't ever received a segmentation fault error
Scott Leibrand
@scottleibrand
Sep 21 2016 02:06
@garetis segmentation faults are generally bad, but not very specific. you need the rest of the error context to know why it occurred
Garrett Webb
@garetis
Sep 21 2016 02:08
@scottleibrand Thanks, how would one go about fishing that out? Are there error logs for the pi in general? Any keywords you can give me to point me in the right direction for google?
diabeticgonewild
@diabeticgonewild
Sep 21 2016 02:08
Trace each error, one by one. Usually the first set of errors are the most useful for finding the source: copy and paste the Top errors into google
Scott Leibrand
@scottleibrand
Sep 21 2016 02:09
@garetis what did you run to generate the segmentation fault? what all did it print out just before/after that?
Garrett Webb
@garetis
Sep 21 2016 02:10
I didn't really get any errors before this, just the rig not working... here's my log
diabeticgonewild
@diabeticgonewild
Sep 21 2016 02:11
Got a "brilliant" idea. Going to a "head shop" tonight to get kratom for my diarrhea, so I won't need so much Imodium. But where I live, we have to refer to them as "smoke shops" and their bongs as "water pipes" and "kief boxes" as "pollen boxes"...
Scott Leibrand
@scottleibrand
Sep 21 2016 02:11
@garetis it often helps to reproduce the error by doing the same thing manually, and then drilling down into which individual alias/report generated it, and running that without any output redirection (the >/dev/null or 2>/dev/null stuff) to see all the details
Garrett Webb
@garetis
Sep 21 2016 02:11
Power-cycling USB to fix dead stick
PREFLIGHT FAIL
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
{
  "scanDetails": [
    [
      "916.300",
      0,
      -99
    ],
    [
      "916.324",
      0,
      -99
    ],
    [
      "916.348",
      0,
      -99
    ],
    [
      "916.372",
      0,
      -99
    ],
    [
      "916.396",
      0,
      -99
    ],
    [
      "916.420",
      0,
      -99
    ],
    [
      "916.444",
      0,
      -99
    ],
    [
      "916.468",
      0,
      -99
    ],
    [
      "916.492",
      0,
      -99
    ],
    [
      "916.516",
      0,
      -99
    ],
    [
      "916.540",
      0,
      -99
    ],
    [
      "916.564",
      0,
      -99
    ],
    [
      "916.588",
      0,
      -99
    ],
    [
      "916.612",
      0,
      -99
    ],
    [
      "916.636",
      0,
      -99
    ],
    [
      "916.660",
      0,
      -99
    ],
    [
      "916.684",
      0,
      -99
    ],
    [
      "916.708",
      0,
      -99
    ],
    [
      "916.732",
      0,
      -99
    ],
    [
      "916.756",
      0,
      -99
    ],
    [
      "916.780",
      0,
      -99
    ],
    [
      "916.804",
      0,
      -99
    ],
    [
      "916.828",
      0,
      -99
    ],
    [
      "916.852",
      0,
      -99
    ],
    [
      "916.876",
      0,
      -99
    ]
  ],
  "setFreq": 916.63,
  "usedDefault": true
}cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
No CGM data.
No CGM data.
No CGM data.
No CGM data.
No CGM data.
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
cgm://JSON/iter_glucose/monitor/glucose.json
No CGM data.
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
cgm://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
No CGM data.
pi@raspberrypi:~/openaps2 $ openaps use cgm -h
Segmentation fault
pi@raspb
Scott Leibrand
@scottleibrand
Sep 21 2016 02:11
is the disk full?
df -h
Garrett Webb
@garetis
Sep 21 2016 02:13
pi@raspberrypi:~/openaps2 $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  3.7G  9.9G  27% /
devtmpfs        459M     0  459M   0% /dev
tmpfs           463M     0  463M   0% /dev/shm
tmpfs           463M  6.4M  457M   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           463M     0  463M   0% /sys/fs/cgroup
/dev/mmcblk0p1   63M   21M   43M  33% /boot
tmpfs            93M     0   93M   0% /run/user/1000
pi@raspberrypi:~/openaps2 $
Scott Leibrand
@scottleibrand
Sep 21 2016 02:14
nope, that's not the problem
does openaps use cgm -h always segfault?
Garrett Webb
@garetis
Sep 21 2016 02:15
anything openaps ____ defaults
Scott Leibrand
@scottleibrand
Sep 21 2016 02:15
ok, then I would try reinstalling openaps
pip install -U openaps is the easiest thing to try first
Garrett Webb
@garetis
Sep 21 2016 02:16
is that different than reflashing my SD card?
Scott Leibrand
@scottleibrand
Sep 21 2016 02:16
a much smaller hammer
maybe more like a screwdriver. :)
but there might be other things that got corrupted as well, so a reflash is not a bad idea
Garrett Webb
@garetis
Sep 21 2016 02:17
I'll give both a shot, thanks
The pip install -U openaps gave a segdefault, so time to reflash?
Scott Leibrand
@scottleibrand
Sep 21 2016 02:18
yes, definitely
unless you want to play whackamole reinstall
probably would have to reinstall python at least
Garrett Webb
@garetis
Sep 21 2016 02:19
So, reflash, and then reinstall python?
Scott Leibrand
@scottleibrand
Sep 21 2016 02:19
when you reflash you have to reinstall everything
set up from scratch
fortunately that's a lot easier now with oref0-setup.sh
Garrett Webb
@garetis
Sep 21 2016 02:19
Oh, I've saved copies of past versions...
Scott Leibrand
@scottleibrand
Sep 21 2016 02:19
or that works
Garrett Webb
@garetis
Sep 21 2016 02:20
But, theoretically, will I end up here again in the future, if I ended up here once already?
Scott Leibrand
@scottleibrand
Sep 21 2016 02:20
reflashing the SD card will overwrite all the potentially corrupted stuff, so no need to reinstall anything after that
only if you made the backup after the stuff got corrupted
garykidd
@garykidd
Sep 21 2016 02:20
@scottleibrand silly question but just re-ran script in a different directory...worked great. One question though relating to crontab. Not sure what I have to comment out related to prior install.
Garrett Webb
@garetis
Sep 21 2016 02:20
@scottleibrand Ok, thanks
Scott Leibrand
@scottleibrand
Sep 21 2016 02:21
@garykidd to be safe, you could save a copy of your current crontab -l and then delete (don't just comment out) the parts related to running the loop before running oref0-setup.sh
garykidd
@garykidd
Sep 21 2016 02:22
@scottleibrand I wonder if @garetis ran openaps use pump mmtune and pushed random pump buttons to see if he's get different results.
Garrett Webb
@garetis
Sep 21 2016 02:24
@garykidd I didn't do anything with mmtune. Actually I always got that default frequency so wondered if I installed it correctly. It worked so I didn't see the need to mess with it given my limited time availability
But I could have fudged something
garykidd
@garykidd
Sep 21 2016 02:25
@garetis I wonder...what type of pump and what rf device are you using?
@scottleibrand is there a way to just re-run the crontab part---I guess it's easy enough to save ablank version of crontab and re-run it too
Garrett Webb
@garetis
Sep 21 2016 02:28
@garykidd a Minimed 712 Version 1.2C (my first pump from probably 2004). I heard that sometimes the CC1111 didn't work with these, so was pleased when it did work
The range is not as great as some have mentioned, I assumed it was because it was always using the default freq, or just my particulars
garykidd
@garykidd
Sep 21 2016 02:33
@garetis same here. DO me a favor--I know this sounds stupid but openaps use pump mmtune and the entire time its working....push butttons on pump like for a quick bolus..and then cancel and quick bolus up and down esc etc. I'm curious as to the result under those circumstances
Garrett Webb
@garetis
Sep 21 2016 02:33
Ok... =)
garykidd
@garykidd
Sep 21 2016 02:33
mine is 712 1.2c but still curious
Garrett Webb
@garetis
Sep 21 2016 02:33
is your also from 2004?
garykidd
@garykidd
Sep 21 2016 02:35
no idea--but its old. I had a 722 or 723 or something but I think I was compelled to trade it in...fuzzy
Garrett Webb
@garetis
Sep 21 2016 02:35
@garykidd My inkling is that it's going to give me a segdefault, but I will also try it again once I reflash (although, I think my last stored flash doesn't include when I installed mmtune, so I may have to install that again first)
garykidd
@garykidd
Sep 21 2016 02:37
I get excellent results when I push buttons on pump only---and 99s 100% otherwise.....and I'm sure everyone here thinks I am crazy...but it's true
Jason Calabrese
@jasoncalabrese
Sep 21 2016 02:38
@cassknox you just need to deploy the dev branch, if you're using azure you need to disconnect it from github and the reconnect it again, but select the dev branch instead of master
Garrett Webb
@garetis
Sep 21 2016 02:38
@garykidd excellent results, as in ability to communicate? I got the segdefault, so I am going to have to reflash, and then install mmtune again
garykidd
@garykidd
Sep 21 2016 02:39
@scottleibrand I re-ran it...works flawlessly but for my rf issue I was just mentioning....and which Im certain you'll recall.
Scott Leibrand
@scottleibrand
Sep 21 2016 02:41
Yeah, that's a weird one.
Garrett Webb
@garetis
Sep 21 2016 02:42
@scottleibrand One last thing, I did install this shutdown program to run in the background and shutdown when I shorted some pins on the gpio, could there be an issue from this?
pi@raspberrypi:~/openaps2 $ cd /home/pi/programs/
pi@raspberrypi:~/programs $ ls
send_text.py  shutdown.py  system.py
pi@raspberrypi:~/programs $ ls shutdown.py
shutdown.py
pi@raspberrypi:~/programs $ cat shutdown.py
import RPi.GPIO as GPIO
import time
import os

GPIO.setmode(GPIO.BOARD)
gpio_pin_number = 40
GPIO.setup(gpio_pin_number, GPIO.IN, pull_up_down = GPIO.PUD_UP)

def Shutdown(channel):
        os.system("sudo shutdown -h now")

GPIO.add_event_detect(gpio_pin_number, GPIO.FALLING, callback = Shutdown, bouncetime = 2000)

while 1:
        time.sleep(1)


# edit this file: sudo nano /etc/rc.local
# add our python command before the last line which closes the if loop. Therefore, add the following line before the #fi at the end of the file.
# sudo python /home/pi/Scripts/shutdown_pi.py &
pi@raspberrypi:~/programs $
cassknox
@cassknox
Sep 21 2016 02:48
@jasoncalabrese OMG thank you so so so much! So simple yet I could not for the life of me figure that part out! It had me stumped, seriously thank you a million times over... I'm sure I'll have other obstacles coming my way down the road but I'm so relieved to be past this one! Phew :)
garykidd
@garykidd
Sep 21 2016 02:50
@garetis that's strange because you're output above seems to suggest you could run openaps use pump mmtune
excellent results like in the 40's vs. 90's
Garrett Webb
@garetis
Sep 21 2016 02:56
@garykidd I'm not exactly sure what that means =), but I'm going to reflash and reinstall mmtune, hopefully with minimal fuss
garykidd
@garykidd
Sep 21 2016 02:58
but just to confirm if you openaps use pump mmtune it doesnt execute and try to find the best frequency---you know--like it shows in your output above?
Garrett Webb
@garetis
Sep 21 2016 02:59
yeah, it just returns "segmentation fault"
but before I was getting this error it would do that
garykidd
@garykidd
Sep 21 2016 03:00
and you removed it and plugged it back in I'm sure---right?
Garrett Webb
@garetis
Sep 21 2016 03:01
The TI Stick? Actually, no, but I didn't think that was where the issue was originating. Actually, when I would connect the gpio pins the pi wouldn't shutdown like it used to, so I'm assuming that program is the cause of the error
garykidd
@garykidd
Sep 21 2016 03:01
How cool would it be to interface with dex transmitter directly so you could force an immediate extension and refresh rather than wait for 2 hour restart.
probably ...anyway---I'd reallly be interested if when you do reflash if you could run mmtune results with and without pushing the buttons during the cycle.
Garrett Webb
@garetis
Sep 21 2016 03:04
I've heard, or read, that Dana runs her rig off the raw pump data during the warm-up period, but she'll tell you that she "pre-soaks" her sensor so it is more accurate than just putting it in and using it straight after
I'll give it a go, for sure. What should I notice when doing this?
garykidd
@garykidd
Sep 21 2016 03:08
I dont know really---hence the the interest. Doesnt seem like anyone has had any type of similar issue that I am facing. For me when I push buttons...mmtune finds a good frequency...but it fails with 99's otherwise..
diabeticgonewild
@diabeticgonewild
Sep 21 2016 03:08
Got my kratom. Told the guy at the head shop that I use it for "severe diarrhea" and got a discount.
https://imgur.com/a/IXeyU
garykidd
@garykidd
Sep 21 2016 03:15
@scottleibrand you think I would have similar results with another rf device?
diabeticgonewild
@diabeticgonewild
Sep 21 2016 03:25
I'm feeling the kratom...it's definitely nice. I feel both the "head" and the "GI effects". So yay...yay for coming up with backup alternatives to opium tincture and ungodly amounts of Imodium...that end up being more economical anyway...
Scott Leibrand
@scottleibrand
Sep 21 2016 03:26
@garykidd dunno, but that's good troubleshooting practice to try...
diabeticgonewild
@diabeticgonewild
Sep 21 2016 03:26
WTF: On August 25, 2016, the DEA announced their intention to ban kratom and make it a Schedule I controlled substance. The ban is expected to go into effect September 30, 2016. After that date, it will be a felony offense to possess, distribute, or grow kratom in the United States
Just found that out.
Iain
@iainct
Sep 21 2016 03:46
I just got a new G5 receiver after the last one went bad with a en ERR121 fault. I expected to just plug it in and get my rig up and running again however, when i attempt to read from the Receiver over USB my glucose.json is blank and there are no errors to debug... help!
Scott Leibrand
@scottleibrand
Sep 21 2016 03:49
Does it have any data yet?
Iain
@iainct
Sep 21 2016 03:49
yeah, its been running for a few hours
i just tried this
pi@slicapszero:~/src/dexcom_reader/dexcom_reader $ sudo python readdata.py 
Found Dexcom G5 Mobile Receiver S/N: SM########
Transmitter paired: 4#####
Battery Status: CHARGING (94%)
Record count:
Traceback (most recent call last):
  File "readdata.py", line 274, in <module>
    Dexcom.LocateAndDownload()
  File "readdata.py", line 51, in LocateAndDownload
    print '- Meter records: %d' % (len(dex.ReadRecords('METER_DATA')))
  File "readdata.py", line 269, in ReadRecords
    records.extend(self.ReadDatabasePage(record_type, x))
  File "readdata.py", line 228, in GenericRecordYielder
    yield record_type.Create(data, x)
  File "/home/pi/src/dexcom_reader/dexcom_reader/database_records.py", line 60, in Create
    return cls(unpacked_data, raw_data)
  File "/home/pi/src/dexcom_reader/dexcom_reader/database_records.py", line 42, in __init__
    self.check_crc()
  File "/home/pi/src/dexcom_reader/dexcom_reader/database_records.py", line 47, in check_crc
    raise constants.CrcError('Could not parse %s' % self.__class__.__name__)
constants.CrcError: Could not parse MeterRecord
Scott Leibrand
@scottleibrand
Sep 21 2016 03:51
Could be it needs to fill in with a full page of data (or certain types of records?) before that will work? Dunno.
Iain
@iainct
Sep 21 2016 03:51
so it sees it and the sensor that is is paired too... i suspect something has changed in the firmware. Noticeably it took about 20mins from turning on to ask for 2 blood sugars...
fair assumption I will try again tomorrow once it has more data....
any other things i could try?
Scott Leibrand
@scottleibrand
Sep 21 2016 03:52
start digging into what the python scripts are doing exactly, and try to debug at a low level. this might be the only chance to figure that out, short of a complete receiver reset
but I am not going to be any help actually doing that, as I don't know that code at all
Iain
@iainct
Sep 21 2016 03:54
@scottleibrand thanks I will take a look and also ask @loudnate if he has any suggestions of what to try
Nathan Racklyeft
@loudnate
Sep 21 2016 04:08
I'm pretty sure @scottleibrand is right about needing to fill the first page
diabeticgonewild
@diabeticgonewild
Sep 21 2016 04:11
I'm angry though. Seriously. Like will have to drink 8-10 oz of Imodium per day if kratom is made illegal, and my RX for opium tincture doesn't hold me through (and it doesn't always...)
Scott Leibrand
@scottleibrand
Sep 21 2016 04:14
@loudnate do you suspect that is a fundamental limitation with the receiver, or something we could fix if we did something different with the incoming data?
Nathan Racklyeft
@loudnate
Sep 21 2016 04:14
Nah I bet it's fixable
Iain
@iainct
Sep 21 2016 04:18
@scottleibrand and @loudnate the first page is the likely cause, it is now pulling data but missing the first hour or so of data :-) I am back up and running
Scott Leibrand
@scottleibrand
Sep 21 2016 04:23
:+1:
Garrett Webb
@garetis
Sep 21 2016 05:41
@scottleibrand So I format the SD card, then I load an old flash backup that I've used before successfully, and I am still getting "segmentation default" when I try to do anything with openaps. Is that weird? Is there anything I can infer that is fundamentally wrong given this series of events? Is the next step to format and reload from scratch? I guess my ultimate curiosity is why would a backup that has worked before now not be working?
Scott Leibrand
@scottleibrand
Sep 21 2016 05:43
Could be a more fundamental hardware issue. You should have two of everything and be able to swap components to see where the failure is...
Or you could move on to a fresh OS image and reinstall everything.
Garrett Webb
@garetis
Sep 21 2016 05:45
My cat cron.log file is curiously the same and my post above. I'm positive I formatted it correctly and uploaded my backup. Is that possible?
Sandra Keßler
@SandraK82
Sep 21 2016 05:46
@garetis i got yesterday some segfaults after putting my pi into a little case, got overheated pretty bad
Garrett Webb
@garetis
Sep 21 2016 05:47
I do feel like it runs hot sometimes...
Tim Street
@tim2000s
Sep 21 2016 07:59
Argh. Constant carelink errors now:

pi@raspberrypi:~/timsaps $ openaps report invoke model.json
pump://JSON/model/model.json
reporting model.json
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-report')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 743, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1531, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 52, in __call__
    self.epilog( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 69, in epilog
    super(ReportToolApp, self).epilog( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 75, in epilog
    self.create_git_commit( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 83, in create_git_commit
    if self.repo.is_dirty( ) or self.repo.index.diff(None):
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.8-py2.7.egg/git/repo/base.py", line 608, in is_dirty
    len(self.git.diff('--cached', *default_args)):
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.8-py2.7.egg/git/cmd.py", line 466, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.8-py2.7.egg/git/cmd.py", line 934, in _call_process
    return self.execute(make_call(), **_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/GitPython-2.0.8-py2.7.egg/git/cmd.py", line 718, in execute
    raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git diff --cached --abbrev=40 --full-index --raw' returned with exit code 128
stderr: 'error: object file .git/objects/ff/680288a42e466736a2a58370b48087c680b2b2 is empty
error: object file .git/objects/ff/680288a42e466736a2a58370b48087c680b2b2 is empty
fatal: loose object ff680288a42e466736a2a58370b48087c680b2b2 (stored in .git/objects/ff/680288a42e466736a2a58370b48087c680b2b2) is corrupt'
pi@raspberrypi:~/timsaps $
Tim Street
@tim2000s
Sep 21 2016 08:18
(and JuiceSSH makes mobile openAPS management much, much easier!)
Sandra Keßler
@SandraK82
Sep 21 2016 08:20
can someone speed me up? I get mongoDB errors on my local setup, due to the fact that I (have to) use mongoDB < 3.
The error: Wed Sep 21 10:11:25.319 [conn3] assertion 10068 invalid operator: $eq ns:admin.treatments query:{ orderby: { created_at: -1 }, $query: { eventType: { $eq: "Profile Switch" }, created_at: { $gte: "2015-09-15T08:11:25.160Z" } } }
Will it be possible to remove mongoDB > 3 requirements? As Far as I unterstand, the above statement should be equal to :
ns:admin.treatments query:{ orderby: { created_at: -1 }, $query: { eventType: "Profile Switch" , created_at: "2015-09-15T08:11:25.160Z" }} }
or did I miss there anything?
Matthias
@ceben80
Sep 21 2016 08:44
@scottleibrand @danamlewis I would like to give you a short feedback about my loop created yesterday by running the oref0 setup routine:
The loop is running fine, so far so good, but last night the loop stopped due to the fact azure was stopping the free web service, limit exceeded.
Probably the loop is transfering 1000 BGs per minute? I don't know, never had this azure issue since February 2016.
Manuela
@Bastelfee
Sep 21 2016 08:52
This message was deleted
R. Dennis Steed
@rdsteed
Sep 21 2016 09:06
@SandraK82 You are right as far as the eventType part of the query. However, the created_at part of the query will need to stay the same, because the comparison was "gte" (greater than or equal to) not "eq" (equal to). It should be fine because "eq" was the only comparison added in version 3. All the other comparisons were present before.
C-Ville
@C-Ville
Sep 21 2016 13:17
I have a quick question regarding offline looping. I do have mongo and nightscout running on my edison as well as openaps. I use an Android phone as a wifi hotspot for the edison. This android phone is running xdrip+ and I wanted to use that phone and API REST to get the BG data onto my personal nightscout installation. Unfortunately the BG data never arrive at nightscout/mongo. Therefore I am using a second Android phone running Xdrip to get the BG Data on my edison. Does anybody know if that is a known issue or will wifi hotspot tethering with the Android phone prevent me from using API REST? I might swith to BT tethering later down the road but for now this is not an option.
Tim Street
@tim2000s
Sep 21 2016 13:18
@colinlennon Can you help with this?
Colin Lennon
@colinlennon
Sep 21 2016 13:26
@C-Ville Is the second Android phone succesfully uploading glucose values to the Nightscout instance running on your Edison? Or to a cloud-based Nightscout instance, and then the Edison is downloading the values from there?
C-Ville
@C-Ville
Sep 21 2016 13:26
@colinlennon the second phone successfully uploads to my nightscout instance on the edison
currently all offline :-)
Colin Lennon
@colinlennon
Sep 21 2016 13:27
Hmm, interesting! Is the second phone using API REST to upload?
C-Ville
@C-Ville
Sep 21 2016 13:27
although still a bit messy as posted above
yes
second phone does use API
and the first phone worked when I was running all this at home and I did not have hotspot enabled on that phone
Colin Lennon
@colinlennon
Sep 21 2016 13:30
So when you were at home, the first phone and your Edison must have both been connected to your home wifi network. When you run the hotspot on your first phone and have the Edison connect to it, can you access the Edison Nightscout instance via your phone's browser?
I've just remembered that I have had this approach work successfully btw. I had Nightscout running on a RPi rig for offline looping, for one weekend away, when I had no internet access. So what you're doing will work, sounds like you're very very close to getting a good offline solution here...
Scott Leibrand
@scottleibrand
Sep 21 2016 13:40
@ceben80 I am definitely doing Nightscout uploads in a non-standard and suboptimal way, so I'm not terribly surprised at that. Would you be interested in helping convert them over to use the ns device?
Matthias
@ceben80
Sep 21 2016 13:44
Yes...but currently 11 days left in azure having a new contigent, meanwhile I must use my Dexcom attached to the rig for overnight looping, will monitor via cat the relevant json files....
Scott Leibrand
@scottleibrand
Sep 21 2016 13:46
:-/
Matthias
@ceben80
Sep 21 2016 13:52
On long term I will make a plan for offline looping either installing ns and mongo on a pi or Edison to get rid of this cloud stuff.
Sandra Keßler
@SandraK82
Sep 21 2016 13:59
as soon as i find time i will look into ns sources if it is possible to convert the statements to pre 3.0 mongo Syntax, then it will be easy to install it on raspi
John Sjolund
@sjolundjohn
Sep 21 2016 14:04

@scottleibrand and @danamlewis - the new pump setup script. WOW, incredible. Thank you! With that said, I am still very glad I spent the many many hours getting it all working manually. When problems come up in the setup, such as they did for me (I had put the wrong mmeowlink port) it helps to troubleshoot. I did a full reinstall x3 times before it was all working. You really must do a manual install before going this route in my humble view.

A big benefit of this is that the reports and alias get standardized and much more organized which is much better.

The question I do have is how the Crontab works. I used to essentially have a single line that would include preflight, gather and enact and run every five minutes.

The new entries that are created with the setup script have x2 unique lines (get-bg, ns-loop and pump-loop). My questions:

1( Why x3 unique lines instead of putting into a single row?
2) Are they all supposed to run OR does pump-loop for example cover everything?
3) Why have unique logs for each?
4) They do not seem to have any timing on them, IE they all run on " *". How does this work? If this could be explained it would be great.

An incredible achievement!

For item 4 it should say:
* * * * *
diabeticgonewild
@diabeticgonewild
Sep 21 2016 14:18
Ugh, kratom. Took too much! Feel so sick this morning. I'm never doing that again. Extremely nauseated and hot feeling...
I'm at the hospital the entire day today for immunomodulatory treatment though. So it's going to suck!
Colin Lennon
@colinlennon
Sep 21 2016 14:22
@SandraK82 Are you limited to mongo version lower than 3 just because you're running it on a Pi (so 32 bit)?
3.2.9 runs on Edison
Scott Leibrand
@scottleibrand
Sep 21 2016 14:26
@sjolundjohn they all run in parallel. Only pump-loop talks to the pump. The others ensure CGM data is always available, and do stuff like autosens. They run every minute, but only if they're not already running (the ps | grep check).
We might also pull autosens out into its one loop to keep it from slowing down ns-loop, especially on Pi zero.
John Benjamin
@Bender1061
Sep 21 2016 14:30
@sjolundjohn @scottleibrand There is a point on if you are using the mdt (enlite) for the CGM, you do have two different two different things talking to the same pump at once. I actually have not noticed this being an issue (so far). But I guess it is something to keep in mind if people start having issues.
Scott Leibrand
@scottleibrand
Sep 21 2016 14:36
Good point. We should refactor that to put the CGM stuff in the pump loop for MDT CGM. want to take a stab at that?
Sandra Keßler
@SandraK82
Sep 21 2016 14:42
@colinlennon yes. Edison is nice but to expensive for playing around with for me at the moment
diabeticgonewild
@diabeticgonewild
Sep 21 2016 14:50
You need 2-3 working loop devices, so 2-3 Edisons, 2-3 batteries, and 2-3 TI sticks...
But overall, it's not that bad cost-wise, relative to benefit
Scott Leibrand
@scottleibrand
Sep 21 2016 14:51
Or you can use Pi zero. The only expensive part that way is the TI sticks.
diabeticgonewild
@diabeticgonewild
Sep 21 2016 14:51
The worst part with the Edison for me was flashing to Ubilinux, and I put up a YouTube video for that...under account name diabeticgonewild on YouTube
And you just put it all in a zippo lighter case...and it fits nicely...
Scott Leibrand
@scottleibrand
Sep 21 2016 14:52
FWIW it is now possible to flash the Edison from a Mac, which is way easier.
And we updated the docs to use jubilinux, so you can skip most of the upgrade crap after the install.
diabeticgonewild
@diabeticgonewild
Sep 21 2016 14:53
I have found the flash process flaky on Linux...Windows is very solid in my experience. Have no experience with Mac/UNIX, and won't overpay for a Mac
Yeah I have seen jubilinux...its proprietary but not bad to deal with. But I don't think it has the very most recent kernel of Linux
I forget the name...
Scott Leibrand
@scottleibrand
Sep 21 2016 14:55
Better than ubilinux at least. If someone can get the flash process working with a current Debian build that would be nice.
diabeticgonewild
@diabeticgonewild
Sep 21 2016 14:57
It's not that hard to upgrade on Ubilinux
Somebody just needs to update the instructions
Jubilinux is still out of date now
It's no longer Jessie
Matthias
@ceben80
Sep 21 2016 15:02
@scottleibrand Although azure does not work due to this fuxxing limit, my loop is running with the attached Dexcom receiver. A bright spot for the next 11 days....
pi@pi3-aps-ti:~/myopenaps/enact $ cat enacted.json
{
  "bg": 139,
  "temp": "absolute",
  "snoozeBG": 105,
  "recieved": true,
  "predBGs": {
    "IOB": [
      139,
      132,
      125,
      119,
      114,
      109,
      105,
      102,
      99,
      97,
      96,
      95,
      95
    ]
  },
  "rate": 0.675,
  "reason": "COB: undefined, Dev: -34, BGI: 0, ISF: 35, Target: 95; Eventual BG 105 > 90 but Min. Delta -8.00 < Exp. Delta -0.6; setting current basal of 0.7 as temp. Setting neutral temp basal of 0.7U/hr",
  "eventualBG": 105,
  "timestamp": "2016-09-21T16:53:01.561607",
  "duration": 30,
  "tick": -8,
  "IOB": 0
}
diabeticgonewild
@diabeticgonewild
Sep 21 2016 15:04
Yeah, I just looked it up. The new kernel is called strech, and also that's what I recall from the chat logs...
stretch
I meant
diabeticgonewild
@diabeticgonewild
Sep 21 2016 15:13
I mean, really, all somebody has to do is create a custom image for OpenAPS on Edison, with everything EXCEPT the pump SN and CGMS SN (at least for Dexcom)...then flash...then all that would be left is flashing the TI stick and soldering...it's really not all that hard to do...
diabeticgonewild
@diabeticgonewild
Sep 21 2016 15:20
There is a better tutorial here: https://jakehewitt.github.io/custom-edison-image/
If I had my laptop with me I would do it right now. Probably won't get around to doing anything this weekend cause I will not be feeling well after today...
I meant until this weekend...
C-Ville
@C-Ville
Sep 21 2016 15:29
@colinlennon sorry for bein away for a few hours. Accessing the edison form my hotspot phone via http works and via ssh as well, the only thing still not wanting to work is API REST, anyhow, I am still excited that I am offline looping. Roaming for different countries is somewhat expensive in Europe.
Scott Leibrand
@scottleibrand
Sep 21 2016 15:33
@ceben80 could you set up a second NS for the interim? Or even heroku?
garykidd
@garykidd
Sep 21 2016 15:44
Is there a way to ssh into pi from BT connection?
diabeticgonewild
@diabeticgonewild
Sep 21 2016 15:45
@garykidd yes if you know the BT MAC address
Colin Lennon
@colinlennon
Sep 21 2016 15:51
@C-Ville It is! (I'm in the UK, so same problem when I travel). You could maybe try the mongo upload option in xdrip instead of the REST API option. I know for sure that works for me. Were you able to install Nightscout directly on the Edison? Enough space available? I'm tempted to try that on Yocto...
Paul Martin
@Spazholio
Sep 21 2016 15:53
This message was deleted
diabeticgonewild
@diabeticgonewild
Sep 21 2016 15:55
There are multiple ways of SSHing in via BT. I have heard of both BT MAC address and connection bridging as techniques...
C-Ville
@C-Ville
Sep 21 2016 15:55
@colinlennon I have ubilinux running, my /root is at 87% now and my /home @ 55%
I am using spark blocks and also have the sd card module installed and a 32 gb sd card mounted, however I am currently not using the space on that one
Matthias
@ceben80
Sep 21 2016 16:29
@scottleibrand Well, that might be feasible, but I won't die without Nightsout the next 11 days and as said I would like to get rid of azure particularly with regard running a offline openAPS with as few devices as possible :wink:
Matthias
@ceben80
Sep 21 2016 16:42
Mostly a Dexcom receiver breaks after 1 or 2 years, I know many people with this issue.
Dexcom didn't replace that totally overpriced device, so that this device is not really a offline alternative.
benhamou
@benhamou
Sep 21 2016 17:14
can somebody tell me, what LGS events mean
Dana Lewis
@danamlewis
Sep 21 2016 17:15
LGS usually stands for low glucose suspend
benhamou
@benhamou
Sep 21 2016 17:15
so I am starting too loop now :-)
close loop
with IOB=0 :-)
Dana Lewis
@danamlewis
Sep 21 2016 17:17
:+1:
benhamou
@benhamou
Sep 21 2016 17:19
do you need my results for any publication, just let me know
Dana Lewis
@danamlewis
Sep 21 2016 17:23
thanks! after you’ve looped overnight for 3 nights, you can fill out this form (https://github.com/openaps/docs/blob/master/docs/docs/walkthrough/phase-6/keeping-up-to-date.md), and there’s a place to mark if you might be interested in donating your data in the future :)
benhamou
@benhamou
Sep 21 2016 17:23
of course I am interesting in "donating" data
cant await to be a looper :-)
Dana Lewis
@danamlewis
Sep 21 2016 17:24
:)
John Sjolund
@sjolundjohn
Sep 21 2016 17:46

After this fantastic script setup I cleaned up all the code on my rigs which was my current WIP - so now on to the next things.

1) Offline with a G4 w/ share - it seems that openxshareble is the best even if @danamlewis says that it is shacky. Alternatie is I setup Mongo on my Edison and have it run locally. Any comments on simplest way to have a offline loop work well?

2) Notifications. I still struggle to be able to know confidently that it is working. I think IFTT integration is the best way to handle loop not working (mostly this is due to my own hardware issues like poor shouldering). Best notification of Loop not working? Where is best documentation for IFTT?

Thanks!
Eric
@ecc1
Sep 21 2016 17:50

As part of my Dexcom code, I wrote a command-line app to fetch recent BGs: https://github.com/ecc1/dexcom/blob/master/apps/glucose.go
It currently just prints something like this:

2016/09/21 13:49:21 DEXCOMRX: already connected
2016/09/21 13:49:21 DEXCOMRX: already paired
2016/09/21 13:49:21 DEXCOMRX: already authenticated
2016/09/21 13:49:21 retrieving records since 2016-09-21 13:19:21
2016/09/21 13:49:37 stopping CGM history scan at 2016-09-21 13:11:45
2016/09/21 13:49:46 stopping CGM history scan at 2016-09-21 13:11:46
2016-09-21 13:46:45   86    1  107600  110848  -88
2016-09-21 13:41:45   89    1  110176  112848  -85
2016-09-21 13:36:45   92    1  112352  115184  -91
2016-09-21 13:31:45   94    1  113504  117760  -81

but it could easily be massaged into JSON if someone wants to use it as an alternative to openxshareble. If so, let me know and I'll be happy to help.

Dana Lewis
@danamlewis
Sep 21 2016 17:56
@sjolundjohn are you using NS?
John Sjolund
@sjolundjohn
Sep 21 2016 17:59
@danamlewis Yes - stale data alarm doesn't seem to work as often CGM data gets in fine, but Loop may not run
The alarm works, but not for the purpose of isolating if OpenAPS is not running properly from my experience, but perhaps I am wrong?
Dana Lewis
@danamlewis
Sep 21 2016 18:12
@jasoncalabrese may be a good one to describe which alarms he has set up, and maybe if he does someone can copy and paste it into a page of the docs for some recommending monitoring alarms/strategies so people have a good starter list to consider using. (I'm handicapped by DIYPS and pushover and a complicated setup that doesn't really apply to everyone so it's not as easy for me to say "use these widgets")
Jason Calabrese
@jasoncalabrese
Sep 21 2016 18:15
TIMEAGO_ENABLE_ALERTS=true, there are several *_ENABLE_ALERTS listed in the readme https://github.com/nightscout/cgm-remote-monitor/tree/dev#timeago-time-ago
OPENAPS_ENABLE_ALERTS=true will let you know if they loop isn't running
there's some overlap with the alerts, for example stale cgm data could trigger both the timeago and openaps alerts
I started working on alerts for the uploader battery last night
Jason Calabrese
@jasoncalabrese
Sep 21 2016 18:25
@sjolundjohn ^
John Sjolund
@sjolundjohn
Sep 21 2016 18:26
Fantastic thanks @jasoncalabrese and @danamlewis getting OpenAPS alerts setup right now. Will report back if I have issues
Jason Calabrese
@jasoncalabrese
Sep 21 2016 18:26
there are also pump alerts
John Sjolund
@sjolundjohn
Sep 21 2016 18:38

@jasoncalabrese when I set OPENAPS_ENABLE_ALERTS and also OPENAPS_WARN in Azure App settings, restart server, I would have thought that within Nightscout I would get options to enable them within settings?

I can't see any evidence of them being there?

Peter Miller
@ochenmiller
Sep 21 2016 19:26
A year ago today we went live with our first OpenAPS rig, and a little more than a week later we were looping 24/7. I am thankful to this community and the idea of paying it forward for the many gifts you've given my family over this last year. We sleep better, Matt's a1c greatly improved, he's way less stressed. Most importantly, Matt feels empowered to manage his own health and outcomes. Thank you all.
Matthias
@ceben80
Sep 21 2016 19:36
:+1:
Dana Lewis
@danamlewis
Sep 21 2016 19:38
:) <3 :+1: :sparkles: :sparkling_heart: :raised_hands:
Matthias
@ceben80
Sep 21 2016 19:42
party...yeah :smile:
Tim Street
@tim2000s
Sep 21 2016 20:07
So does this mean I need to re pull the openaps packages from Git?
raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git diff --cached --abbrev=40 --full-index --raw' returned with exit code 128
stderr: 'error: object file .git/objects/ff/680288a42e466736a2a58370b48087c680b2b2 is empty
error: object file .git/objects/ff/680288a42e466736a2a58370b48087c680b2b2 is empty
fatal: loose object ff680288a42e466736a2a58370b48087c680b2b2 (stored in .git/objects/ff/680288a42e466736a2a58370b48087c680b2b2) is corrupt'
Colin Lennon
@colinlennon
Sep 21 2016 20:08
think you just need oref0-reset-git
is that part of your loop at the moment?
Tim Street
@tim2000s
Sep 21 2016 20:09
No. it's about to become a part!
Colin Lennon
@colinlennon
Sep 21 2016 20:09
Yip, best to have that as the first thing your loop does. If there's no corruption, it just does nothing. So safe to execute every time
Tim Street
@tim2000s
Sep 21 2016 20:09
I'm not even sure where it lives!
Colin Lennon
@colinlennon
Sep 21 2016 20:10
it's just a command - so in my loop, it's the very first thing in my do-everything alias
you can run it now manually and it'll fix that problem
but best to have it in your loop so any corruption issues don't bring your loop to a halt
Jason Calabrese
@jasoncalabrese
Sep 21 2016 20:14
@sjolundjohn there isn't client side options for those
the client side options for bg alarms are more like filters
John Sjolund
@sjolundjohn
Sep 21 2016 20:18
Alarm starts ringing in browser?
Jason Calabrese
@jasoncalabrese
Sep 21 2016 20:22
it's started by the server and pushed to the client, pushover, ifttt, etc
the acks goto the server also, and try to clear the alarm on other clients
Brett
@burgertime14
Sep 21 2016 20:33
anyone seeing a limited life for the TI boards? just had my second one die (3rd if you count the one I shorted out) :(
Tim Street
@tim2000s
Sep 21 2016 20:47
Thanks @colinlennon - fixed it. Any ideas why the basal rate wouldn't be showing, even though that's switched on in NS?
Colin Lennon
@colinlennon
Sep 21 2016 20:57
@tim2000s Good stuff. The current basal rate, or the graph along the top showing the historical temps?
Tim Street
@tim2000s
Sep 21 2016 20:57
The graph - it was just being slow!
Now to turn on meal assist. Any advice?
Colin Lennon
@colinlennon
Sep 21 2016 20:59
Ah, okay, that's good. I just followed the docs for meal-assist, no gotchas that I can remember
Tim Street
@tim2000s
Sep 21 2016 20:59
Okay then!
Dana Lewis
@danamlewis
Sep 21 2016 20:59
go all the way to AMA is my advice ;)
Colin Lennon
@colinlennon
Sep 21 2016 20:59
I love being able to trigger Eating Soon mode from my pebble watch, so awesome :smile:
Dana Lewis
@danamlewis
Sep 21 2016 20:59
:+1:
Tim Street
@tim2000s
Sep 21 2016 21:00
That needs the dev build doesn't it?
Colin Lennon
@colinlennon
Sep 21 2016 21:00
Ah yeah, AMA is great. Between that and auto-sens, it makes a real difference.
AMA was previously in a separate branch when I set it up, then it was merged to dev
C-Ville
@C-Ville
Sep 21 2016 21:01
@colinlennon eating soon from the pebble, looks like I need to update my openaps to improve :-)
Colin Lennon
@colinlennon
Sep 21 2016 21:01
I'm not sure if it has made it to master yet though, been a while since I did the install
@C-Ville yeah, it's really cool. Here's some details, thanks to @audiefile - https://gist.github.com/audiefile/158a6c87671220276bce5c4dc0492068/d0267c06ba66ffd72108d74f7988e6887ec615f1
(sorry, didn't realise that would spam the channel)
C-Ville
@C-Ville
Sep 21 2016 21:05
I am still so far behind on activating features. Currently I am just avoiding carbs @lunch so my rise keeps moderate which greatly helps the loop without sacrificing too much, but I can see the control being better with all the additional features
@colinlennon thanks for posting the link
Tim Street
@tim2000s
Sep 21 2016 21:09
Quick question - I've set up a second instance that I'm going to go postal on now. Where's the setup script so I don't have to do all the work on the new dev branch?
Brett
@burgertime14
Sep 21 2016 21:11
mkdir -p ~/src; cd ~/src && git clone -b dev git://github.com/openaps/oref0.git || (cd oref0 && git checkout dev && git pull)
cd && ~/src/oref0/bin/oref0-setup.sh was what I used
Tim Street
@tim2000s
Sep 21 2016 21:14
wow - that really does make it much easier!
Brett
@burgertime14
Sep 21 2016 21:15
another "Scott is awesome" moment. So many of them on this channel
Dana Lewis
@danamlewis
Sep 21 2016 21:15
@tim2000s also https://github.com/openaps/oref0/wiki/Setup-Script-Testing if you want to bookmark it
Tim Street
@tim2000s
Sep 21 2016 21:16
Hmmm. It has just gone through and told me loads of stuff needs updating. I think I might cry...!
Brett
@burgertime14
Sep 21 2016 21:21
@tim2000s hopefully not so painful that it causes tears...had really good luck with it yesterday
Tim Street
@tim2000s
Sep 21 2016 21:25
Well it seems to have installed okay with warnings rather than show stoppers
I'm just trying to set up MA on the master line and have to admit to not having a clue where to start.
(And I need to tinker with the Auto-Setup version to use my BG data source)
I assume I need something like openaps device add meal process --require "pumphistory.json profile.json clock.json"
Tim Street
@tim2000s
Sep 21 2016 22:02
Found the instructions that made it easier
Scott Leibrand
@scottleibrand
Sep 21 2016 22:19
@tim2000s the oref0-setup script can enable AMA for you. just need to do the advanced features part
garykidd
@garykidd
Sep 21 2016 22:35
@scottleibrand is there a relatively easy way to remove the mmtune part of your script.... I'm imagining that would make it work for me...I can manually mmtune with my situation
Tim Street
@tim2000s
Sep 21 2016 22:36
@scottleibrand where are the scripts that run from bash? I need to add my glucose collection shell script into it to pick the data up from the 640. That's running as a different cron job and when it overlaps it screws up openaps
Scott Leibrand
@scottleibrand
Sep 21 2016 22:46
@garykidd look what it does if you don't specify a ttyport
@tim2000s the bash stuff gets called via openaps aliases. so you'll want to add an alias that runs your script, and then add that alias to the pump-loop
https://github.com/openaps/oref0/pull/221/files is doing somewhat similar for Enlite on older pumps
Tim Street
@tim2000s
Sep 21 2016 22:48
That's what I thought it was doing. I've replaced the content of your bg-data with my shell script to pull the data.
Scott Leibrand
@scottleibrand
Sep 21 2016 22:48
that PR is to fix the overlap problem you're seeing
I haven't reviewed it yet, but you can do the same
Tim Street
@tim2000s
Sep 21 2016 22:48
But I added it to the cron bg-entry, which must be what's killing it.
Tim Street
@tim2000s
Sep 21 2016 22:55
okay - so the mdt-cgm pump-loop line added in to the alias, with get-bg now pointing to the scripts i've got... Let's see what happens.
Dana Lewis
@danamlewis
Sep 21 2016 22:55
:boom:
Tim Street
@tim2000s
Sep 21 2016 22:59
I've clearly misconfigured something there - although I'm not entirely sure what this is pointing at!
$[: -c: line 0: unexpected EOF while looking for matching `"'
$[: -c: line 1: syntax error: unexpected end of file
I suspect it's a spurios addition somewhere
Tim Street
@tim2000s
Sep 21 2016 23:04
That one was. This one is slightly different
I'm seeing this error
 File "/usr/lib/python2.7/shlex.py", line 172, in read_token
    raise ValueError, "No closing quotation"
ValueError: No closing quotation
Which looks to be related to the content of the input line in this report:
```
[report "settings/pumphistory-24h-zoned.json"] use = rezone reporter = JSON astimezone = False date = timestamp dateString start_at end_at created_at adjust = missing timezone = device = tz input = settings/pumphistory-24h.json
Now in that file I don't see a missing closing quotation.
garykidd
@garykidd
Sep 21 2016 23:11
@scottleibrand OK installed yet another instance this one just with carelink.......So I'm guessing I can just follow the mmeowlink install and your script wont automatically run an mmtune if it fails? Was going to follow thishttps://github.com/oskarpearson/mmeowlink/wiki/Installing-MMeowlink
Tim Street
@tim2000s
Sep 21 2016 23:21
Very odd @scottleibrand - the pump-loop script fails with the above error. All the individual aliases that make it up work.