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

9th
Jun 2016
Kevin Wells
@wkcwells
Jun 09 2016 00:02
@scottleibrand I ran sudo npm install -g oref0 but I am still getting the missing module error.
Error: Cannot find module ‘yargs'
Paul Martin
@Spazholio
Jun 09 2016 00:12
@danamlewis @scottleibrand - once you got openxshareble working, have you found it to be stable and reliable?
kstdennis
@kstdennis
Jun 09 2016 00:29
@wkcwells if you do an npm ls oref0, does it give output indiccating it's installed?
or better yet, an npm ls yargs
Kevin Wells
@wkcwells
Jun 09 2016 01:15
@kstdennis If I do npm ls -g yags | oref0 both show as installed, tes.
Paul Martin
@Spazholio
Jun 09 2016 01:18
@bewest I know you’re traveling today, but whenever you have a moment, I’d be curious to know if you have any other thoughts on the whole openxshareble thing. I’ve tried on both the Pi and the Edison, with the same results.
Scott Leibrand
@scottleibrand
Jun 09 2016 01:20
@Spazholio yes, it has been pretty reliable. Slow though, so we don't retrieve the full 24h over BLE
Paul Martin
@Spazholio
Jun 09 2016 01:21
So are you not doing auto-sens? Or do you rely on NS data for that, if so?
Lynne Butts
@flutelynne_twitter
Jun 09 2016 01:52
@danamlewis This was the first time that it happened.
Scott Leibrand
@scottleibrand
Jun 09 2016 01:55
@Spazholio when we're online, it gets BG from NS and does autosens. when we're offline, there's not enough BG data so autosens gets disabled
kstdennis
@kstdennis
Jun 09 2016 01:56
@wkcwells from q quick google search this came up, seems like the module path in not in the NODE_PATH
http://stackoverflow.com/a/14515868
Kevin Wells
@wkcwells
Jun 09 2016 01:58
Thanks @kstdennis. I was just starting to think about paths. This looks very helpful. I’ll let you know.
kstdennis
@kstdennis
Jun 09 2016 01:58

the important part being;
*The fix for now is to point NODE_PATH at the right directory:

export NODE_PATH=/opt/lib/node_modules*

hopefully that gets you in the right direction
s/gets you/gets you going
sorry hipchat syntax. :)
Paul Martin
@Spazholio
Jun 09 2016 01:59
@scottleibrand Understood. Thanks.
Dan Piessens
@dpiessens
Jun 09 2016 02:07
@Spazholio what error are you getting with bluetooth?
Paul Martin
@Spazholio
Jun 09 2016 02:08
<Adafruit_BluefruitLE.bluez_dbus.gatt.BluezGattService object at 0xb670d64c>
paired? 0
pairing...
paired
[UUID('00001800-0000-1000-8000-00805f9b34fb'), UUID('00001801-0000-1000-8000-00805f9b34fb'), UUID('00001804-0000-1000-8000-00805f9b34fb'), UUID('0000180a-0000-1000-8000-00805f9b34fb'), UUID('f0aca0b1-ebfa-f96f-28da-076c35a521db')]
finding service
SERVICE <Adafruit_BluefruitLE.bluez_dbus.gatt.BluezGattService object at 0xb67003cc>
sending auth code [MY SERIAL]
Traceback (most recent call last):
[Traceback omitted]
AttributeError: 'NoneType' object has no attribute 'iter_records'
If I do it, on the Dexcom, I’ll get the “Forget Device” option, meaning it thinks it’s paired to something, but the command never succeeds.
Kevin Wells
@wkcwells
Jun 09 2016 02:22
@kstdennis thanks for your help. So far no luck. I can’t tell if I have the wrong NODE_PATH set, or if the env variable is not propagating all the way to the js. I’ll keep digging.
Suprised no one else has run into this.
Kevin Wells
@wkcwells
Jun 09 2016 02:27
OK, this works export NODE_PATH=/usr/lib/node_modules/oref0/node_modules
But it doesn’t look healthy to me. Anybody have further insight?
In any case, thanks very much @scottleibrand and @kstdennis. I’ll have a much better night now.
Dan Piessens
@dpiessens
Jun 09 2016 02:32
@Spazholio yeah it's paired, I wonder if something broke when we updated the decxom api for G4/G5 support
Paul Martin
@Spazholio
Jun 09 2016 02:33
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 "/home/edison/src/openxshareble/openxshareble/__init__.py", line 89, in __call__
    res = self.ble.run_mainloop_with(run, quit_with_loop=False)
  File "/home/edison/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 121, in _user_thread_main
    self._return_code = target()
  File "/home/edison/src/openxshareble/openxshareble/__init__.py", line 85, in run
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/dexcom.py", line 297, in main
    for item in self.dexcom.iter_records(self.RECORD_TYPE):
AttributeError: 'NoneType' object has no attribute 'iter_records'
There’s the traceback, if it helps.
If there’s something I can do to help track it down, feel free to let me know.
Dan Piessens
@dpiessens
Jun 09 2016 02:35
yeah I remember seeing this when the CRC or header is wrong... problem is I don't know how to fix it :(
Paul Martin
@Spazholio
Jun 09 2016 02:39
Is it possible that I need to upgrade the Dexcom unit itself? I mean, I don’t know if I can, but I can try.
Dan Piessens
@dpiessens
Jun 09 2016 02:40
no no problem with the unit, if anything you may need to roll back your decoding_dexcom module
Paul Martin
@Spazholio
Jun 09 2016 02:41
Well, I’m game if you want me to try. Might have to guide me through it a bit...
Dan Piessens
@dpiessens
Jun 09 2016 02:42
sure did you install the dexcom_reader module via pip or source
Paul Martin
@Spazholio
Jun 09 2016 02:42
Assuming it gets swept in with the sudo pip install -U openaps command?
If so…pip. =)
Dan Piessens
@dpiessens
Jun 09 2016 02:43
yup, that's it, let me check how you check the version
pip list | grep dexcom_reader
Paul Martin
@Spazholio
Jun 09 2016 02:44
Nothing returns.
Ah!
Dash, not underscore.
dexcom-reader (0.1.9)
Dan Piessens
@dpiessens
Jun 09 2016 02:46
ok so try pip install dexcom-reader==0.1.8
Paul Martin
@Spazholio
Jun 09 2016 02:47
Completed. Just try the command again, or do I need to do something else first?
Dan Piessens
@dpiessens
Jun 09 2016 02:50
actually I think we need to downgrade a bunch more versions given the source history
Paul Martin
@Spazholio
Jun 09 2016 02:50
k
Dan Piessens
@dpiessens
Jun 09 2016 02:51
looks like 0.0.9 lines up with when he developed it
try the command above with that version
once you do that try running the command again
Paul Martin
@Spazholio
Jun 09 2016 02:51
Downgrading to 0.0.9, and trying...
Spoke too soon.
Scott Leibrand
@scottleibrand
Jun 09 2016 02:52
AttributeError: 'NoneType' object has no attribute 'iter_records' usually means the BLE pairing/auth isn't working
Paul Martin
@Spazholio
Jun 09 2016 02:52
Downloading/unpacking dexcom-reader==0.0.9
  Could not find a version that satisfies the requirement dexcom-reader==0.0.9 (from versions: 0.0.2, 0.0.3.linux-x86_64, 0.0.4, 0.0.1.linux-x86_64, 0.1.6, 0.0.5.linux-x86_64, 0.0.2.linux-x86_64, 0.0.4.linux-x86_64, 0.1.1, 0.1.8, 0.1.2, 0.1.9, 0.0.3, 0.1.7, 0.0.5, 0.1.0, 0.0.8, 0.1.10, 0.0.1, 0.1.3, 0.1.4, 0.0.6, 0.1.5)
Cleaning up...
No distributions matching the version for dexcom-reader==0.0.9
Storing debug log for failure in /root/.pip/pip.log
Scott Leibrand
@scottleibrand
Jun 09 2016 02:52
check that the receiver is trusted with bluetoothctl
Paul Martin
@Spazholio
Jun 09 2016 02:52
@scottleibrand It’s not showing the BT icon on the Dexcom, so that very well might be.
It was.
Scott Leibrand
@scottleibrand
Jun 09 2016 02:53
yeah, no BT icon when you run it means it's a BLE issue
nothing to do with dexcom-reader version
but, that said, when I was getting those symptoms I ended up re-running everything from scratch to fix. not sure what was wrong
Paul Martin
@Spazholio
Jun 09 2016 02:53
I’ve tried pairing/trusting/connecting with bluetoothctl and while it says it paired, I never sent it the serial or anything, so I don’t know how accurate that is.
Matt Pressnall
@logichammer
Jun 09 2016 03:04

