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

13th
Oct 2016
Scott Leibrand
@scottleibrand
Oct 13 2016 00:18
doing that on the Explorer board didn't make a noticeable difference for me, but I haven't done any good side-by-side range tests yet
John Benjamin
@Bender1061
Oct 13 2016 00:58
Ok, then I guess I'll just wait.
Scott Leibrand
@scottleibrand
Oct 13 2016 00:58
it certainly doesn't hurt though
garykidd
@garykidd
Oct 13 2016 02:44
this sounds scary...
==> Pouring gnu-getopt-1.1.6.sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
==> Summary
🍺  /usr/local/Cellar/gnu-getopt/1.1.6: 33 files, 110.3K
iMac:Desktop g$ cd /Users/g/Desktop/jubilinux 
iMac:jubilinux g$ sudo ./flashall.sh
Password:
Error: Running Homebrew as root is extremely dangerous. As Homebrew does not
drop privileges on installation you are giving all build scripts full access
to your system. As a result of the macOS sandbox not handling the root user
correctly HOMEBREW_NO_SANDBOX has been set so the sandbox will not be used. If
we have not merged a pull request to add privilege dropping by November 1st
2016 running Homebrew as root will be disabled. No Homebrew maintainers plan
to work on this functionality.
Using U-Boot target: edison-blankcdc
Now waiting for dfu device 8087:0a99
Please plug and reboot the board
^C
iMac:jubilinux g$
garykidd
@garykidd
Oct 13 2016 03:06
ahhhh...just did it anyway...seems like its working
Gina
@gclyon
Oct 13 2016 03:12
That does sound scary! Are u running that as root? Maybe it works until nov 1st unless u symlink
garykidd
@garykidd
Oct 13 2016 03:24
seemed to have worked, actually
seemed to successfully flashjubilinux...
when you get to Initial Setup....
wasn't sure what you do for...
echo FIXME-thehostname-you-want > /etc/hostname
?
Scott Leibrand
@scottleibrand
Oct 13 2016 04:01
Replace that FIXME thing with the hostname you want.
Otherwise run it just as written, and it will place that hostname into the file.
garykidd
@garykidd
Oct 13 2016 04:02
got it.... dont think my changes to /etc/network/interfaces seemed to work...dont seem to have interent access....
yeah actually not connected to my router.
Scott Leibrand
@scottleibrand
Oct 13 2016 04:02
I would try configuring it identical to one of your other rigs
Both the interfaces file and your wpa_supplicant.conf
garykidd
@garykidd
Oct 13 2016 04:03
GNU nano 2.2.6         File: /etc/network/interfaces                          

1HModifiedes(5) file used by ifup(8)d ifdown(8)
auto lo iface lo inet loopback

auto usb0 iface usb0 inet static
    address 192.168.2.15
    netmask 255.255.255.0

auto wlan0 iface wlan0 inet dhcp
    # For WPA
    wpa-ssid ######Network 
    wpa-psk #########
    # For WEP wireless-essid Emutex wireless-mode Managed wireless-key
    #s:password
# And the following 4 lines are for when using hostapd... auto wlan0
#iface wlan0 inet static
#    address 192.168.42.1 netmask 255.255.255.0




^G Get He^O WriteOut  ^R Read File ^Y e ^K Cut Text  ^C Cur Pos
^Xt      ^J Justify   ^W Where Is  ^Next Page ^U UnCut TeCut TextSpell
David Young
@wgs4
Oct 13 2016 04:03
I’m trying to manually generate a report. Any report will do. Its a missing puzzle piece for me. I’m following the manual steps from older documentation to try and do this. Should the following have generated an actual JSON file in my monitor folder?
pi@rpi ~/myopenaps $ git add tz.ini
pi@rpi ~/myopenaps $ man git
pi@rpi ~/myopenaps $ openaps report add monitor/clock-zoned.json JSON tz clock monitor/clock.json
added tz://JSON/clock/monitor/clock-zoned.json
pi@rpi ~/myopenaps $ cd monitor/
pi@rpi ~/myopenaps/monitor $ ls
pi@rpi ~/myopenaps/monitor $ ls -lah
total 8.0K
drwxr-xr-x 2 pi pi 4.0K Oct  6 15:23 .
drwxr-xr-x 9 pi pi 4.0K Oct  6 15:27 ..
pi@rpi ~/myopenaps/monitor $
garykidd
@garykidd
Oct 13 2016 04:03
Does that seem right?
Scott Leibrand
@scottleibrand
Oct 13 2016 04:04
@wgs4 you have to openaps report invoke it next
@garykidd there is a missing newline before iface
But that method of putting the credentials in the interface file sucks. I would use wpa_supplicant.conf instead. There are links right below in the directions on how to do that.
David Young
@wgs4
Oct 13 2016 04:06
pi@rpi ~/myopenaps/monitor $ openaps report invoke tz
Not an openaps environment, run: openaps init
pi@rpi ~/myopenaps/monitor $ openaps init
Initialized empty Git repository in /home/pi/myopenaps/monitor/.git/
On branch master
Untracked files:
    .Mathematica/
    .WolframEngine/
    .Xauthority
    .asoundrc
    .bash_history
    .bash_logout
    .bash_profile
    .bashrc
    .cache/
    .config/
    .dbus/
    .gitconfig
    .gstreamer-0.10/
    .local/
    .nano_history
    .npm/
    .pip/
    .profile
    .ssh/
    .themes/
    .thumbnails/
    .xsession-errors
    .xsession-errors.old
    Documents/
    RaspberryPi_BTPAN_AutoConnect/
    bash-i.out
    bin/
    myopenaps/
    python_games/
    setuptools-21.0.0.zip
    src/
    wendy/

