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

21st
Mar 2016
kameamea
@kameamea
Mar 21 2016 00:00

@bewest I installed decocare from the git branch now. mm-stick diagnose now does something, but then: ```
INFO:main:zero length READ, try once more sleep .250
INFO:root:usb.read.len: 0
INFO:root:usb.read.raw:

CRITICAL:main:FAILED TO DOWNLOAD ANYTHING, after 0 expected:64
```

I also tried ./bin/socat_run_app.sh which seems to hang after /usr/bin/socat TCP-CONNECT:bewest.io:8080,reuseaddr pty,link=./carelink.ttyUSB0,b9600,raw

Ben West
@bewest
Mar 21 2016 00:02
ah, no need for that :-), stick with mm-stick diagnose
would try downgrading pyserial also
kameamea
@kameamea
Mar 21 2016 00:03
I had downgraded to <3.0.0 with no success
< 3
Dana Lewis
@danamlewis
Mar 21 2016 00:03
heh
Ben West
@bewest
Mar 21 2016 00:03
I'm using 3.0.1 apparently, interesting
that's a good topic/description oneliner/roadmap heading
Towards :heart:.0.0
kameamea
@kameamea
Mar 21 2016 00:08
3.0.1 is the default here, but same result with 2.7
Ben West
@bewest
Mar 21 2016 00:09
what kind of laptop do you have?
think there's a number of subtle thins happening
one is pyserial version
but another is your device showed up as pci rather than usb
that's kind of odd
kameamea
@kameamea
Mar 21 2016 00:10
a desktop with skylake processor
, 16 GB
Ben West
@bewest
Mar 21 2016 00:10
what kernel version?
kameamea
@kameamea
Mar 21 2016 00:11
4.3.3
Ben West
@bewest
Mar 21 2016 00:11
at 3.18, carelink is supported by kernel by default
ah ok, interesting
for your udev rules...
you don't need to modprobe usbserial
linux kernel will see it and do right thing
so you can comment out or delete that portion of the udev rules perhaps
no idea if that will do anything
but simplest possible thing is: python -m decocare.stick /dev/ttyUSB0
the scan function can be tested using python -m decocare.scan
mm-stick just calls those things...
so mm-stick diagnose just becomes python -m decocare.stick $(python -m decocare.scan)
kameamea
@kameamea
Mar 21 2016 00:13
yes, the result of python -m decocare.stick /dev/ttyUSB0 is the same
Ben West
@bewest
Mar 21 2016 00:14
fail to read?
so.... sometimes I unplug and replug my usb stick several times
I get Failed to download anything
then I replug and it works
kameamea
@kameamea
Mar 21 2016 00:15
this is the complete output: (I just replugged from USB 3 to USB 2 to check whether this makes a difference):

```python -m decocare.stick /dev/ttyUSB0
INFO:main:howdy! I'm going to take a look at your carelink usb stick.
INFO:decocare.link:Link opened serial port: Serial<id=0x7f8456781310, open=True>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=0.5, xonxoff=False, rtscts=True, dsrdtr=True)
INFO:main:PROCESS:OPEN:0.027
INFO:main:PROCESS:START:0.12:ProductInfo:0x04
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:main:send_force_read: attempt 0/1 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000 0x04 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 0
INFO:root:usb.read.raw:

INFO:main:zero length READ, try once more sleep .250
INFO:root:usb.read.len: 0
INFO:root:usb.read.raw:

CRITICAL:main:FAILED TO DOWNLOAD ANYTHING, after 0 expected:64
INFO:main:process zero length READ, try once more sleep .010
INFO:root:usb.read.len: 0
INFO:root:usb.read.raw:

ERROR:main:ACK is zero bytes!
INFO:main:failed:(0):
ACK is 0 bytes:

Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/rolf/soft/decoding-carelink/decocare/stick.py", line 912, in <module>
stick.open( )
File "/home/rolf/soft/decoding-carelink/decocare/stick.py", line 874, in open
log.info('%s' % self.product_info( ))
File "/home/rolf/soft/decoding-carelink/decocare/stick.py", line 515, in product_info
return self.query(ProductInfo)
File "/home/rolf/soft/decoding-carelink/decocare/stick.py", line 509, in query
return self.process( )
File "/home/rolf/soft/decoding-carelink/decocare/stick.py", line 496, in process
ack, response = self.command.respond(raw)
File "/home/rolf/soft/decoding-carelink/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:
```