@scottleibrand or @MosiGitHub, I am trying to add the temptargets to get-profile...deleted the file and and the device from openaps.ini and then ran the command to add the device and alias. They added fine. But when I run openaps get-settings I get:

get-profile://text/shell/settings/profile.json
settings/profile.json  raised  'Namespace' object has no attribute 'temptargets'
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-report", line 82, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/home/pi/src/openaps/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/home/pi/src/openaps/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/home/pi/src/openaps/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/home/pi/src/openaps/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/home/pi/src/openaps/openaps/vendors/process.py", line 90, in main
    params = self.get_params(args)
  File "/home/pi/src/openaps/openaps/vendors/process.py", line 48, in get_params
    params[opt] = getattr(args, opt)
AttributeError: 'Namespace' object has no attribute 'temptargets'
pi:~/openaps-dev (master)$

Ideas?

I can roll back obviously but would like to get it added.

Also, troubleshooting my internet dependency and I am pretty sure it has to do with these commands having exits in them:

ns-temptargets = ! bash -c "curl -m 30 -s \"$NIGHTSCOUT_HOST/api/v1/treatments.json?find\[created_at\]\[\$gte\]=`date -d \"6 hours ago\" -Iminutes`&find\[eventType\]\[\$regex\]=Target\" > settings/temptargets.json; exit 0 "
ns-meal-carbs = ! bash -c "curl -m 30 -s \"$NIGHTSCOUT_HOST/api/v1/treatments.json?find\[created_at\]\[\$gte\]=`date -d \"6 hours ago\" -Iminutes`&find\[carbs\]\[\$exists\]=true\" > monitor/carbhistory.json && oref0-meal monitor/pumphistory-zoned.json settings/profile.json monitor/clock-zoned.json monitor/carbhistory.json monitor/glucose.json settings/basal_profile.json > monitor/meal.json; exit 0"

Can a bash god let me know how I might be able to ditch this dependency or even echo out "Hey, I couldn't talk to the internet and I am about to die!" so I can troubleshoot a little more?

Matt Pressnall
@logichammer
Jun 09 2016 03:10
I'm guessing I just put an echo separated by a ; before the exit 0
for the first one is the logic: if I can't get my treatments, then exit? Actually, I bet I should do this:
<commands>; echo "this is it, man" && exit 0;
This message was deleted
Scott Leibrand
@scottleibrand
Jun 09 2016 03:17
So we probably should switch over to using a device and report instead of my bash curl stuff.
Matt Pressnall
@logichammer
Jun 09 2016 03:18
Has anybody else run into this internet dependency? I'm almost positive it can't get the NS glucose / temptargets and says adios
sound right?
About to test
kstdennis
@kstdennis
Jun 09 2016 03:19
you might want to use a semicolon as opposed to the double ampersands
Matt Pressnall
@logichammer
Jun 09 2016 03:20
I was thinking that first but then thought that might mess with the "else" part of the expression...but wasn't sure.
you think it won't ignore the exit that way?
Scott Leibrand
@scottleibrand
Jun 09 2016 03:20
Exit just sets the return code.
kstdennis
@kstdennis
Jun 09 2016 03:21
let me check the one liner. that thing is huge :)
Matt Pressnall
@logichammer
Jun 09 2016 03:21
but the semicolon: does it indicate the beginning of an else statement
kstdennis
@kstdennis
Jun 09 2016 03:21
so if it always exit with a 0, then the && will always run the following command
Scott Leibrand
@scottleibrand
Jun 09 2016 03:21
No, semicolon means do the next thing regardless of the exit status of the last thing.
Matt Pressnall
@logichammer
Jun 09 2016 03:22
gotcha
kstdennis
@kstdennis
Jun 09 2016 03:22
^^
Matt Pressnall
@logichammer
Jun 09 2016 03:22
so it ALWAYS exits then, correct?
Scott Leibrand
@scottleibrand
Jun 09 2016 03:23
Matt Pressnall
@logichammer
Jun 09 2016 03:23
Thanks, Scott...my theory is bunk then
kstdennis
@kstdennis
Jun 09 2016 03:23
@scottleibrand that's some one liner. :)
Matt Pressnall
@logichammer
Jun 09 2016 03:23
time to unplug the Wi-Fi and see where it gets caught up
Paul Martin
@Spazholio
Jun 09 2016 03:24
@dpiessens I’m gonna head out for the night, but if you have any thoughts/suggestions/whatever, feel free to let me know. I can try whatever you think might help.
Matt Pressnall
@logichammer
Jun 09 2016 03:24
thanks for your input @kstdennis
I'm an intermediate basher...scott is a god
kstdennis
@kstdennis
Jun 09 2016 03:24
happy to! Sorry if the extra input was confusing at all
Matt Pressnall
@logichammer
Jun 09 2016 03:25
Nope...more ideas the better...I was confused that it was explicitly exiting but I am realizing that exit is being trapped and used by other commands (I think)
kstdennis
@kstdennis
Jun 09 2016 03:29
I'm just starting to build my rig, but seeing node, bash, and python is getting my excited to dive in
Matt Pressnall
@logichammer
Jun 09 2016 03:41

@scottleibrand, this is such an easy question that I feel goofy asking...but how can debug which aliases are getting called at each time?
Tried adding

get-settings = ! bash -c "echo -n \"getsetting: \"" && report invoke settings

before

get-settings = report invoke settings/model.json ....

But it just prints it out and then doesn't actually run the command. I just want to see which aliases have been kicked off. So simple, I know!

Can I add some command before the front of each alias to be able to see it without farking up all of them?
Looks like you have to wrap ALL commands in that ! bash -c and then escape them as needed...
will give that a go
Matt Pressnall
@logichammer
Jun 09 2016 03:46
@kstdennis , it is worth it!!!! We have such easy nights now with my daughter...almost no intervention...the AP is smarter than us, more consistent, and more attentive!
kstdennis
@kstdennis
Jun 09 2016 03:47
that's so awesome.
Paul Martin
@Spazholio
Jun 09 2016 03:47
@logichammer Here’s how I do my loop, if it helps: loop = ! bash -c "time ( echo STARTING PREFLIGHT; openaps preflight && echo STARTING GATHER; openaps gather; echo GATHER COMPLETE && echo STARTING GET-SETTINGS; etc, etc. That way, I know which section it’s performing. Helps to track down where things break.
Matt Pressnall
@logichammer
Jun 09 2016 03:47
Thanks a ton, Paul!
That's what I was looking for and much easier than what I was going to do...about to get that going
Paul Martin
@Spazholio
Jun 09 2016 03:48
No problem. Now I’m REALLY heading out for the night, but feel free to hit me up later on if you’d like. Some of the aliases have a bit more complex things in them - basically if/thens to determine what to do - but that should get you started.
Wrap your head around the && and || operators, and you’ll be most of the way there.
Matt Pressnall
@logichammer
Jun 09 2016 03:50
I'm going to figure out where I am getting caught up when I have no internet and then see where to go from there...Yeah, I could use a little bash help...I'm a php dude and admin linux but when I get complex, I write a PHP script that shells out so I can understand it. I'll get but help is always great so I really appreciate it, @Spazholio !
Paul Martin
@Spazholio
Jun 09 2016 03:54
Sounds like you're kinda me. Kinda wish NS were done in PHP so I could dig more into it. :)
Matt Pressnall
@logichammer
Jun 09 2016 03:55
Nice! Thanks, gents!
Reading up now
Perfect...thanks, @kstdennis, and now I know!
kstdennis
@kstdennis
Jun 09 2016 03:56
sure thing!
Scott Leibrand
@scottleibrand
Jun 09 2016 04:03
FWIW, DIYPS is mostly PHP with a few bash scripts. ;-)
ryanchen26
@ryanchen26
Jun 09 2016 04:23
I'm missing something. I never fixed this one. When I manually run the openaps loop it properly updates the blue basal line, and the dots for boluses. However when I run the loop with crontab these things don't update. Crontab has the URL and API_Secret. Thoughts?
ryanchen26
@ryanchen26
Jun 09 2016 04:38
I'll figure it out...
kstdennis
@kstdennis
Jun 09 2016 04:48
@ryanchen26 you're running the same command in and out of the crontab?
ryanchen26
@ryanchen26
Jun 09 2016 04:53
Manual: $ openaps retry-loop, Crontab: openaps retry-loop 2>&1
Matt Pressnall
@logichammer
Jun 09 2016 04:54