nothing added to commit but untracked files present
pi@rpi ~/myopenaps/monitor $ openaps report invoke tz
Not an openaps environment, run: openaps init
pi@rpi ~/myopenaps/monitor $
sory
Scott Leibrand
@scottleibrand
Oct 13 2016 04:06
invoke requires the report name, which is monitor/clock-zoned.json.
David Young
@wgs4
Oct 13 2016 04:06
sorry I see I was in wrong directory
Scott Leibrand
@scottleibrand
Oct 13 2016 04:07
tz is the name of a device not a report.
David Young
@wgs4
Oct 13 2016 04:07
oh, that too. :-)
pi@rpi ~/myopenaps $ openaps report invoke monitor/clock-zoned.json
tz://JSON/clock/monitor/clock-zoned.json
monitor/clock-zoned.json  raised  can't open 'monitor/clock.json': [Errno 2] No such file or directory: 'monitor/clock.json'
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 82, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openapscontrib/timezones/__init__.py", line 88, in main
    inputs = self.get_program(args)
  File "/usr/local/lib/python2.7/dist-packages/openapscontrib/timezones/__init__.py", line 60, in get_program
    program = json.load(argparse.FileType('r')(params.get('input')))
  File "/usr/lib/python2.7/argparse.py", line 1142, in __call__
    raise ArgumentTypeError(message % (string, e))
argparse.ArgumentTypeError: can't open 'monitor/clock.json': [Errno 2] No such file or directory: 'monitor/clock.json'
pi@rpi ~/myopenaps $
Do I first have to create an empty monitor/clock-zoned.json file?
garykidd
@garykidd
Oct 13 2016 04:10
0;12Hiface wlan0 inet dhcpile: /etc/network/interces                  Modified

# interfaces(5) file usby ifup(8) and ifdown(8)
auto lo iface lo inet loopback

auto usb0 iface usb0 inet static
    address 192.168.2.15
    netmask 255.255.255.0

auto wlan0
    # For WPA
    wpa-ssid ###### Network
    wpa-psk #########
    # For WEP wireless-essid Emutex wireless-mode Managed wireless-key
    #s:password