Tim Howard
@tghoward
Mar 21 2016 00:16
@bewest In /etc/rc.local I already had this line
/usr/local/bin/bluetoothd --experimental &
Ben West
@bewest
Mar 21 2016 00:16
I get that from time to time
@tghoward I think 5.28 is too old
I seem to recall 5.29 working
but 5.31 is looking super nice, and there's obviously improvements sense then
5.29 is year old as of April 1
Tim Howard
@tghoward
Mar 21 2016 00:17
I think I'm running 5.33
Ben West
@bewest
Mar 21 2016 00:17
oh.
Tim Howard
@tghoward
Mar 21 2016 00:18
but bluez is up to 5.38 now
Ben West
@bewest
Mar 21 2016 00:18
true, most distros lag behind most library releases
@kameamea usually, if I try unplugging/replugging a few times, it settles after awhile and works
occasionally it gets inserted and doesn't quite work, does that Fail, no ACK stuff
kameamea
@kameamea
Mar 21 2016 00:20
i have replugged now about 5 times. Will try again tomorrow, also will test it on a different laptop then. Thanks for your help so far
Ben West
@bewest
Mar 21 2016 00:25
hmm, sorry... would have expected it to work flawless on that setup
I wonder if doing the modprobe in addition to the udev/built-in stuff is interfering, and its getting poked by mtp anyway
like, is mtp reporting couldn't read -1 still?
would try commenting out the udev add/remove stanzas, so only the MM_IGNORE thing is there, doing sudo udevadm control --reload and trying whole plug/diagnose dance again
can maybe confirm the theory watching output from udevadm monitor
kameamea
@kameamea
Mar 21 2016 00:48
I still get the same results. udevadm monitor looked reasonable. I'll try rebooting and other stuff tomorrow. Now its bedtime for me.
tazitoo
@tazitoo
Mar 21 2016 01:43
Just started to analyze my logs to how/where my basal rates can be changed...First attempt at plotting rates:
https://db.tt/IXbQ1Fcd
Doing this locally in python/pandas/matplotlib...suggestions welcomed.
Dana Lewis
@danamlewis
Mar 21 2016 01:45
looks on average like your normal scheduled are too high? interesting.
does that align with your gut instinct of waking up and looking and seeing if openaps tends to usually low temp you overnight?
tazitoo
@tazitoo
Mar 21 2016 01:48
yes - and I am waking up in the 100-110 range
Scott Leibrand
@scottleibrand
Mar 21 2016 01:49
what is your target?
tazitoo
@tazitoo
Mar 21 2016 01:49
I'm not putting too much emphasis on the mean values for now, but the period from 6pm to 8pm (just before dinner for me) seems to need the most "attention" - typical excercise + hot shower, etc.
min_bg=max_bg=120
tazitoo
@tazitoo
Mar 21 2016 01:56
I have been hesitant to "outsource" data plotting and analysis to NS - I will have times of no connectivity which reduces NS benefits - so am working on a more local/homebrew process. If anyone has further suggestions on plots and strategies/interpretations of data, I'd be happy to hear it!
Dana Lewis
@danamlewis
Mar 21 2016 02:00
@loudnate has his own set of visualization tools you could check out, too. All the more appealing now that he has an ios-based option :) that he's been sharing sneak peaks of
Nathan Racklyeft
@loudnate
Mar 21 2016 02:01
Hi @tazitoo, @channemann and @oskarpearson and I have worked on github.com/loudnate/openaps-monitor
tazitoo
@tazitoo
Mar 21 2016 02:01
I'll take a look - thanks! Nite!
Nathan Racklyeft
@loudnate
Mar 21 2016 02:03
tazitoo
@tazitoo
Mar 21 2016 02:05
Interesting - is it focused on plots of the time series? Or is there additional historical/mean post-processing?
Nathan Racklyeft
@loudnate
Mar 21 2016 02:06
openaps-monitor provides time-series data derived from your openaps reports, as well as a quick way to view the raw data
My raspberry pi has been powered down for 1 week now. searching for a screenshot for you...
This message was deleted
tazitoo
@tazitoo
Mar 21 2016 02:11
just requested access...
Nathan Racklyeft
@loudnate
Mar 21 2016 02:13
sorry that's quite old.
rafaelmatuk
@rafaelmatuk
Mar 21 2016 02:26
hi - I have a small problem automating the visualization of my openaps implementation with nightscout: the "monitor/pumphistory-zone.json" report is failing with this error: AttributeError: 'list' object has no attribute 'read'". Any idea what the problem may be?
Earle West
@ehwest
Mar 21 2016 02:41
any one figured out how to get ntp to work on edison
Ben West
@bewest
Mar 21 2016 03:08
I think ntp is already on itapt-get install ntpdate
something like service ntp stop; ntpdate 0.us.pool.ntp.org; service ntp start;
all as root
@tazitoo you could run NS on your rig locally
Jim Matheson
@jmatheson
Mar 21 2016 04:11
man, got a low out of nowhere this evening. 4 1/2 hours after my last bolus. openaps hi temped me about 3 1/2 hours ago which seemed fine. nice soft landing coming and them boom bottom fell out. openaps temped me to zero as/when expected but man. not sure what caused the drop. had not happened before at this time of day and no exercise.
Jim Matheson
@jmatheson
Mar 21 2016 04:22
strange day. all morning i was super resistant. it’s like the insulin from 9 hours ago suddenly decided to absorb.
Scott Leibrand
@scottleibrand
Mar 21 2016 04:27
was it a real low, confirmed by fingerstick and/or symptoms?
Dana Lewis
@danamlewis
Mar 21 2016 04:30
@jmatheson that happens to me often, especially if it's resistance because of dehydration or something…once my body decides it's nice and hydrated again, whoosh! everything from hours before starts working
Ben West
@bewest
Mar 21 2016 04:33
dana and I have talked about whoosh before as well
Jim Matheson
@jmatheson
Mar 21 2016 04:36
Yes and yes on the low
Not sure what caused it but i thought this crew might have some ideas :)
Now getting rise rate alert ughh! I finally caved and went honey when i got down to 40
Dana Lewis
@danamlewis
Mar 21 2016 04:59
Are you on meal assist? If so putting in some of the honey carbs will help the algorithm work on the resulting rise
Jim Matheson
@jmatheson
Mar 21 2016 05:10
Not yet but i did bolus up
Jim Matheson
@jmatheson
Mar 21 2016 05:29
thinking about the earlier discussion on Tshirts….
Playing with some ideas on teespring, but don’t really have any great ideas I love.
thoughts / ideas?
Ben West
@bewest
Mar 21 2016 05:31
openaps
use
Scott Leibrand
@scottleibrand
Mar 21 2016 05:31
@bewest openaps/openaps#87
Ben West
@bewest
Mar 21 2016 05:32
this is one reason I want to get away from the multiple crons doing several things in openaps
at same time
Scott Leibrand
@scottleibrand
Mar 21 2016 05:33
it's not just multiple crons
if I have a cron running and try to update config interactively, this bites me about 25% of the time
stopping cron and killing all openaps instances before updating config would be annoying
probably better to stop rewriting ini files except when something actually changes
Ben West
@bewest
Mar 21 2016 05:34
yeah, but that's same issue, openaps expects to basically run one thing at a time
if we want more advanced features, it needs to be part of the daemon/event stuff
Scott Leibrand
@scottleibrand
Mar 21 2016 05:35
IMO that expectation is mismatched with the way people are going to actually use it, so we should adjust the tool to match the user's expectation
this is really basic functionality. nothing advanced here.
Ben West
@bewest
Mar 21 2016 05:35
running multiple openaps things at same time?
Scott Leibrand
@scottleibrand
Mar 21 2016 05:35
"can I reconfigure my loop reliably?" no.
Ben West
@bewest
Mar 21 2016 05:36
seems fairly advanced
Scott Leibrand
@scottleibrand
Mar 21 2016 05:36
reconfiguration is not advanced
Ben West
@bewest
Mar 21 2016 05:36
you can reconfigure it fine when it's not running
Scott Leibrand
@scottleibrand
Mar 21 2016 05:36
then you need a lock that prevents multiples from running
can't expect user to know
that's like blaming the user for not "using the pump right"
Ben West
@bewest
Mar 21 2016 05:37
right, this is all strengthening the arguments to move away from cron into a daemon that can know what's running when
Scott Leibrand
@scottleibrand
Mar 21 2016 05:37
long term I agree, but I think this is a clear bug that we need to fix, regardless of that
it should either fail to reconfigure, or reconfigure reliably
Ben West
@bewest
Mar 21 2016 05:38
it reconfigures fine
Scott Leibrand
@scottleibrand
Mar 21 2016 05:38
lying about the fact that it reconfigured, when in fact it didn't...
not from the user's perspective
please think about this from the user's perspective, not openaps'
Ben West
@bewest
Mar 21 2016 05:38
this is about running multiple things at same time producing surprising results
I have limited resources to improve things
Scott Leibrand
@scottleibrand
Mar 21 2016 05:39
what is going on that makes it rewrite the config files every time?
why doesn't it just rewrite the one that changed (pump.ini)?
I'm assuming there is an easy fix there somewhere
Ben West
@bewest
Mar 21 2016 05:39
that's a separate issue
Scott Leibrand
@scottleibrand
Mar 21 2016 05:39
how so? if regular runs didn't rewrite openaps.ini it wouldn't overwrite my reconfigs, right?
Ben West
@bewest
Mar 21 2016 05:41
in this new issue, it's caused by your stale version of openaps opening up a new git commit
which does in fact create a lock file
on the git index
you then changed the working copy using openaps add
then, your stale version of openaps with it's stale lock file restored it to what it knew about
Scott Leibrand
@scottleibrand
Mar 21 2016 05:42
so is git not checking the lock files?
Ben West
@bewest
Mar 21 2016 05:42
git is checking the lock file
Scott Leibrand
@scottleibrand
Mar 21 2016 05:44
then I'm confused as to why the lock file isn't preventing this
Ben West
@bewest
Mar 21 2016 05:44
in theory there's an argument that this is exactly what is supposed to happen
did you use import or add?
Scott Leibrand
@scottleibrand
Mar 21 2016 05:45
I've done it both ways with the same result
I was hoping import wouldn't have the issue
but just saw it does
Ben West
@bewest
Mar 21 2016 05:45
if you used import, there's potentially a bug in import in that it does not finalize any import with a commit
might be same bug in all add apps actually
Scott Leibrand
@scottleibrand
Mar 21 2016 05:45
if we can fix this just for import, that would be fine with me
Ben West
@bewest
Mar 21 2016 05:45
it doesn't actually commit the openaps.ini
hmm device add does
no...
weird
Scott Leibrand
@scottleibrand
Mar 21 2016 05:47
you can't use add to update a device
you have to remove it first
you can use add to update reports and aliases though
Ben West
@bewest
Mar 21 2016 05:47
no, there's a bug/regression somewhere
Scott Leibrand
@scottleibrand
Mar 21 2016 05:48
anything I can do to help track it down?
Ben West
@bewest
Mar 21 2016 05:48
yeah, somehow...something very odd happened
bewest@bewest-MacBookPro:~/Documents/openaps$ openaps device add anothernewone process "echo hello"
for some reason git show shows an empty commit
need to git add openaps.ini at some point
that's why
which branch are you using?
Scott Leibrand
@scottleibrand
Mar 21 2016 05:50
$ openaps --version
openaps 0.0.11-dev
Ben West
@bewest
Mar 21 2016 05:58
ahhhhhhhh
I see
self.repo.index.commit
must have different...
I used to do git.commit('-avm', msg) which captures everything
need the correct underlying code to do that against index I guess
Ben West
@bewest
Mar 21 2016 06:06
hmmmm
well, adding a device should definitely create git commit with actual changes
so that's broke
Jim Matheson
@jmatheson
Mar 21 2016 06:14
thinking i won’t click on this ad
Screen Shot 2016-03-20 at 11.13.45 PM.png
Ben West
@bewest
Mar 21 2016 06:27
ah... finally
ok, that's better, it fixes device add and import
Scott Leibrand
@scottleibrand
Mar 21 2016 06:32
:+1:
Ben West
@bewest
Mar 21 2016 06:32
on the one hand, in theory unit tests might have caught that
on other hand, that particular thing is actually kind of .. tedious to test
reams and reams of boilerplate test code :-(
Scott Leibrand
@scottleibrand
Mar 21 2016 06:33
Yeah. I'm ok with only catching this kind of thing in production. Just glad it's fixed.
Race conditions are hard to unit test for.
Ben West
@bewest
Mar 21 2016 06:34
not sure it catches your issue
it should help for sure
Scott Leibrand
@scottleibrand
Mar 21 2016 06:34
K. I'll keep an eye out once I update to that version.
Ben West
@bewest
Mar 21 2016 06:34
the problem was that it wasn't even adding your changes to openaps.ini at all
not a race condition, per se
Scott Leibrand
@scottleibrand
Mar 21 2016 06:35
Usually it works, so maybe when nothing is running subsequent openaps commands do add it.
Ben West
@bewest
Mar 21 2016 06:36
they used to
after I changed that git tweak, they no longer do
Ben West
@bewest
Mar 21 2016 06:45
hasn't hit master/prod yet
live4sw
@live4sw
Mar 21 2016 11:31
Hi all, quick cron question. I have been using */5 * * * * (cd /home/pi/myopenaps1 && openaps retry-loop 2>&1 | logger -t open$ to run my loop every 5 minutes, but especially at night have pretty spotty connectivity. Instead I'd like to use * * * * * (ps aux | grep -v grep | grep -q 'openaps retry-loop' || cd /home/pi/myopenaps1 && openaps retry-loop) 2>&1 | tee -a /var/log/openaps/loop.log
Am I correct that every minute, this will check to see if there is a running openaps process, and if not, it will start running my loop, and then write the results to /var/log/openaps/loop.log?
Scott Leibrand
@scottleibrand
Mar 21 2016 13:54
@live4sw you can keep your logger stuff instead of the tee stuff if you prefer
Toby Canning
@TC2013
Mar 21 2016 13:54
@live4sw Related to your idea about adding the ps aux and grep to see if your process exists and then run it if it doesn't, I'm using a nearly identical line and it seems to work perfectly. You should run it manually to test it though.
Scott Leibrand
@scottleibrand
Mar 21 2016 13:54
and yes, that is what it does.
Jon Hughes
@JonnyRox
Mar 21 2016 13:59
First step towards OpenAPS almost complete. Waiting to see if a 'best offer' is accepted on a damaged box Pi 3. If it turns up by the end of the week I'll be able to have a play over Easter weekend and get familiar with the operating system.
3 minute update: Pi 3, 16gb card and clear case now on its way :smile:
Eric Luhrs
@eluhrs
Mar 21 2016 14:04
👍🏼
Careful, @JonnyRox .... This stuff is really addicting. 😀
Jon Hughes
@JonnyRox
Mar 21 2016 14:08
I feel a bit sorry for my Arduino now!
live4sw
@live4sw
Mar 21 2016 14:42
Thanks guys, seems to be working, only one weird thing is that when the process is currently running and we hit the top of the minute I get "Mar 21 10:40:02 raspberrypi openaps: Not an openaps environment, run: openaps init"
I wonder if something in my bash logic is messed up: * * * * * (ps aux | grep -v grep | grep -q 'openaps retry-loop' || cd /home/pi/myopenaps1 && openaps retry-loop) 2>&1 | logger -t openaps
live4sw
@live4sw
Mar 21 2016 14:47
Aha, it seems to me that the cd and openaps retry-loop commands should be in nested parentheses so that it doesn't try to execute openaps retry-loop even when the process is running already
Greg Scull
@komby
Mar 21 2016 15:58
@JonnyRox lol poor arduino :)
Jim Matheson
@jmatheson
Mar 21 2016 17:16
wow, diabetes getting a mention early in the apple keynote
talking about ResearchKit. forgot about that..
Dana Lewis
@danamlewis
Mar 21 2016 17:29
I bet they talk about @loudnate's work next year :D
Anyone in the Boston area?
dougtakeuti
@dougtakeuti
Mar 21 2016 20:11
Hey there. I'm getting this month format error when retrieving pump history. Any ideas?
 openaps use pump iter_pump_hours 4
subg_rfspy status: OK
Version: subg_rfspy 0.6
No handlers could be found for logger "mmeowlink.handlers.stick"
ERROR month must be in 1..12 0000   0x01 0x0c                                  ..
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 44, in __call__
    self.run(self.args)
  File "/home/pi/src/openaps/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/home/pi/src/openaps/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/home/pi/src/openaps/openaps/uses/__init__.py", line 31, in __call__
    return self.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/medtronic.py", line 455, in main
    for rec in self.range( ):
  File "/home/pi/src/decoding-carelink/decocare/models/__init__.py", line 67, in __call__
    for record in page:
  File "/home/pi/src/decoding-carelink/decocare/models/__init__.py", line 46, in download_page
    for record in self.find_records(page):
  File "/home/pi/src/decoding-carelink/decocare/models/__init__.py", line 141, in find_records
    records = decoder.decode( )
  File "/home/pi/src/decoding-carelink/decocare/history.py", line 819, in decode
    record = parse_record(self.stream, B, larger=larger, model=self.model)
  File "/home/pi/src/decoding-carelink/decocare/history.py", line 751, in parse_record
    record.parse( head + date + body )
  File "/home/pi/src/decoding-carelink/decocare/records/base.py", line 66, in parse
    return self.decode( )
  File "/home/pi/src/decoding-carelink/decocare/history.py", line 73, in decode
    return (dict(valid_date=date(*mid).isoformat()))
ValueError: month must be in 1..12
Scott Leibrand
@scottleibrand
Mar 21 2016 20:16
regularly and reliably, or intermittently?
there are lots of weird errors like that you can get due to flaky RF
dougtakeuti
@dougtakeuti
Mar 21 2016 20:28
@scottleibrand I need to investigate that. The loop ran steadily all night. During the day I noticed the loop was getting stuck in the gather alias and I narrowed it down to pump history. I had her sit beside the rig and ran it a few times and got the same error consistently. It was picking up good signal ~-66. She's off to volleyball practice now so I'll have to wait to look into that. Thanks for the tip, I'll keep an eye on comms.
Scott Leibrand
@scottleibrand
Mar 21 2016 20:29
pumphistory is definitely the command most susceptible to interference, as it's the longest request/reply sequence we do by at least an order of magnitude
Ben West
@bewest
Mar 21 2016 20:47
it'd be good to get the raw page of data using mm-send-comm.py --init --serial 123456 tweak ReadHistoryData --save --page 0
can copy the output into github issue, or send me the ReadHistoryData-page-0.data file that gets saved
if it happens consistently, it can often mean there's some event in your history that isn't being handled correctly, it often indicates missing feature or a bug
the crcs are all validated before that code runs, so it's likely a valid page of data
kameamea
@kameamea
Mar 21 2016 21:51
@bewest today without modifying anything my carelink stick is working! This is fantastic, I'm going to dive deeper into OpenAPS now.
Ben West
@bewest
Mar 21 2016 22:24
nice
I recommend looking into getting a goodfet42 and a TI cc1111 also :-D
the cc1111 can replace the carelink stick and offers better range
Colin Lennon
@colinlennon
Mar 21 2016 22:32
So I have units successfully converting my bg_targets and insulin_sensitivities reports from mmol/l to mg/dL. I've found that there's a problem in my pumphistory report though. The values for bg_target_low and bg_target_high are 66 and 70 - these are the mmol/l values I have set, 6.6 and 7.0, with the decimal point removed -
{
    "_type": "BolusWizard",
    "bg": 81,
    "bg_target_high": 70,
    "correction_estimate": 0.2,
    "unknown_byte[10]": 0,
    "_description": "BolusWizard 2016-03-21T19:26:52 head[2], body[13] op[0x5b]",
    "timestamp": "2016-03-21T19:26:52",
    "_body": "39900c2c42022f000000003146",
    "carb_input": 57,
    "_head": "5b51",
    "unabsorbed_insulin_total": 0.0,
    "_byte[5]": 2,
    "unabsorbed_insulin_count": "??",
    "_byte[7]": 0,
    "_date": "34da131510",
    "bolus_estimate": 4.9,
    "unknown_byte[8]": 0,
    "carb_ratio": 12,
    "food_estimate": 4.7,
    "bg_target_low": 66,
    "sensitivity": 44
  }
kameamea
@kameamea
Mar 21 2016 22:32
I already read about the Edison-TI-Stick-Combo. For now I'll start to get some manual processing to work and see, whether the full loop makes sense with the sometimes strange CGMS values from the Medtronic.
Colin Lennon
@colinlennon
Mar 21 2016 22:34
Just noticed that the value for bg is 81 there too - my actual bg was 8.1 mmol/l which is 146 mg/dL. That explains the unexpected recommendations I'm seeing in suggested.json!
The help for units seems to suggest it is intended to be used for converting bg_targets and insulin_sensitivities only. Do I need to convert the output from pumphistory.json somehow? Not sure if anyone else UK-based has seen this before?