@scottleibrand, I can't replicate the "hey, internet is out and AP won't work"...cuz I killed my internet and hooked it up to a monitor and it worked perfectly...maybe her battery was dying while we were backpacking...but could have sworn it I swapped the battery out then, too. Anyway, it worked flawlessly!

@Spazholio, it was really easy to see everything running after modifying my loop and wait-loop alias! Thanks so much! I ended up daisy chaining everything with && given each thing is pretty much dependent on the next and my new understanding of semi-colons and && in bash thanks to @kstdennis.

@ryanchen26 put the full path to openaps in crontab?
actually, I have the command for you
hold one
          • cd /home/pi/openaps-dev && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' || openaps retry-loop ) 2>&1 | tee -a /var/log/openaps/loop.log
* * * * * cd /home/pi/openaps-dev && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' || openaps retry-loop ) 2>&1 | tee -a /var/log/openaps/loop.log
You have to drop the cron command in the openaps dir
with that first cd
And the grepping will only let one instance run
ryanchen26
@ryanchen26
Jun 09 2016 04:58
@logichammer okay, I'll give it a try.
Matt Pressnall
@logichammer
Jun 09 2016 04:58
make sure you have that openaps dir in var so it can write the log file there, too
Ben West
@bewest
Jun 09 2016 05:22
I would do | logger -t openaps-loop
that sends the log to /var/log/syslog automatically
@logichammer please see oref0 alias-helper and oref0 device-helper :-)
ryanchen26
@ryanchen26
Jun 09 2016 05:36
Maybe I have a false expectation. I was expecting the blue basal line in NS to reflect the dynamically changing basal rate, but it's just not happening. I get the line to reflect the basal changes over the last 4 hrs if triggered manually but not when driving the loop with crontab.
Ben West
@bewest
Jun 09 2016 05:42
@ryanchen26 that suggests perhaps the temps aren't being sent?
if I understand you correctly, when you temp basal manually, openaps will send that data to Nightscout
when you think you are temp basaling using openaps, no temp basals are sent to NS
is it sent to the pump?
@Spazholio good catch, sudo pip install -U dexcom_reader should resolve, looks like
ryanchen26
@ryanchen26
Jun 09 2016 05:52
@bewest My issue is specific to how the data does or doesn't drive the blue line showing the basal history in NS.
Ben West
@bewest
Jun 09 2016 05:54
from what you described, it sounds like openaps is reading the history and sending it to NS correctly
therefore, one of the reasonable alternative explanations is that openaps is actually not sending any temp basal changes to the pump
the temp basals always change the blue lines in NS, yes
ryanchen26
@ryanchen26
Jun 09 2016 05:55
but it is, because I can confirm the information read on the openaps pill matches the temp basal running on the pump (by looking at the pump).
Right, I'm just missing something.
The blue line shows the basal schedule entered in NS profile or shows the last 4 hrs if the loop is run manually.
for me
Ben West
@bewest
Jun 09 2016 05:58
ok, the blueline and the pill are two different pieces of data :-)
the pill data doesn't control the blue line at all
only the zoned pump history
this is part of some changes to docs being worked on that align with the new tools and documentation I've been working on here: https://github.com/openaps/docs/issues/132#issuecomment-215565256, openaps/docs#129
ryanchen26
@ryanchen26
Jun 09 2016 06:08
Thanks!
Jarred Yaw
@jyaw
Jun 09 2016 07:14
@bewest I got the following error when testing openxshareble on my new Edison rig (w/ yocto 3.0). Any ideas what this error might be indicating? I am giving up for the night but I'll get back to it tomorrow...
root@edison1:~/share-demo# openaps use share list_dexcom
Traceback (most recent call last):
  File "/usr/bin/openaps-use", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
  File "build/bdist.linux-i686/egg/pkg_resources/__init__.py", line 724, in run_script

  File "build/bdist.linux-i686/egg/pkg_resources/__init__.py", line 1650, in run_script

  File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
    app( )
  File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
    output = app(args, self)
  File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/root/openxshareble/openxshareble/__init__.py", line 79, in __call__
    self.setup_ble( )
  File "/home/root/openxshareble/openxshareble/app.py", line 25, in setup_ble
    self.ble = Adafruit_BluefruitLE.get_provider()
  File "/home/root/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/platform.py", line 38, in get_provider
    from .bluez_dbus.provider import BluezProvider
  File "/home/root/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 31, in <module>
    from gi.repository import GObject