# And the following 4 lines are for when using hostapd... auto wlan0
#iface wlan0 inet static
#    address 192.168.42.1 netmask 255.255.255.0



                             [ Can now UnJustify]
 Get Help  ^O WriteOut  ^R Read File7m^Y Prev Page ^K Cut Text  ^C Cur [1B^X Exit      ^J Justify   ^W Is  ^V Next Page ^U UnCut Text^To Spell
                                                         Justify
that didnt seem to help
Scott Leibrand
@scottleibrand
Oct 13 2016 04:11
@garykidd you weren't supposed to remove that line, just make it its own line.
@wgs4 no it wants the input file: monitor/clock.json
That one has to come from invoking the monitor/clock.json report.
David Young
@wgs4
Oct 13 2016 04:14
So, I cannot create the the monitor/clocked-zone.json without first having the monitor/clock.json report existing ?
Scott Leibrand
@scottleibrand
Oct 13 2016 04:15
Correct.
And invoking it after you create it.
Usually you'll actually invoke both of them together in one invoke command that does them in sequence.
David Young
@wgs4
Oct 13 2016 04:16
And since I don’t have a pump connected, I won’t be able to create the monitor/clock.json
Scott Leibrand
@scottleibrand
Oct 13 2016 04:16
You could copy someone else's and modify it...
What devices do you have?
garykidd
@garykidd
Oct 13 2016 04:17
hmmm @scottleibrand didnt I do that?
David Young
@wgs4
Oct 13 2016 04:17
522
garykidd
@garykidd
Oct 13 2016 04:17
terminal stopped being responsive
David Young
@wgs4
Oct 13 2016 04:17
and G4 share
garykidd
@garykidd
Oct 13 2016 04:17
any reason why...
iMac:~ g$ screen /dev/cu.usbserial-A903JTCC 115200 -L [screen is terminating]
that shouldnt work?
Scott Leibrand
@scottleibrand
Oct 13 2016 04:18
Unplugged it?
garykidd
@garykidd
Oct 13 2016 04:18
nope
Scott Leibrand
@scottleibrand
Oct 13 2016 04:18
@wgs4 no Carelink then?
David Young
@wgs4
Oct 13 2016 04:18
yes carelink too
Scott Leibrand
@scottleibrand
Oct 13 2016 04:19
So what do you mean no pump connected?
David Young
@wgs4
Oct 13 2016 04:19
I mean the pump and CGM and carelink are at the office
and the Pi is with me at home
:-/
garykidd
@garykidd
Oct 13 2016 04:19
just unplugged and replugged usb got screen working now
Scott Leibrand
@scottleibrand
Oct 13 2016 04:20
Ah
David Young
@wgs4
Oct 13 2016 04:20
I’m working on this for my sister..
Scott Leibrand
@scottleibrand
Oct 13 2016 04:20
Does she have NS?
David Young
@wgs4
Oct 13 2016 04:20
Yes
that we’ve had working for a long time.
Scott Leibrand
@scottleibrand
Oct 13 2016 04:20
@garykidd
auto wlan0
iface wlan0 inet dhcp
garykidd
@garykidd
Oct 13 2016 04:21
I noticed when edison rebooted that it showed [FAILED] Failed to start hostame service
David Young
@wgs4
Oct 13 2016 04:21
I have openaps pillbox installed, but never got to making it work
Scott Leibrand
@scottleibrand
Oct 13 2016 04:21
With the second one indented.
@wgs4 so you can invoke the reports that get BG from NS
David Young
@wgs4
Oct 13 2016 04:22
BG = ?
Scott Leibrand
@scottleibrand
Oct 13 2016 04:22
Blood glucose
T1D lingo. ;-)
garykidd
@garykidd
Oct 13 2016 04:23
hmmm...I think I may have a sketchy usb cable
David Young
@wgs4
Oct 13 2016 04:23
Can you give me the command to try this?
Scott Leibrand
@scottleibrand
Oct 13 2016 04:23
(I don't have T1D myself, so I had to learn it all too)
David Young
@wgs4
Oct 13 2016 04:23
openaps report invoke ……..
garykidd
@garykidd
Oct 13 2016 04:24
editing in ano is resulting in all sorts of unintended actions...does this ever happen ?
Scott Leibrand
@scottleibrand
Oct 13 2016 04:24
@wgs4 first I'll have you run crontab -l
@garykidd yes, that's because your terminal isn't 80 characters wide.
Console is old school that way.
David Young
@wgs4
Oct 13 2016 04:25
pi@rpi ~/myopenaps $ crontab -l
no crontab for pi
pi@rpi ~/myopenaps $
Scott Leibrand
@scottleibrand
Oct 13 2016 04:25
@wgs4 oh. You've never run oref0-setup?
Or did you say no to crontab?
garykidd
@garykidd
Oct 13 2016 04:26
I noticed something strange when entering/copying commands that way--do they work if you just cust an paste and it wraps on itself though
David Young
@wgs4
Oct 13 2016 04:26
I don’t recall. I doubt I said no to something.
Scott Leibrand
@scottleibrand
Oct 13 2016 04:26
Try going back to that point in the docs and doing oref0-setup over.
David Young
@wgs4
Oct 13 2016 04:27
Im working from a manual setup that was incomplete, then I came back 3 months later and I ran the script and gave it a new directory to run from
Scott Leibrand
@scottleibrand
Oct 13 2016 04:27
It will set up all your reports and aliases, and cron
@garykidd yep. Resize your terminal to exactly 80 characters wide and it'll fix the line wrapping.
David Young
@wgs4
Oct 13 2016 04:33
@scottleibrand I have a ton of reports and alias already setup according to openaps report show and alias show
Scott Leibrand
@scottleibrand
Oct 13 2016 04:33
Ok. So we can use those without cron.
Is there an alias called monitor-cgm or get-bg?
David Young
@wgs4
Oct 13 2016 04:33
I cant find the section on orefo-setup
Scott Leibrand
@scottleibrand
Oct 13 2016 04:34
If so, do an openaps alias show on that
David Young
@wgs4
Oct 13 2016 04:34
get-ns-bg
Scott Leibrand
@scottleibrand
Oct 13 2016 04:34
Perfect
David Young
@wgs4
Oct 13 2016 04:35
run it?
Scott Leibrand
@scottleibrand
Oct 13 2016 04:35
show it
Well, you can run it too
But if you want to see how to run a report, you'll have to find the underlying report inside the alias.
David Young
@wgs4
Oct 13 2016 04:37
pi@rpi ~/myopenaps $ get-ns-bg
-bash: get-ns-bg: command not found
pi@rpi ~/myopenaps $ openaps get-ns-bg show
ns://JSON/shell/cgm/ns-glucose.json
Traceback (most recent call last):
errors
maybe my command is wrong
garykidd
@garykidd
Oct 13 2016 04:38
something is all screwed up ...switched the usb cables but same results actually...wondering if it has something to do with huge files being transferred in background while I'm doing this..doing a huge backup to external drive...will try tomorrow.
Scott Leibrand
@scottleibrand
Oct 13 2016 04:38
You run aliases by doing openaps alias-name
although looks like you did run it, because it ignores the extra "show" afterward
openaps alias show alias-name will show the contents.
garykidd
@garykidd
Oct 13 2016 04:41
hmmm...i edit the damn file and it looks fine but when I go to nano it again---its either missing the line that was deleted above...or it looks the exact same....any ideas?
Scott Leibrand
@scottleibrand
Oct 13 2016 04:42
I've told you twice.
garykidd
@garykidd
Oct 13 2016 04:43
@scottleibrand me?
Scott Leibrand
@scottleibrand
Oct 13 2016 04:45
Yes. 80 columns.
garykidd
@garykidd
Oct 13 2016 04:46
yeah-- I saw that ..when I restarted terminal..it sets it at 80..so that's not the issue..wish it was though
Scott Leibrand
@scottleibrand
Oct 13 2016 04:46
Hmm really?
Ok that is odd. Sorry for being curt.
garykidd
@garykidd
Oct 13 2016 04:46
yup...gonna send you a pic just so you can get a kick out of my pain...(JK)
David Young
@wgs4
Oct 13 2016 04:48
pi@rpi ~/myopenaps $ openaps alias show get-ns-bg
get-ns-bg ! bash -c "openaps get-ns-glucose && cat cgm/ns-glucose.json | json -c \"minAgo=(new Date()-new Date(this.dateString))/60/1000; return minAgo < 10 && minAgo > -5 && this.glucose > 30\" | grep -q glucose && cp -pu cgm/ns-glucose.json cgm/glucose.json; cp -pu cgm/glucose.json monitor/glucose.json"
pi@rpi ~/myopenaps $
i also reran the alias without the work show on the end. it did try to run the alias both times.
Scott Leibrand
@scottleibrand
Oct 13 2016 04:48
You could try vi, if you're willing to learn i for insert and :wq for write quit
^^ @wgs4
David Young
@wgs4
Oct 13 2016 04:48
ok
Scott Leibrand
@scottleibrand
Oct 13 2016 04:49
Ugh sorry
Now I'm confusing you two.
David Young
@wgs4
Oct 13 2016 04:49
lol
Scott Leibrand
@scottleibrand
Oct 13 2016 04:49
@garykidd could use vi
David Young
@wgs4
Oct 13 2016 04:49
that makes more sense.
Scott Leibrand
@scottleibrand
Oct 13 2016 04:49
@wgs4 so you found another alias inside that one. Do the same show command on that
I think I need to go to bed soon. :-)
David Young
@wgs4
Oct 13 2016 04:50
glucose is the next alias i found?
ok no worries
garykidd
@garykidd
Oct 13 2016 04:51
hmmm...still thinking thats probably not it..maybe its somehow related to the copy in the background couple hundred gigs over usb external drive...who knows...try tomorrow...not going to be able to function tomorrow
Scott Leibrand
@scottleibrand
Oct 13 2016 04:52
@wgs4 get-ns-glucose
David Young
@wgs4
Oct 13 2016 04:54
oh.. no i need sleep to obviously.!
garykidd
@garykidd
Oct 13 2016 04:54
@scottleibrand was curious about my post from earlier on the flashing....should I be concerned about it
==> Pouring gnu-getopt-1.1.6.sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
==> Summary
🍺  /usr/local/Cellar/gnu-getopt/1.1.6: 33 files, 110.3K
iMac:Desktop g$ cd /Users/g/Desktop/jubilinux 
iMac:jubilinux g$ sudo ./flashall.sh
Password:
Error: Running Homebrew as root is extremely dangerous. As Homebrew does not
drop privileges on installation you are giving all build scripts full access
to your system. As a result of the macOS sandbox not handling the root user
correctly HOMEBREW_NO_SANDBOX has been set so the sandbox will not be used. If
we have not merged a pull request to add privilege dropping by November 1st
2016 running Homebrew as root will be disabled. No Homebrew maintainers plan
to work on this functionality.
Using U-Boot target: edison-blankcdc
Now waiting for dfu device 8087:0a99
Please plug and reboot the board
^C
iMac:jubilinux g$
David Young
@wgs4
Oct 13 2016 04:55
pi@rpi ~/myopenaps $ openaps alias show get-ns-glucose
get-ns-glucose report invoke cgm/ns-glucose.json
pi@rpi ~/myopenaps $
Scott Leibrand
@scottleibrand
Oct 13 2016 04:56
@garykidd did you try it without sudo?
@wgs4 there you go. You can manually do that same invoke the alias does
David Young
@wgs4
Oct 13 2016 04:58
pi@rpi ~/myopenaps $ openaps report invoke cgm/ns-glucose.json
ns://JSON/shell/cgm/ns-glucose.json
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 51, in __call__
    self.run(self.args)
  File "/usr/local/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openapscontrib/timezones/__init__.py", line 88, in main
    inputs = self.get_program(args)
  File "/usr/local/lib/python2.7/dist-packages/openapscontrib/timezones/__init__.py", line 60, in get_program
    program = json.load(argparse.FileType('r')(params.get('input')))
  File "/usr/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
