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

10th
Mar 2016
Scott Leibrand
@scottleibrand
Mar 10 2016 00:02
I think we need to rework deltas to be time-based instead of based on the number of readings
Jason Calabrese
@jasoncalabrese
Mar 10 2016 00:15
that part is right in NS, but if you have multiple BG feeds, you don't want to cross compare them
won't be an issue on the rigs, but would produce strange results in NS
Scott Leibrand
@scottleibrand
Mar 10 2016 00:53
I am thinking you should average all results for a given minute or something
Jason Calabrese
@jasoncalabrese
Mar 10 2016 01:13
or track the device and only compare between the same device
Scott Leibrand
@scottleibrand
Mar 10 2016 01:16
yeah
John Males
@johnmales
Mar 10 2016 05:14
G
Oops iphone
Jim Matheson
@jmatheson
Mar 10 2016 05:22
:moneybag:
the fun of getting an urgent low from a prebolus 30 minutes after eating a bunch of carbs. #waitingitout
Ben West
@bewest
Mar 10 2016 06:52
fwiw, ns-upload just helps upload stuff to NS
it can upload any content to any NS endpoint
Ben West
@bewest
Mar 10 2016 07:02
by default, I recommend saving it as a device with endpoint and api-secret
that way openaps use ns-upload shell ... can upload any file to any endpoint
openaps just curries arguments, mainly
live4sw
@live4sw
Mar 10 2016 11:06
Hi all, during the night the loop stopped working around 1am and has been throwing off this error every 5 minutes for the last several hours, anyone familiar with it?
Mar 10 06:00:01 raspberrypi CRON[22324]: (pi) CMD ((cd /home/pi/myopenaps1 && openaps retry-loop 2>&1 | logger -t openaps))
Mar 10 06:00:04 raspberrypi openaps: Traceback (most recent call last):
Mar 10 06:00:04 raspberrypi openaps:   File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
Mar 10 06:00:04 raspberrypi openaps:     "__main__", fname, loader, pkg_name)
Mar 10 06:00:04 raspberrypi openaps:   File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
Mar 10 06:00:04 raspberrypi openaps:     exec code in run_globals
Mar 10 06:00:04 raspberrypi openaps:   File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.22-py2.7.egg/decocare/stick.py", line 912, in <module>
Mar 10 06:00:04 raspberrypi openaps:     stick.open( )
Mar 10 06:00:04 raspberrypi openaps:   File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.22-py2.7.egg/decocare/stick.py", line 874, in open
Mar 10 06:00:04 raspberrypi openaps:     log.info('%s' % self.product_info( ))
Mar 10 06:00:04 raspberrypi openaps:   File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.22-py2.7.egg/decocare/stick.py", line 515, in product_info
Mar 10 06:00:04 raspberrypi openaps:     return self.query(ProductInfo)
Mar 10 06:00:04 raspberrypi openaps:   File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.22-py2.7.egg/decocare/stick.py", line 509, in query
Mar 10 06:00:04 raspberrypi openaps:     return self.process( )
Mar 10 06:00:04 raspberrypi openaps:   File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.22-py2.7.egg/decocare/stick.py", line 496, in process
Mar 10 06:00:04 raspberrypi openaps:     ack, response = self.command.respond(raw)
Mar 10 06:00:04 raspberrypi openaps:   File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.22-py2.7.egg/decocare/stick.py", line 71, in respond
Mar 10 06:00:04 raspberrypi openaps:     raise AckError("ACK is 0 bytes:\n%s" % lib.hexdump(raw))
Mar 10 06:00:04 raspberrypi openaps: decocare.errors.AckError: ACK is 0 bytes:
Mar 10 06:00:04 raspberrypi openaps:

oref0-reset-usb fixed it, so I wonder if it is passing mm-stick-warmup but still needs to be reset, here is my preflight:

preflight = ! bash -c "rm -f monitor/clock.json && openaps report invoke monitor/clock.json 2>/dev/null && grep -q T monitor/clock.json && echo PREFLIGHT OK || (mm-stick warmup || sudo oref0-reset-usb; echo PREFLIGHT FAIL; sleep 120; exit 1)"

might it make sense to have it reset usb in any circumstance in which any of the preflight commands fail to run?
tazitoo
@tazitoo
Mar 10 2016 15:00

morning - I hit an issue with my pi and openaps having issues with git corruption...quickest way to get back to a loop was:

1) edit ~/src/openaps/openaps/cli/init.py line 65 - commented out self.create_git_commit() 2) added a 'return' to complete that function on line 66

So I am now looping again, but what functionality is now broken?

Scott Leibrand
@scottleibrand
Mar 10 2016 16:28
@live4sw problem with that is that multiple USB resets while the pump is out of range may break the wifi, leaving you disconnected until reboot.
Next time that happens I would run the components of your alias, but don't actually reset-usb, to figure out how/why it's failing.
That way you can actually test your fix against the real issue.
If you're worried about it dying overnight, another option is an hourly reboot or something.
@tazitoo you have disabled its ability to keep an audit trail of the previous state of the system. Better to do oref0-fix-git-corruption (perhaps via dev branch version of oref0-reset-git). I run the latter every minute in cron, so it can try to fix corruption of it finds it, and reset history if it can't.
Jason Calabrese
@jasoncalabrese
Mar 10 2016 17:01
when dealing with git corruption it's tempting to want to pull it out, but we have been able to reproduce and solve some bugs because of using git that I think would have been much harder otherwise
Scott Leibrand
@scottleibrand
Mar 10 2016 17:04
anyone want to do a PR to pull in just the oref0-reset-git and oref0-git-corruption stuff to master?
tazitoo
@tazitoo
Mar 10 2016 17:45

can we make that switchable via a preference in openaps.ini? (...probably makes me the owner of the suggestion and a PR, doesn't it....)

I tried the dev branch of oref0-reset-git, and I couldn't take all the "Again:" that kept scrolling by...but I'll try and get it sorted out with the master version later this afternoon. Thanks!

Scott Leibrand
@scottleibrand
Mar 10 2016 17:49
It will eventually time out and reset it if it can't fix. 30 seconds I think?
tazitoo
@tazitoo
Mar 10 2016 18:23
my brief glance at the script (in the dev branch) did not make me notice a timeout...I'll run it again this afternoon when I get a break
so it tries to fix-git-corruption for 15 seconds, and then resets the repo if it's still borked