ImportError: No module named gi.repository
Paul Davis
@SirBinky
Jun 09 2016 08:45
Hello everyone. I'm just starting out on closing the loop. We just got the G5 yesterday. I have an Iphone 5 and Raspberry, I've done the initial set up. I've added the pump as a device and managed to communicate with it. I'm having trouble getting the Iphone to communicate with the raspberry. Is it possible with a USB cable? I've been reading about G5 receiver but is that the official dexcom one rather than the Iphone?
ps I understand about the nightscout route but I need to build an offline model so ideally some way of the Iphone giving the data to the Raspberry. I have a model 3 with bluetooth I've seen something about using the bluetooth? Or do I need to invest in a Dexcom G5 Reciever unit and USB that to the raspberry?
Scott Leibrand
@scottleibrand
Jun 09 2016 13:10
@SirBinky you need to plug the G4 receiver into the Pi. Only way to get BG data from the iPhone to the Pi is via NS.
If you have a second G4 receiver you can use openxshareble to pair it with the Pi instead of an iPhone, but a single receiver can't be paired to two devices.
Paul Davis
@SirBinky
Jun 09 2016 13:13
@scottleibrand Damm I was afraid of that. We only just upgraded to CGM yesterday so no G4 equipment. So if I want to be offline I'll need to buy the dexcom g5 receiver and connect that to Pi
Paul Martin
@Spazholio
Jun 09 2016 13:14
@bewest @scottleibrand - Any thoughts on the whole openxshareble-not-working-with-my-receiver thing? I don't know if we proved it conclusively, but I think we determined that since I'm not getting the BT icon on the receiver, even though it thinks it's paired, it's really not. Or is halfway paired. Or something. Anything else anyone can think to try?
Scott Leibrand
@scottleibrand
Jun 09 2016 13:17
@SirBinky how did you get a G5 setup without a receiver? It's not FDA approved to be sold that way.
Sarah Hodson Grady
@shgrady
Jun 09 2016 13:18
@scottleibrand I was sent two G5 receivers in the mail with directions on upgrading my receiver firmware.
Paul Davis
@SirBinky
Jun 09 2016 13:18
@scottleibrand I'm in the UK they let us buy just a transmitter and sensors and i bought a second hand Iphone as we were an android family.
Scott Leibrand
@scottleibrand
Jun 09 2016 13:19
Ah k. At some point it should be possible to pair a BLE-enabled Pi with the G5 transmitter, but that work hasn't been done yet.
@shgrady yeah, if you already have a receiver that is reasonable
Sarah Hodson Grady
@shgrady
Jun 09 2016 13:20
yeah, thank goodness I have not put either of my G4 receivers through the wash yet.
Paul Davis
@SirBinky
Jun 09 2016 13:22
@scottleibrand So I guess i have to bite the bullet buy the dexcom receiver usb that to the PI then I can make it offline?
Scott Leibrand
@scottleibrand
Jun 09 2016 13:23
Yep, unless you have mad l33t Bluetooth hacking skillz. ;-)
Sarah Hodson Grady
@shgrady
Jun 09 2016 13:23
do we know if the non-Share can be upgraded to the G5 firmware? I ask because people sell used pretty cheap and your rig might as well be wired.
Scott Leibrand
@scottleibrand
Jun 09 2016 13:24
Non-Share doesn't have Bluetooth.
Paul Davis
@SirBinky
Jun 09 2016 13:24
@scottleibrand I've messed around with computers put linux on them a couple of times, nothing deeper than that. This is all way over my head at the moment. I'm just going with the attitude if other people have managed this given enough time and patience I should be able to do it too. Thanks very much for the help.
Scott Leibrand
@scottleibrand
Jun 09 2016 13:40
:+1:
C-Ville
@C-Ville
Jun 09 2016 13:42
@danamlewis @scottleibrand I only realized just now that you will have a Poster on the ADA.
:+1:
Jason Wittmer
@jbwittmer
Jun 09 2016 13:44
OK I'm stuck. I've managed to get all the devices set up as outlined in the docs. I have gotten as far as 2.3.11 (Enacting the suggested action). I have defined aliases. I can manually execute aliases to gather all of the required information, calculate IOB, make a suggested change, and send that change to the pump (openaps use pump set_temp_basal enact/suggested.json). The numbers make sense, and if I put them into my son's pump manually it works (He's still on a 523, I'm building the system based on a 722 which is filled with water, not connected to him). I haven't defined a "loop" alias yet. I don't understand how to create an enact/enacted.json. Any of this make sense?
Paul Martin
@Spazholio
Jun 09 2016 13:46
Here's how mine is created: openaps report add enact/enacted.json JSON pump set_temp_basal enact/suggested.json
Dana Lewis
@danamlewis
Jun 09 2016 13:47
@C-Ville yup we are sharing the data from the self-reported study we did a few months ago :)
The embargo lifts 10amCDT on Saturday so we'll be able to share it online (as a blog post etc) after that :)
C-Ville
@C-Ville
Jun 09 2016 13:49
that is so cool :-)
apabari
@apabari
Jun 09 2016 13:50
help! not sure what happened... but my Git appears to be corrupt. I can't fix it. This is the error I receive:
pi@raspberrypi:~/openaps $ oref0-fix-git-corruption
error: object file .git/objects/35/86cf7ec817ae73493879fa51f1570874fd2d8c is empty
error: object file .git/objects/35/86cf7ec817ae73493879fa51f1570874fd2d8c is empty
fatal: loose object 3586cf7ec817ae73493879fa51f1570874fd2d8c (stored in .git/objects/35/86cf7ec817ae73493879fa51f1570874fd2d8c) is corrupt
Error: Could not find last valid commit; aborting.
and, the error I see when trying to launch a report...
image.png
Dan Piessens
@dpiessens
Jun 09 2016 13:55
Hey @Spazholio when you were working on gaps and select with your glucose did you have to do anything funny with the report? I'm having an issue where I run it through the use statement and it returns data, I run it through the report and it returns an empty array
Sarah Hodson Grady
@shgrady
Jun 09 2016 13:56
right, I know non-share does not have bluetooth, but it does talk with the transmitter, so couldn't you "plug it in" to the APS rig? I have been saving my non-share for this
Jason Wittmer
@jbwittmer
Jun 09 2016 13:56
@Spazholio OK thanks. I thought I had tried that before but I did it again and it works this time.
Dan Piessens
@dpiessens
Jun 09 2016 13:58
@shgrady If the transmitter is a G5 it's only communicating via bluetooth to anything so the receiver needs a bluetooth module to communicate. The g4 transmitters had a radio to the g4 receiver. Make sense?
Sarah Hodson Grady
@shgrady
Jun 09 2016 13:59
yes it does thank you, does not help that guy, but I am still using G4
Dan Piessens
@dpiessens
Jun 09 2016 14:00
yeah I know. FYI for people on Android, there's an xDrip branch that does work with a G5 receiver. I've been using it for about a month now and actually don't use the receiver anymore
Jason Wittmer
@jbwittmer
Jun 09 2016 14:00
Now my next problem. I can upload my data to Nightspot as defined in the docs using status-upload alias, it seems to work. I can hover over the openaps pill and see the information, it displays IOB including both the basal as well as any boluses I've delivered. It shows the blue line tracing for basal profile, but the line doesn't change for any temp basals that have been executed. Am I missing something? Here's what I see when I execute the status-upload
pi@raspberrypi:~/openaps1 $ openaps status-upload
ns-status://JSON/shell/monitor/upload-status.json
reporting monitor/upload-status.json
[{"device":"openaps://raspberrypi","pump":{"battery":{"status":"normal","voltage":1.33},"status":{"status":"normal","timestamp":"2016-06-09T13:54:11.000Z","bolusing":false,"suspended":false},"reservoir":225.4,"clock":"2016-06-09T08:52:35"},"openaps":{"suggested":{"bg":141,"temp":"absolute","snoozeBG":152,"timestamp":"2016-06-09T13:54:37.000Z","reason":"102-152 in range: no temp required, temp 0.85 ~ req 0.85U/hr","eventualBG":102,"mealAssist":"Off: Carbs: undefined Boluses: undefined ISF: 105, Target: 113 Deviation: 3 BGI: -1","tick":"+0"},"iob":{"netbasalinsulin":0.05,"timestamp":"2016-06-09T13:54:13.000Z","activity":0.0019,"basaliob":0.018,"hightempinsulin":0.05,"bolussnooze":0.318,"iob":0.396},"enacted":{"bg":141,"temp":"absolute","missing":["duration","rate"],"timestamp":"2016-06-09T13:54:49.000Z","snoozeBG":152,"reason":"102-152 in range: no temp required, temp 0.85 ~ req 0.85U/hr","eventualBG":102,"error":"missing required input fields","input":{"bg":141,"temp":"absolute","snoozeBG":152,"reason":"102-152 in range: no temp required, temp 0.85 ~ req 0.85U/hr","eventualBG":102,"mealAssist":"Off: Carbs: undefined Boluses: undefined ISF: 105, Target: 113 Deviation: 3 BGI: -1","tick":"+0"},"mealAssist":"Off: Carbs: undefined Boluses: undefined ISF: 105, Target: 113 Deviation: 3 BGI: -1","tick":"+0"}},"created_at":"2016-06-09T13:55:02.252Z","_id":"57597536e8c95cb4233facf0"}]
Colin Lennon
@colinlennon
Jun 09 2016 14:01
Hey @apabari - not sure what the difference is, but I am using a different command - oref0-reset-git
Maybe try running that from the command line
Dan Piessens
@dpiessens
Jun 09 2016 14:01
@jbwittmer there's another command that uploads the basal profiles
it's the nightscout/recent-treatments.json and nightscout/uploaded.json
Jason Wittmer
@jbwittmer
Jun 09 2016 14:02
@dpiessens So I'm missing something from my status-upload alias? Do you have a suggestion for where I should look to try to refine this?
Dan Piessens
@dpiessens
Jun 09 2016 14:02
report should look like these:
[report "nightscout/recent-treatments.json"]
oper = format-recent-history-treatments
use = shell
reporter = JSON
json_default = True
device = ns
remainder = monitor/pump-history.json model.json