No JSON object could be decoded

Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 82, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/reports/invoke.py", line 48, in main
    reporters.Reporter(report, device, task)(output)
  File "/usr/local/lib/python2.7/dist-packages/openaps/reports/reporters/__init__.py", line 33, in __call__
    self.blob = self.serialize(data)
  File "/usr/local/lib/python2.7/dist-packages/openaps/reports/reporters/__init__.py", line 31, in serialize
    return self.method.serialize(render(data), self)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/process.py", line 56, in prerender_json
    return json.loads(data)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
pi@rpi ~/myopenaps $
@scottleibrand We can mess with this more tomorrow. maybe I just need to start with a whole new install of Raspbian on a new SD card.
Scott Leibrand
@scottleibrand
Oct 13 2016 05:00
K. Do you want to troubleshoot that? Or just run oref0-setup again and fix it?
David Young
@wgs4
Oct 13 2016 05:00
im fine with running setup again
whatever is easiest.
Scott Leibrand
@scottleibrand
Oct 13 2016 05:00
Should be able to just delete your myopenaps directory and re-run it.
David Young
@wgs4
Oct 13 2016 05:00
I don’t have anything to be concerned with looseing
ok ill do this tomorrow.. or at least won’t ask any more questions tonight so you can check out. :-)
garykidd
@garykidd
Oct 13 2016 05:07
root@blueworld:~# sudo nano /etc/network/interfaces
-bash: sudo: command not found
hmmm
bed
Scott Leibrand
@scottleibrand
Oct 13 2016 05:15
@garykidd you're already root, so no need for sudo. You install that a bit later.
'Nite all
Tim Street
@tim2000s
Oct 13 2016 06:46
Well. I've made a start on Lref0 or oref0 for Loop.... :worried: Gawd knows how long this will take....
Mike
@libxmike
Oct 13 2016 11:48
@scottleibrand the problem is solved thanks to @SandraK82 , the Bolus Wizard was not turned on and not set in my pump, not looks good
Sandra Keßler
@SandraK82
Oct 13 2016 11:53
@scottleibrand another question was today discussed in germanLOOP: when is which value taken? There is basal setup in pump and ns, factors, targets too. If I change in ns basal, it gets not written to pump, if I change basal in pump it does not shown in ns. If I set temp_target in ns, it gets applied in openAps, if I change targets, it seems to have no effect... can you please comment on the dataflow?
Tim Street
@tim2000s
Oct 13 2016 12:00
oref0 uses the pump basal as its source data and adjusts from there. The basal patterns are not reflected across systems. I presume this is a security thing.
Tim Street
@tim2000s
Oct 13 2016 12:20
@SandraK82 - having a quick look through the code I can't see a way to modify the basal pattern on the pump. You can adjust the tbr, and the temp target is something that's set on oref0 algorithm, but I don't think you can write a new basal programme via the remote connection, which is why you wouldn't be able to adjust the treatment profile in NS and feed it to the pump. I don't see why you couldn't write something to take the current pump basal profile and post it to Nightscout though. I'm also not sure that you can pull basal patterns from the pump other than the live one to feed up to NS as different treatment profiles. I stand to be corrected though.
Dana Lewis
@danamlewis
Oct 13 2016 12:41
Correct except you should be able to configure so that temp targets are sent and used by openaps. it won't write new targets on the pump but OpenAPS will use them for calculations
Sandra Keßler
@SandraK82
Oct 13 2016 12:48
so on openAPS side: base basal, targets, ch factor, isf are taken from the pump, temp_target from ns. On ns side: everything is taken from profile, except set_temp_basal from openAPS. correct?
Scott Leibrand
@scottleibrand
Oct 13 2016 13:07
yeah, that's just because no one has yet implemented anything in NS to import the pump basal profile etc. into NS
Sandra Keßler
@SandraK82
Oct 13 2016 13:09
great, thanks again @scottleibrand and @danamlewis
Sandra Keßler
@SandraK82
Oct 13 2016 13:14
something to put on my never ending todolist...
Scott Leibrand
@scottleibrand
Oct 13 2016 13:16
heh exactly :)
Kelly Watson
@kellyisworking
Oct 13 2016 13:52
awesome @tim2000s :+1:
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Oct 13 2016 13:54

@tim2000s , @scottleibrand to implement AMA and Lref0 :smile: Are there any data points that Loop is missing.
Loop [has]
Basal Profile
ISF,
DIA,
MaxBasal,
MaxBolus,
CarbRatios,
Carbs Input,
Target Range,
Bolus’s for 12 hours
Basal for 12 hrs
Current Glucose 12 hrs.

All that’s left I would sumize is to point to which algorithm to use (Loops or Lref0 and with or without AMA) in DoseMath.swift, when calculating a temp-basal. (yes no?)

https://github.com/LoopKit/Loop/blob/master/Loop/Managers/DoseMath.swift#L58
(I’m guessing it’s much more complicated than re-writing the oref0 formulae in swift)

Tim Street
@tim2000s
Oct 13 2016 14:02
There are a couple of other things that are needed, that's certainly the case.
Scott Leibrand
@scottleibrand
Oct 13 2016 14:05
We need 24h of glucose and dosing history to do autosens
24h+DIA of insulin history actually.
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Oct 13 2016 14:06
aah.. That could be an easy fix I think it was just a limit that Nate set to keep the iPhone clean.
However it does not “pull” that from the pump to backfill so startup is a problem.
Scott Leibrand
@scottleibrand
Oct 13 2016 14:10
That's fine. Autosens will default to doing nothing if it doesn't have enough data.
And it'll still loop normally just without any autosens adjustments.
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Oct 13 2016 14:10
but oREF0 calcs do not require that long view.
just AMA
Scott Leibrand
@scottleibrand
Oct 13 2016 14:11
Not even AMA. it's more like 2*DIA
autosens is its own thing.
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Oct 13 2016 14:11
oh ok. so you now need 3 switches in settings :smile:
Scott Leibrand
@scottleibrand
Oct 13 2016 14:11
Maybe not
If the data is there, it does its thing
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Oct 13 2016 14:12
:+1:
Scott Leibrand
@scottleibrand
Oct 13 2016 14:12
There are some preferences.json things we might want to expose though.
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Oct 13 2016 14:14
Very interesting.. there are a number of folks that really want to see this happen. Thanks.
Scott Leibrand
@scottleibrand
Oct 13 2016 14:17
I'm one of them. :smile:
Tim Street
@tim2000s
Oct 13 2016 14:18
Loop writes the glucose data to glucosekit, so that's on the phone already. You can get the dosing history from the pump.
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Oct 13 2016 14:26
Yes dosing history is now stored as well. Click on Insulin Delivery Chart and “Event History” tab. All the records are there from pump pull if using Settings > Preferred Data Source > Event History. (also bolus’s are now shown in chart for refrence on how to decode the data).
Eric
@ecc1
Oct 13 2016 14:41
@tim2000s You can request BasalPatternA and BasalPatternB explicitly, or just the currently selected pattern (commands 0x93, 0x94, and 0x92 respectively). I can share some Go code that updates the NS stored profile from the pump settings if anyone wants to make that a standalone utility. It's part of my loop code right now, along with the other NS updates for BG entries, treatments, etc., but could be pulled out.
Scott Leibrand
@scottleibrand
Oct 13 2016 15:23
@ecc1 would you be willing to add that tool to oref0 so we can add it to oref0-setup loops?
cjo20 @cjo20 wondesr what tool that is
Scott Leibrand
@scottleibrand
Oct 13 2016 15:37
I assume we should be able to shell out and run go code just about as easily as anything else. Might need to have oref0-setup install go
Eric
@ecc1
Oct 13 2016 15:38
I don't think it will be directly usable (depends on the rest of my setup for talking to an SPI-connected radio, etc.), but might be helpful to understand the JSON that NS expects for a profile update.
Probably makes more sense to just write a bash script that pulls in the local JSON files with the settings and basal info, munges it with jq or whatever, and uploads it via curl.
Scott Leibrand
@scottleibrand
Oct 13 2016 16:19
k
if anyone wants to take that on, it would be a good enhancement
dougtakeuti
@dougtakeuti
Oct 13 2016 17:08
The loop stopped because it ran out of space. I tried to erase as much as I could from var/log/, which is something that has worked in the past. Now it is not working. Any ideas?
...  
File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 718, in execute
    raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git add upload/cgm-ns-raw.json' returned with exit code 128