[report "nightscout/uploaded.json"]
oper = upload-non-empty-treatments
use = shell
reporter = JSON
json_default = True
device = ns
remainder = nightscout/recent-treatments.json
Jason Wittmer
@jbwittmer
Jun 09 2016 14:03
@dpiessens OK thanks
Dan Piessens
@dpiessens
Jun 09 2016 14:03
for the first report make sure to change the pump history location as needed, and make sure it's the rezoned one
apabari
@apabari
Jun 09 2016 14:04
Hi @colinlennon ... thanks. I tried that, but get something similar:
pi@raspberrypi:~/openaps $ oref0-reset-git
Attempting to fix git corruption. Please wait 15s.
error: object file .git/objects/35/86cf7ec817ae73493879fa51f1570874fd2d8c is empty
error: object file .git/objects/35/86cf7ec817ae73493879fa51f1570874fd2d8c is empty
fatal: loose object 3586cf7ec817ae73493879fa51f1570874fd2d8c (stored in .git/objects/35/86cf7ec817ae73493879fa51f1570874fd2d8c) is corrupt
Error: Could not find last valid commit; aborting.
I just tried removing git, and reinstalling, but no luck.
Dan Piessens
@dpiessens
Jun 09 2016 14:05
@apabari are you looping with a cron schedule yet? If so make sure to stop CRON before resetting manually usually: sudo service cron stop
Paul Martin
@Spazholio
Jun 09 2016 14:06
@dpiessens Give me a few, and I'll show you the gaps report that @bewest helped me set up.
Dan Piessens
@dpiessens
Jun 09 2016 14:07
ok thanks
apabari
@apabari
Jun 09 2016 14:10
@dpiessens Thanks! That was it. So relieved!
Colin Lennon
@colinlennon
Jun 09 2016 14:11
:smile:
Dan Piessens
@dpiessens
Jun 09 2016 14:13
:clap:
Scott Leibrand
@scottleibrand
Jun 09 2016 14:29
@shgrady yes, the Non-Share G4 receiver works great if you leave it plugged in to the Pi.
Jason Wittmer
@jbwittmer
Jun 09 2016 14:44
I'm trying to figure out how to create a pumphistory-zoned.json. I used the command:openaps report add monitor/pumphistory-zoned.json JSON tz clock monitor/pumphistory.json
added tz://JSON/clock/monitor/pumphistory-zoned.json
When I invoke this report however I get the error openaps report invoke monitor/pumphistory-zoned.json
tz://JSON/clock/monitor/pumphistory-zoned.json
monitor/pumphistory-zoned.json raised 'list' object has no attribute 'read'
Traceback (most recent call last):
File "/usr/local/bin/openaps-report", line 4, in <module>
import('pkg_resources').run_script('openaps==0.1.0', 'openaps-report')
File "build/bdist.linux-armv7l/egg/pkgresources/_init.py", line 719, in run_script
File "build/bdist.linux-armv7l/egg/pkgresources/_init.py", line 1504, in run_script
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.0-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.0-py2.7.egg/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.0-py2.7.egg/EGG-INFO/scripts/openaps-report", line 75, in run
output = app(args, self)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.0-py2.7.egg/openaps/cli/subcommand.py", line 52, in call
return self.method.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.0-py2.7.egg/openaps/reports/invoke.py", line 40, in main
output = task.method(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.0-py2.7.egg/openaps/uses/use.py", line 45, in call
output = self.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openapscontrib-0.0.9-py2.7.egg/openapscontrib/timezones/_init.py", line 86, in main
results = self.convert(inputs)
File "/usr/local/lib/python2.7/dist-packages/openapscontrib-0.0.9-py2.7.egg/openapscontrib/timezones/_init.py", line 98, in convert
program = self.rezone(parse(program)).isoformat( )
File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 1164, in parse
return DEFAULTPARSER.parse(timestr, kwargs)
File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 552, in parse
res, skipped_tokens = self._parse(timestr,
kwargs)
File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 671, in _parse
l = _timelex.split(timestr) # Splits the timestr into tokens
File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 188, in split
return list(cls(s))
File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 184, in next
return self.next() # Python 2.x support
File "/usr/local/lib/python2.7/dist-packages/pythondateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 177, in _next
token = self.get_token()
File "/usr/local/lib/python2.7/dist-packages/python_dateutil-2.5.3-py2.7.egg/dateutil/parser.py", line 93, in get_token
nextchar = self.instream.read(1)
AttributeError: 'list' object has no attribute 'read'
sorry that's a mess
Paul Martin
@Spazholio
Jun 09 2016 14:46
@dpiessens Here's what @bewest helped me set up in order to get a gaps report: openaps use tz lsgaps raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json --minutes "10" --date "dateString" --before "1 day ago" --after "now"
@jbwittmer Does your pumphistory.json report run properly? Here's how I generate my pumphistory-zoned.json command, if it helps: openaps use tz rezone --timezone "EDT" --date timestamp --date dateString --date start_at --date end_at --date created_at --astimezone monitor/pumphistory.json
Jason Wittmer
@jbwittmer
Jun 09 2016 14:55
Yes my pumphistory.json report does run properly. Clearly I don't understand the use of the tz command. I jury-rigged around this by using my pumphistory.json instead of pumphistory-zoned.json when using the format-latest-nightscout-treatments alias, and was able to get that all then to subsequently upload to Nightscout site using the upload-recent-treatments alias, but the timing is off by about 5 hours. So I understand that there is a need to implement the timezone feature I'm just not sure where I've gone wrong. Perhaps I need to just delete all of my nightscout upload aliases I've already created, read more about the tz command and start that process over. I'm very frustrated because I can tell (at least I think) that I'm so close to getting it all to work but it seems so far away too.
Paul Martin
@Spazholio
Jun 09 2016 15:10
I've not quite gotten my head around the tz command yet either. I get it, but I don't grok it. But I'm pretty sure what I have here works. Does it work for you when you run it against your pumphistory.json file?
Dan Piessens
@dpiessens
Jun 09 2016 15:12
@Spazholio could you show me the report format from the ini file? I feel like something isn't right when I map it in there
well add it as a report
Paul Martin
@Spazholio
Jun 09 2016 15:13
And yeah, that's the worst. At least when NOTHING works, you know you've missed something failrly obvious. It's those little bits that let you know you're so close, yet so far. =)
@dpiessens
[report "monitor/gaps.json"]
use = lsgaps
reporter = JSON
date = dateString
device = tz
input = raw-ns/ns-glucose-zoned.json raw-cgm/glucose-zoned.json
minutes = 10
no_timezone = False
after = now 
timezone =.
before = 1 day ago
Dan Piessens
@dpiessens
Jun 09 2016 15:21
@Spazholio what's the rate your values are coming in as? Just trying to figure out if minutes should be 5 or 10?
Paul Martin
@Spazholio
Jun 09 2016 15:23
I run my loop every 5 mins, if that's what you're asking.
Dan Piessens
@dpiessens
Jun 09 2016 15:24
actually I meant CGM values, I vagely remember you and Ben discussing why minutes should be 10 instead of 5
Paul Martin
@Spazholio
Jun 09 2016 15:30
In that case, you remember more than I do. =/ But my CGM values are 5 mins apart.
(does Medtronic do something different?)
Dan Piessens
@dpiessens
Jun 09 2016 15:30
no I'm just trying to see if I can post-fill the nightscout gaps
I'm using xDrip to upload from my G5 right now
is it timezone=[blank] or timezone=. (as in end of a sentence)
Jason Wittmer
@jbwittmer
Jun 09 2016 15:32
@Spazholio Do you mean does the tz command work when I run it against pumphistory.json?
Paul Martin
@Spazholio
Jun 09 2016 15:33
@dpiessens It's blank, sorry. That period is just an oddity with my .vimrc and trailing spaces.
@jbwittmer Correct.
Jason Wittmer
@jbwittmer
Jun 09 2016 15:33
@Spazholio I must confess I haven't figured out how to do that yet.
Paul Martin
@Spazholio
Jun 09 2016 15:34
No worries. Do you currently have a monitor/pumphistory.json file?
Jason Wittmer
@jbwittmer
Jun 09 2016 15:35
yes. That gets created with my "gather" alias
Paul Martin
@Spazholio
Jun 09 2016 15:35
Ok, so in your openaps dir, just run this, and tell me if it spits out re-zoned info: openaps use tz rezone --timezone "EDT" --date timestamp --date dateString --date start_at --date end_at --date created_at --astimezone monitor/pumphistory.json
Jason Wittmer
@jbwittmer
Jun 09 2016 15:36
This is what i got back
pi@raspberrypi:~/openaps1 $ openaps use tz rezone --timezone "EDT" --date timestamp --date dateString --date start_at --date end_at --date created_at --astimezone monitor/pumphistory.json
Traceback (most recent call last):
File "/usr/local/bin/openaps-use", line 4, in <module>
import('pkg_resources').run_script('openaps==0.1.0', 'openaps-use')
File "build/bdist.linux-armv7l/egg/pkgresources/_init.py", line 719, in run_script
File "build/bdist.linux-armv7l/egg/pkgresources/_init.py", line 1504, in run_script
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.0-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.0-py2.7.egg/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.0-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
output = app(args, self)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.0-py2.7.egg/openaps/uses/init.py", line 92, in call
return self.method.selected(args)(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.0-py2.7.egg/openaps/uses/init.py", line 31, in call
return self.method(args, app)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.0-py2.7.egg/openaps/uses/use.py", line 45, in call
output = self.main(args, app)
File "/usr/local/lib/python2.7/dist-packages/openapscontrib-0.0.9-py2.7.egg/openapscontrib/timezones/_init.py", line 86, in main
results = self.convert(inputs)
File "/usr/local/lib/python2.7/dist-packages/openapscontrib-0.0.9-py2.7.egg/openapscontrib/timezones/_init.py", line 81, in convert
record[field] = self.rezone(parse(value)).isoformat( )
File "/usr/local/lib/python2.7/dist-packages/openapscontrib-0.0.9-py2.7.egg/openapscontrib/timezones/_init.py", line 70, in rezone
dt = dt.astimezone(self.timezone)
TypeError: astimezone() argument 1 must be datetime.tzinfo, not None
Paul Martin
@Spazholio
Jun 09 2016 15:37
That's peculiar. It works well for me. Running the most recent version of openaps?
openaps --version
Jason Wittmer
@jbwittmer
Jun 09 2016 15:40
/openaps1 $ openaps --version
openaps 0.1.0
pi@raspberrypi:~/openaps1 $
Paul Martin
@Spazholio
Jun 09 2016 15:41
I'd love to get verification from @bewest or @scottleibrand but I'm pretty sure that's a fairly old version. I wouldn't be surprised if updating openaps fixed that issue.
Jason Wittmer
@jbwittmer
Jun 09 2016 15:43
OK I guess that brings up an additional question. How does one go about updating to the new version? I'm sure it involves pulling something down from github. Is it as simple as following the directions in the docs and just "setting up" again?
i just started this process about 20 days ago, so I don't know how many versions there would be in that time frame
Paul Martin
@Spazholio
Jun 09 2016 15:44
Well, I know that they've got a really simplified way of doing it now: sudo pip install -U openaps but I'm not sure if it matters how you installed it initially, or if that also pulls in other needed things like openaps-contrib. I would wait for someone else slightly more knowledgeable to chime in.
David Cintron
@loudestnoise
Jun 09 2016 15:45
I think sudo easy_install -ZU openaps might be the way to do it
Paul Martin
@Spazholio
Jun 09 2016 15:45
What does the Z flag do? I keep forgetting.
Jason Wittmer
@jbwittmer
Jun 09 2016 15:45
OK. My wife is starting to get really irked with me typing away on the computer when I could be doing yard work (even though she understands this is what it is going to take in order for me to implement an AP for our son). So I guess I'll take a break and wait for someone else to chime in. Thanks.
ok i did find a section in the docs where it says sudo easy_install -ZU opens will update if a newer version is available, so I'll try that
OK now I'm running version 0.1.5
var code = "openaps use tz rezone --timezone "EDT" --date timestamp --date dateString --date start_at --date end_at --date created_at --astimezone monitor/pumphistory.json" still didn't work
Paul Martin
@Spazholio
Jun 09 2016 15:49
What's that var code bit?
Jason Wittmer
@jbwittmer
Jun 09 2016 15:50
sorry, was trying to get it to format so it's in the nice little grey box like you do, but not understanding how
that's from the markdown help button off to the side, but clearly I don't know what that does either
Paul Martin
@Spazholio
Jun 09 2016 15:50
Oh, just surround it with backticks. ` <-- those
Dan Piessens
@dpiessens
Jun 09 2016 15:50
use 3 `
Jason Wittmer
@jbwittmer
Jun 09 2016 15:50
'openaps use tz rezone --timezone "EDT" --date timestamp --date dateString --date start_at --date end_at --date created_at --astimezone monitor/pumphistory.json'
openaps use tz rezone --timezone "EDT" --date timestamp --date dateString --date start_at --date end_at --date created_at --astimezone monitor/pumphistory.json
ok there. cool. thanks.
but either way, still didn't work
Paul Martin
@Spazholio
Jun 09 2016 15:51
Here is text surrounded by a backtick on either side
Here is where code would be
If I had code to paste
But this formatting is good for multi-line stuff
Can you paste a bit of your pumphistory.json?
I don't know what I'm looking for, but it sounds like SOMETHING is off SOMEWHERE.
Jason Wittmer
@jbwittmer
Jun 09 2016 15:53
pi@raspberrypi:~/openaps1/monitor $ cat pumphistory.json
[
{
"_type": "TempBasalDuration",
"duration (min)": 30,
"_description": "TempBasalDuration 2016-06-09T09:59:52 head[2], body[0] op[0x16]",
"timestamp": "2016-06-09T09:59:52",
"_body": "",
"_head": "1601",
"_date": "74bb094910"
},
{
"_type": "TempBasal",
"temp": "absolute",
"_description": "TempBasal 2016-06-09T09:59:52 head[2], body[1] op[0x33]",
"timestamp": "2016-06-09T09:59:52",
"_body": "00",
"_head": "3332",
"rate": 1.25,
"_date": "74bb094910"
},
{
"_type": "TempBasalDuration",
"duration (min)": 30,
"_description": "TempBasalDuration 2016-06-09T09:18:42 head[2], body[0] op[0x16]",
"timestamp": "2016-06-09T09:18:42",
"_body": "",
"_head": "1601",
"_date": "6a92094910"
},
{
"_type": "TempBasal",
"temp": "absolute",
"_description": "TempBasal 2016-06-09T09:18:42 head[2], body[1] op[0x33]",
"timestamp": "2016-06-09T09:18:42",
"_body": "00",
"_head": "3332",
"rate": 1.25,
"_date": "6a92094910"
},
{
"_type": "TempBasalDuration",
"duration (min)": 30,
"_description": "TempBasalDuration 2016-06-09T08:50:22 head[2], body[0] op[0x16]",
"timestamp": "2016-06-09T08:50:22",
"_body": "",
"_head": "1601",
"_date": "56b2084910"
},
{
"_type": "TempBasal",
"temp": "absolute",
"_description": "TempBasal 2016-06-09T08:50:22 head[2], body[1] op[0x33]",
"timestamp": "2016-06-09T08:50:22",
"_body": "00",
"_head": "3322",
"rate": 0.85,
"_date": "56b2084910"
},
{
"programmed": 0.4,
"_type": "Bolus",
"type": "normal",
"_description": "Bolus 2016-06-09T08:27:31 head[4], body[0] op[0x01]",
"duration": 0,
"timestamp": "2016-06-09T08:27:31",
"_body": "",
"_head": "01040400",
"amount": 0.4,
"_date": "5f9b480910"
},
{
"_type": "BolusWizard",
"bg": 120,
"bg_target_high": 135,
"correction_estimate": 0.0,
"unknown_byte[10]": 0,
"_description": "BolusWizard 2016-06-09T08:27:31 head[2], body[13] op[0x5b]",
"timestamp": "2016-06-09T08:27:31",
"_body": "05500b69500004000000000487",
"carb_input": 5,
"_head": "5b78",
"unabsorbed_insulin_total": 0.0,
"_byte[5]": 0,
"unabsorbed_insulin_count": "??",
"_byte[7]": 0,
"_date": "5f9b080910",
"bolus_estimate": 0.4,
"unknown_byte[8]": 0,
"carb_ratio": 11,
"food_estimate": 0.4,
"bg_target_low": 80,
"sensitivity": 105
},
{
"_type": "CalBGForPH",
"_description": "CalBGForPH 2016-06-09T08:27:25 head[2], body[0] op[0x0a]",
"timestamp": "2016-06-09T08:27:25",
"_body": "",
"_head": "0a78",
"amount": 120,
"_date": "599b280910"
},
{
"_type": "TempBasalDuration",
"duration (min)": 30,
"_description": "TempBasalDuration 2016-06-09T08:22:56 head[2], body[0] op[0x16]",
"timestamp": "2016-06-09T08:22:56",
"_body": "",
"_head": "1601",
"_date": "7896084910"
},
{
"_type": "TempBasal",
"temp": "absolute",
"_description": "TempBasal 2016-06-09T08:22:56 head[2], body[1] op[0x33]",
"timestamp": "2016-06-09T08:22:56",
"_body": "00",
"_head": "3322",
"rate": 0.85,
"_date": "7896084910"
},
{
"_type": "TempBasalDuration",
"duration (min)": 30,
"_description": "TempBasalDuration 2016-06-09T07:18:15 head[2], body[0] op[0x16]",
"timestamp": "2016-06-09T07:18:15",
"_body": "",
"_head": "1601",
"_date": "4f92074910"
},
{
"_type": "TempBasal",
"temp": "absolute",
"_description": "TempBasal 2016-06-09T07:18:15 head[2], body[1] op[0x33]",
"timestamp": "2016-06-09T07:18:15",
"_body": "00",
"_head": "3324",
"rate": 0.9,
"_date": "4f92074910"
}
Paul Martin
@Spazholio
Jun 09 2016 15:53
That's pretty much identical to mine.
Jason Wittmer
@jbwittmer
Jun 09 2016 15:53
@Spazholio Mr Martin I really appreciate the help. I'm going sign off for a bit but will leave the window open so if you have a suggestion I'll check back later. Thanks so much for the help. Wish I could keep working on it now but I'm at risk of bodily injury from my wife! :)
Paul Martin
@Spazholio
Jun 09 2016 15:54
Best of luck with that! Hopefully someone who's seen this issue before will chime in. =)
Dan Piessens
@dpiessens
Jun 09 2016 15:55
@Spazholio did you have to do anything wierd with the ns rezone to get gaps to work?
Paul Martin
@Spazholio
Jun 09 2016 15:57
Well, the two files it's working off of are zoned, but other than that - no? Mind you, my gaps.json has nothing in it. Which either means things are horrifically broken, or I simply have no gaps (which is possible - my Dexcom is connected 24/7 and I'm always online).
David Cintron
@loudestnoise
Jun 09 2016 16:01
@Spazholio for your Nightscout are you using Azure or Heroku to host it?
Dan Piessens
@dpiessens
Jun 09 2016 16:03
yeah I have a bunch of gaps
Paul Martin
@Spazholio
Jun 09 2016 16:04
Neither, I self-host.
David Cintron
@loudestnoise
Jun 09 2016 16:11
That’s what I wanted to hear, I figured you did
what kind of setup you using? I’m having all sorts of trouble with my Ubuntu VPS, and I’m trying to figure out if it’s just needing more memory
Paul Martin
@Spazholio
Jun 09 2016 16:16
I have 1GB RAM, Ubuntu setup.
David Cintron
@loudestnoise
Jun 09 2016 16:16
Maybe that’s my problem, I’m rocking only 256MB
Paul Martin
@Spazholio
Jun 09 2016 16:17
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                24
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 62
Stepping:              4
CPU MHz:               2599.982
BogoMIPS:              5199.96
Virtualization:        VT-x
David Cintron
@loudestnoise
Jun 09 2016 16:17
although I’m looking at these stats and it spikes, but doesn’t go past 171 out of 256MB :cry:
server_stats.jpg
David Cintron
@loudestnoise
Jun 09 2016 16:27
I guess I just need to restart the Nightscout server every once and a while
after doing that it seems to come back and works like a champ
Matt Pressnall
@logichammer
Jun 09 2016 16:28
Thanks, @bewest! I will check that out!
Lynne Butts
@flutelynne_twitter
Jun 09 2016 16:29
@loudestnoise Yep. There are times that I have to restart the dynos in my heroku, also. Not so much the last two days, though.
Finally got overnight to work. Only time is stopped was when the receiver said "enter bg value". I will have to remember to do that one before the night is over, then, too.
David Cintron
@loudestnoise
Jun 09 2016 16:33
Nice, I’ve been overnighting since Saturday and loving the results. I’m having a dawn phenomenon type of thing go on after I wake up though. My BG just starts to creep up, and normally the only food/beverage I’m consuming is black coffee.
But, since I’m looping, it’s been able to knock it back down :smiley:
Sarah Hodson Grady
@shgrady
Jun 09 2016 16:33
@loudestnoise oh, that is cool
I do the same breakfast of coffee
David Cintron
@loudestnoise
Jun 09 2016 16:34
it’s the best of breakfasts :coffee:
Sarah Hodson Grady
@shgrady
Jun 09 2016 16:34
currently have my second basal profile for it, which of course works 40% of the time
the dawn phenom, not the coffee, I drink that all day
two people on fb suggested they would trade me compatible pumps for other supplies....grateful but antsy.
David Cintron
@loudestnoise
Jun 09 2016 16:37
Best of luck. I get really scared whenever I drop my 722. I’m not used to having something on my waist and this cable business. 3 years of OmniPod will do that to ya
Lynne Butts
@flutelynne_twitter
Jun 09 2016 16:37
@loudestnoise I have been doing it since Tuesday evening. Had some issues of losing connectivity at night, but last night was ok. Love the daytime looping! I can do tons of things without having to stop and take care of a low BG. It's great!
I often drop at night, so was grateful that it came through.
Alexandre Cossette
@alexk7
Jun 09 2016 16:42
Hi! I'm new and I might start building an openaps soon. I have an old 722 that got discarded because sometimes the ESC button does not work. Do you think I'll be able to send all the button presses I need throught the carelink?
David Cintron
@loudestnoise
Jun 09 2016 16:45
You may be able to fix the button
https://youtu.be/nWRVSHXN5cQ?t=107 is where she starts talking about how to fix it
@alexk7 I guess it could be possible to do it without the button working, but it might be a pain
Alexandre Cossette
@alexk7
Jun 09 2016 16:52
OK, thanks, at least I have a backup plan. The button is working right now but I have to press a little hard. I know by experience that I will eventually get the "button error" message when the button get stuck in the pressed position.
I'm a programmer so I guess it would not be too hard to program a simple remote that replicates all the buttons. Or does it exists already?
Paul Martin
@Spazholio
Jun 09 2016 16:57
Incidentally, I find the caffeine in coffee to spike me like crazy. Soda doesn't do it, but coffee spikes me pretty hard.
Garrett Webb
@garetis
Jun 09 2016 16:58
Just thinking out loud, but I'm curious: would it be possible to have the OpenAPS code read whether the basal is the Standard Pattern or Pattern A/B, and then have different targets set for the different patterns? Like the Standard Pattern will give you a target of 120-130, but if you move it into Pattern A then you can have a target of 160-170 for an exercise session that you want to participate in?
Ben West
@bewest
Jun 09 2016 16:58
pip and easy_install are standalone tools
they will both install openaps from scratch using the prepared packaged
pip is by far preferred, all docs should change to prefer it
sudo pip install -U openaps always update or installs openaps
Scott Leibrand
@scottleibrand
Jun 09 2016 17:07
@garetis good idea. Would require some scripting to make that happen, but we can read which pattern is active, so it could be done.
Thacher
@thacherT1D
Jun 09 2016 17:09
@Spazholio are you putting any sort of dairy in there? I know this seems like a no brainer, but I switched up from an americano to a soy latte for a bit and couldn't figure out why I was spiking... soy milk... it never occurred to me, hahaha :)
Paul Martin
@Spazholio
Jun 09 2016 17:10
@thacherT1D No, it happens with any hot caffeine (coffee, tea, etc). Yes, apparently the temperature matters. I have not tested this with hot Mountain Dew, nor do I intend to. =) But when I use heavy cream (no carbs in the amount I use) and Splenda, which has never affected my sugars.
Garrett Webb
@garetis
Jun 09 2016 17:11
I didn't know about the hot part, but black coffee makes me spike outrageously. Weirdly enough, in a similar way so do protein shakes that have very minimal carbs
Thacher
@thacherT1D
Jun 09 2016 17:12
interesting... I cannot agree more on the Mountain Dew, hahah
Paul Martin
@Spazholio
Jun 09 2016 17:12
@garetis Protein can get converted to glucose, so that's not entirely unexpected. =)
Sarah Hodson Grady
@shgrady
Jun 09 2016 17:12
@garetis I read recently that something like 9% of protein is turned into glucose by the body
Thacher
@thacherT1D
Jun 09 2016 17:13
great (she says just finishing a protein shake)
Garrett Webb
@garetis
Jun 09 2016 17:13
Yeah, but it happens very rapidly, and not in the same fashion as when I eat red meat... perhaps it is because it is highly refined protein...
Paul Martin
@Spazholio
Jun 09 2016 17:13
With me, it's closer to 50-70%. I've never tried to correlate if that's changed when/if I eat carbs as well.
Thacher
@thacherT1D
Jun 09 2016 17:14
yeah, I've used these shakes on and off for years at this point, when I get burned out on actually thinking about food... it's better than nothing in the morning, which is my other default
Paul Martin
@Spazholio
Jun 09 2016 17:14
I've recently gotten into trying Keto Chow. It's not bad.
It's meant to be a keto-friendly Soylent.
Thacher
@thacherT1D
Jun 09 2016 17:15
yay diabetes! #not
Thacher
@thacherT1D
Jun 09 2016 17:16
interesting, thanks
Paul Martin
@Spazholio
Jun 09 2016 17:16
Oh, that's crap. Sausage, eggs and bacon are absolutely magical.
...curse it all, now I'm hungry.
David Cintron
@loudestnoise
Jun 09 2016 17:17
Yeah, it’s about that time
Garrett Webb
@garetis
Jun 09 2016 17:17
I miss french toast... it used to be my favorite...
loudestnoise @loudestnoise starts to calculate all TEH CARBS in lunch
Jarred Yaw
@jyaw
Jun 09 2016 17:28
@bewest any thoughts regarding my issue with running openxshareable? I'm thinking there must've been a missed install step or something, but I went over the yocto mmeowlink doc a couple times, don't think I missed anything...
Dana Lewis
@danamlewis
Jun 09 2016 17:50
@flutelynne_twitter are you using Medtronic CGM or Dexcom?
David Cintron
@loudestnoise
Jun 09 2016 17:53
Pretty sure she’s using dexcom, specifically G5
Dana Lewis
@danamlewis
Jun 09 2016 17:53
ok. making sure it’s not running into the mysterious medtronic cgm problem
Paul Martin
@Spazholio
Jun 09 2016 18:05
@jyaw Dare I ask what problem you're having with openxshareble? I wonder if we're having the same issue...
apabari
@apabari
Jun 09 2016 18:20
Hi, feel silly asking another question, but... I just noticed that the pill box on my NightScout site isn't updating. It is 'stuck' saying that it was last updated 1 minute ago. Has anyone seen this?
Paul Martin
@Spazholio
Jun 09 2016 18:23
Interesting. Personally, I haven't seen that one before. If my data isn't getting uploaded, then the time will just get longer in between page refreshes.
Jarred Yaw
@jyaw
Jun 09 2016 18:26