stderr: 'error: file write error (No space left on device)
fatal: unable to write sha1 file'

KiB Mem:    983516 total,   183320 used,   800196 free,    51500 buffers
KiB Swap:        0 total,        0 used,        0 free,    58892 cached
Scott Leibrand
@scottleibrand
Oct 13 2016 17:09
what does df -h show?
if it shows / is the full mount point, then you can do cd / && sudo du -xh -d 3 | egrep "[0-9][0-9][0-9]M|[0-9]G"' to see what's biggest there
dougtakeuti
@dougtakeuti
Oct 13 2016 17:11
Filesystem       Size  Used Avail Use% Mounted on
/dev/root        1.4G  1.2G  122M  91% /
devtmpfs         480M     0  480M   0% /dev
tmpfs             97M  316K   96M   1% /run
tmpfs            5.0M     0  5.0M   0% /run/lock
tmpfs            193M     0  193M   0% /run/shm
tmpfs            481M   24K  481M   1% /tmp
/dev/mmcblk0p7    32M  5.3M   27M  17% /boot
/dev/mmcblk0p10  1.3G  1.3G  4.0K 100% /home
cd / && sudo du -xh -d 3 | egrep "[0-9][0-9][0-9]M|[0-9]G"
289M    ./usr/share
287M    ./usr/lib
703M    ./usr
117M    ./root
191M    ./var/cache/apt
194M    ./var/cache
294M    ./var
1.2G    .
Scott Leibrand
@scottleibrand
Oct 13 2016 17:16
so it's actually /home that is full
so do the same thing with cd /home instead
dougtakeuti
@dougtakeuti
Oct 13 2016 17:17
yep, ok thanks. is there anything crucial that I should not touch? don't want to ruin the system!
Scott Leibrand
@scottleibrand
Oct 13 2016 17:17
hard to tell until I see the output
or maybe I should say yes, there are lots of things that are necessary, and only a few that should be cleaned up. :)
dougtakeuti
@dougtakeuti
Oct 13 2016 17:19
err.. how to I list that?
Scott Leibrand
@scottleibrand
Oct 13 2016 17:19
cd /home && sudo du -xh -d 3 | egrep "[0-9][0-9][0-9]M|[0-9]G"
dougtakeuti
@dougtakeuti
Oct 13 2016 17:20
118M    ./edison/src/decocare
157M    ./edison/src
1.1G    ./edison/myopenaps/.git
1.1G    ./edison/myopenaps
1.3G    ./edison
1.3G    .
Scott Leibrand
@scottleibrand
Oct 13 2016 17:22
looks like you'll need to rm -rf ~/myopenaps/.git and oref0-reset-git
not sure why people keep having their .git directories grow so big
dougtakeuti
@dougtakeuti
Oct 13 2016 17:35
... and it works! Thanks a lot @scottleibrand !
David
@davidkeddydb
Oct 13 2016 18:22
Screenshot 2016-10-13 14.21.15.png
Bad site or something, this has not been a fun ride to be on
Mike
@libxmike
Oct 13 2016 18:36
I get this error every hour or every few hours, after reboot works again, it's carelink USB stick, is there any solution for this or known problem?
Starting pump-loop at Thu Oct 13 20:33:40 CEST 2016:
monitor/temp_basal.json  raised  ACK is 0 bytes:

pump://JSON/read_temp_basal/monitor/temp_basal.json
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 82, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 44, in __call__
    self.before_main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 61, in before_main
    self.setup_medtronic( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 160, in setup_medtronic
    self.uart.open( )
  File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 874, in open
    log.info('%s' % self.product_info( ))
  File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 515, in product_info
    return self.query(ProductInfo)
  File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 509, in query
    return self.process( )
  File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 496, in process
    ack, response = self.command.respond(raw)
  File "/usr/local/lib/python2.7/dist-packages/decocare/stick.py", line 71, in respond
    raise AckError("ACK is 0 bytes:\n%s" % lib.hexdump(raw))
decocare.errors.AckError: ACK is 0 bytes:

Error, retrying
monitor/temp_basal.json  raised  ACK is 0 bytes:
Scott Leibrand
@scottleibrand
Oct 13 2016 18:40
perhaps putting oref0-reset-usb into preflight if mm-stick-warmup fails. there have been a few discussions about that over the last few days
hard to tell if that's the issue from that output, but if it persists until a reboot, seems likely
Mike
@libxmike
Oct 13 2016 19:05
@scottleibrand carlink stick out and in works also
live4sw
@live4sw
Oct 13 2016 19:10
Quick q - has anyone had a dental x-ray lately? Do you keep your Dexcom transmitter (and pump) on during it?
Dana Lewis
@danamlewis
Oct 13 2016 19:10
Yep. X-ray didn't go anywhere near those
live4sw
@live4sw
Oct 13 2016 19:11
Great, thanks!
Pete Schwamb
@ps2
Oct 13 2016 19:11
From medtronic: "If you are going to have an X-ray, CT scan, MRI or any other type of radiation therapy, take your pump and remote control off, and remove them from the treatment area.”
live4sw
@live4sw
Oct 13 2016 19:12
Yeah, I might remove the pump anyway since that's easy to disconnect for a minute, was more focused on the transmitter
Scott Leibrand
@scottleibrand
Oct 13 2016 19:15
fwiw, dental x-rays are extremely localized: much different from a chest x-ray or something. dunno how much radiation MDT is worried about, though
live4sw
@live4sw
Oct 13 2016 19:20
Yeah. Unfun story - last January was in hospital ER for virus/bad flu, they ordered a chest x-ray for pneumonia, they woke me up at 2am to do it and I was totally out of it, I asked for a minute of time to put my pump in the other room, technician said "oh that's not necessary" and then left me in the x-ray room alone and did the x-ray.
Thankfully pump was ok.
Hannah Crabtree
@lollydaggle
Oct 13 2016 19:22
I didn't even think about normal x-rays when I broke my thumb either! Not super near my pump but still. There's so many things to keep track of.
Mike
@libxmike
Oct 13 2016 19:23
as far as I know, old school X-Ray or CT wont do anything to pump or sensor, only with MRI everything should be removed
CT is X-Ray , MRI is magnetic
Scott Leibrand
@scottleibrand
Oct 13 2016 20:45
with MRI all metals need to be out, or they'll become projectiles. the concern with X-rays is more about whether they'll damage the pump
Mike
@libxmike
Oct 13 2016 20:57
with omnipod was no problem, with medtronic may be different but from what I read no problem.
Hannah Crabtree
@lollydaggle
Oct 13 2016 22:27
I've had pretty low carb meals and snacks today (23 grams being the largest) but I haven't had to bolus either!
What was the page for testing snacks and stuff to see if the loop could keep up?
garykidd
@garykidd
Oct 13 2016 23:48
@scottleibrand you ever here of this story where they had a contest ...maybe at a state fair or something like that...where they particpants try to guess the weight of cow....basically no one had a particular skill t guessing the weight of cows or anything....
the results basically showed that...when you averaged all the results...it was remarkably close to the cows weight....
same sort of test canbe done for # of marbles or gumballs in a jar and all sorts of different things.
was just thinking of this as I was eating dinner...wondering if I estimated the right number of carbs for my meal....and was thinking....
wouldnt it be great if you could post a picture of your meal online and have folks enter their estimates for the number of carbs that they think it is....anyway....I think it could actually work
so people will guess to high...consistently...some too low...and some right on target...but when you average the results...you get a good estimate.
Scott Leibrand
@scottleibrand
Oct 13 2016 23:52
yeah, there have actually been quite a few new carb/calorie counting apps recently that try to attack that problem. I think most of them are trying to do it with AI or other means rather than wisdom of crowds though
the only challenge with that is you'd need people who had some underlying knowledge of the topic (like fairgoers of that day had about livestock weights)
so you might have to start with people who carb count (or at least calorie count) regularly
garykidd
@garykidd
Oct 13 2016 23:53
actually...from what I read...that's one of the remarkable things...they didnt have anyparticualr knowledge of the subject
Scott Leibrand
@scottleibrand
Oct 13 2016 23:55
well, that's not completely true. random guesses about the number of atoms in a candy jar wouldn't average out anywhere near reality
unless you figured out some way to capture the signal from people who remember 6.022*10^23 and had some basic chemistry knowledge of how to apply it
garykidd
@garykidd
Oct 13 2016 23:59
I'm sure there's limits to it an extent...but I could see it holding true even in your example if at least some of the particpants had a knowledge of best way to estimate....but I see how your example would be extreme. It's actually pretty easy to test...curious about it for sure.