@bewest I got the following error when testing openxshareble on my new Edison rig (w/ yocto 3.0). Any ideas what this error might be indicating? I am giving up for the night but I'll get back to it tomorrow...
```
root@edison1:~/share-demo# openaps use share list_dexcom
Traceback (most recent call last):
File "/usr/bin/openaps-use", line 4, in <module>
import('pkg_resources').run_script('openaps==0.1.5', 'openaps-use')
File "build/bdist.linux-i686/egg/pkgresources/_init.py", line 724, in run_script

File "build/bdist.linux-i686/egg/pkgresources/_init.py", line 1650, in run_script

File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 63, in <module>
app( )
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/cli/init.py", line 51, in call
self.run(self.args)
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
output = app(args, self)
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/uses/init.py", line 92, in call
return self.method.selected(args)(args, app)
File "/usr/lib/python2.7/site-packages/openaps-0.1.5-py2.7.egg/openaps/uses/init.py", line 31, in call
return self.method(args, app)
File "/home/root/openxshareble/openxshareble/init.py", line 79, in call
self.setup_ble( )
File "/home/root/openxshareble/openxshareble/app.py", line 25, in setup_ble
self.ble = Adafruit_BluefruitLE.get_provider()
File "/home/root/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/platform.py", line 38, in get_provider
from .bluez_dbus.provider import BluezProvider
File "/home/root/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 31, in <module>
from gi.repository import GObject
ImportError: No module named gi.repository
```

@Spazholio that was all a result of running openaps use share list_dexcom per the openxshareble README
I did forget to un-pair my receiver from my phone, but I would think it would still show up on running the list_dexcom command
and if it didn't find anything I figure it would exit gracefully
Paul Martin
@Spazholio
Jun 09 2016 18:30
@scottleibrand What was the link to your openxshareble instructions? I remember seeing some stuff in there that aren't in the "official" ones...
Scott Leibrand
@scottleibrand
Jun 09 2016 18:31
You have to un-pair and put it into discoverable mode
I think it's in aps-scripts
Paul Martin
@Spazholio
Jun 09 2016 18:32
Found it, thanks.
@jyaw That error seems to be a PyGObject error, which just seems weird to me. Have you tried installing that?
@scottleibrand Just for a data point, could I trouble you for the SW version that you're running on the Dexcom?
SW10586 is mine. Just wondering if some of the issues I'm experiencing are due to software mismatch.
Jarred Yaw
@jyaw
Jun 09 2016 18:37
is it a missing python module perhaps? not sure what gi.repository would be... googling...
Dana Lewis
@danamlewis
Jun 09 2016 18:38
@Spazholio sadly, @scottleibrand does not have a Dexcom due to his working pancreas status ;). both of mine are similar SW to yours, though, so don’t think that’s it
Paul Martin
@Spazholio
Jun 09 2016 18:41
@jyaw Try sudo pip list | grep pygobject
@danamlewis Sorry, I knew he was a "normie". =) Should have phrased it differently. Thanks for checking the S/W though. Hrmm.
I'm running systemd and I wonder if that has anything to do with it. I mean, BT is still running properly (with the --experimental flag) so I doubt that's it, but...
Dana Lewis
@danamlewis
Jun 09 2016 18:44
@Spazholio hehe.
Jarred Yaw
@jyaw
Jun 09 2016 18:48
sheesh, python ignorance here... Perhaps it was left out of the docs python setup or the setup.py of openxshareble. Will look into it when I get home tonight. Thanks!
Lynne Butts
@flutelynne_twitter
Jun 09 2016 18:57
@danamlewis I am using a Dexcom G5. Receiver usb'd to the pi. And I forgot that I actually started on Monday evening. Today was my first site change. Duh
I also use the iphone for the G5.
apabari
@apabari
Jun 09 2016 19:25
Has anyone got an easy way of shutting down the Pi safely? Maybe from the Pebble? I'm just wondering if there is a quick and easy way to do this without SSHing into it. (I'm realizing now I need a better battery, but in the meantime I want to avoid the constant git corruptions that come with hard power shutdowns.)
Dana Lewis
@danamlewis
Jun 09 2016 19:39
@apabari you should include the git corruption fix regardless
David Cintron
@loudestnoise
Jun 09 2016 19:50
@apabari Not sure there really is an option to shut it down without SSH access
unless you want to do what this guy did
apabari
@apabari
Jun 09 2016 19:55
Hey... cool beans. I just added a web server to the pi, and created a link to a script that shuts down the Pi. So I can shutdown the pi that way and change out batteries as needed.
Didie
@elodaille01_twitter
Jun 09 2016 19:57
Hello
Nightscout Setup
Add “openaps” (without the quotes) and, optionally, “pump” (without the quotes) to the list of plugins enabled,
Where do these changes
David Cintron
@loudestnoise
Jun 09 2016 20:01
Now that I’m using both the G4 with Share receiver (G5 upgraded) and my iPhone, I’m finding my stupid iPhone misses a lot of readings compared to the receiver. I also just got a Signal Loss, so I chugged a bottle of water as that seems to be the general consensus on making it come back
:angry: and now it says Signal Loss again!
David Cintron
@loudestnoise
Jun 09 2016 20:18
@apabari :+1:
@elodaille01_twitter That would be in your Nightscout setup, are you using Heroku or Azure?
Didie
@elodaille01_twitter
Jun 09 2016 20:27
hi
heroku with dexcom
On the Dexcom receiver ?
David Cintron
@loudestnoise
Jun 09 2016 20:56
@elodaille01_twitter Sorry for the delayed response, there are some issues with Gitter. So you should have in your Heroku settings a place where you put your Nightscout variables
it should be something like ENABLE and then a box where there are the enabled things e.g. openaps careportal pump
or it looks like it’s under this For Heroku users, exactly the same changes should be made on the Config Vars page.
Matthias
@ceben80
Jun 09 2016 21:09
P
Alexandre Cossette
@alexk7
Jun 09 2016 21:35
@loudestnoise
@loudestnoise I fixed my button. Thank you for that youtube link!!!
Dana Lewis
@danamlewis
Jun 09 2016 21:38
:+1:
David Cintron
@loudestnoise
Jun 09 2016 21:39
@alexk7 that’s awesome! I’m glad to hear it
Seems like Gitter is back to normal. AWS was having issues