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

8th
Mar 2015
diabeticgonewild
@diabeticgonewild
Mar 08 2015 06:17
@TC2013 , you can solder something inside the Moto G to make it dual OTG so you can charge and use it as an uploader. I wouldn't recommend it though. I hate soldering!
diabeticgonewild
@diabeticgonewild
Mar 08 2015 12:44
OK, so I got a little bit distracted from my personal project, and I managed to both interpolate and extrapolate points for the Apidra glucose infusion rate at dosage = 0.3 U/kg from here http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2293970/figure/fig3/ , according to this graph here http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3045234/figure/fig1/ , and by curve fitting and substituting the curve fit into IOB, I used the % IOB remaining function = 100 - ((integral of IOB from t=0 to t=arbitrary points at 15 minute increments)/(integral of IOB function from t=0 to t=480)*100)
Anyways, all of the values were within 3% of the Medtronic 530G pump for the 5 hour DIA
That I experimentally interpolated and extrapolated for the Apidra glucose infusion rate. So, I had to have got it right and Medtronic did a good job with creating an IOB function. This confirms that I was pretty much right on with my IOB function, and Medtronic was right too.
I can scan what I did by hand, so you can see my work.
Sulka Haro
@sulkaharo
Mar 08 2015 15:43
@mgranberry Most manufacturer have a magic resistor value for connecting the OTG ID and ground pin to enable charging while in OTG mode. You can get cables that actually work from Valarm for the Samsung and Sony phones that do this: http://shop.valarm.net/products/micro-usb-host-otg-y-cable-with-micro-usb-power-for-samsung
Toby Canning
@TC2013
Mar 08 2015 15:44
Does anyone know what it would take to figure out the Bayer Nextlink
Sulka Haro
@sulkaharo
Mar 08 2015 15:45
@mgranberry The resistor puts the phone into a mode where it never puts out power, so you'll need both a split cable and a regular OTG cable for full operation
diabeticgonewild
@diabeticgonewild
Mar 08 2015 15:46
wireless charging via Qi pad (you can get usb batteries with Qi charging pads): https://www.youtube.com/watch?v=UxTYZ6qFJU0 (tutorial in the comments)
Sulka Haro
@sulkaharo
Mar 08 2015 15:48
@TC2013 I recall @bewest has been looking at the Nextlink and it's not straightforward to get going.
diabeticgonewild
@diabeticgonewild
Mar 08 2015 15:49
They're still manufacturing CareLink USB, most likely. The two I got had a manufacturing date of 09/2014
Sulka Haro
@sulkaharo
Mar 08 2015 15:50
Yup, Carelink will probably be manufactured for as long as they still give out Veos, and some years after
There's also a new Carelink called the "Carelink 2.4" which supports the new pumps
Operates at the 2.4GHz frequency
diabeticgonewild
@diabeticgonewild
Mar 08 2015 15:51
yeah, lots of interference with that band. Not a smart move by Medtronic.
Toby Canning
@TC2013
Mar 08 2015 15:52
@diabeticgonewild @sulkaharo Thanks! Awesome info.
diabeticgonewild
@diabeticgonewild
Mar 08 2015 15:53
you're welcome.
somebody on CGM in the Cloud did it. I would search for "moto g resistor resistors solder"
I will try to find it. I never go on FB anymore.
diabeticgonewild
@diabeticgonewild
Mar 08 2015 16:03
OK wireless charging = bad idea. I looked into the CGM in the Cloud group and
"one group member did convert their Moto-G to wireless charging, but the irony is that while it is wirelessly charging, it will not upload data."
Don't do it.
Toby Canning
@TC2013
Mar 08 2015 17:10
Maybe use the Wireless Charger with the resister?
We will hopefully be BLE soon anyway with the dex and cc1111
diabeticgonewild
@diabeticgonewild
Mar 08 2015 17:14

Wireless charger won't work. It disables the uploader. I don't know about the resistor technique, but it's risky.

Somebody suggested some sort of PC connection to the phone on CGM in the Cloud...let me try to find it

Matthias Granberry
@mgranberry
Mar 08 2015 17:31
I have a little python script that uploads to NS, from my PC, but it does too little error checking for public consumption
Toby Canning
@TC2013
Mar 08 2015 17:35
@mgranberry Can I have that?!
Does it grab the rawbg data too?
diabeticgonewild
@diabeticgonewild
Mar 08 2015 17:40
could you just use chromadex and use the Android Studio app/emulator to send commands to the pi?
Because there really isn't a realistic solution on CGM in the Cloud.
Toby Canning
@TC2013
Mar 08 2015 17:40
@diabeticgonewild Did you see my text?
diabeticgonewild
@diabeticgonewild
Mar 08 2015 17:41
no, just a sec
Sulka Haro
@sulkaharo
Mar 08 2015 17:57
@diabeticgonewild you can just order the split cable from Valarm and use it with Sonys and Samsung phones. No soldiering necessary. I have one and it works great.
Matthias Granberry
@mgranberry
Mar 08 2015 18:50
@tc2013 I'll work on pulling out some passwords that I hardcoded in it and write a readme and put it on github tonight
It doesn't do raw values, but I can probably add it to dexcom_reader and make it work with a little effort. I just have a lot of little projects pulling at me right now.
Toby Canning
@TC2013
Mar 08 2015 19:04
@mgranberry Thank you!!!
That will save me quite a bit of effort.
What is this?
       function carbImpact(rawCarbImpact, insulinImpact) {
            var liverSensRatio = 1.0;
            //var liverCarbImpactMax = 1;
            //var liverCarbImpact = Math.min(liverCarbImpactMax, liverSensRatio*insulinImpact);
            var liverCarbImpact = liverSensRatio*insulinImpact;
            var netCarbImpact = Math.max(0, rawCarbImpact-liverCarbImpact);
            var totalImpact = netCarbImpact - insulinImpact;
            return {
                netCarbImpact: netCarbImpact,
                totalImpact: totalImpact
            }
        }
diabeticgonewild
@diabeticgonewild
Mar 08 2015 19:13
See line 208: var insulinImpact = iobTotal(treatments, t).activity*tick;
the function is utilized
Scott Leibrand
@scottleibrand
Mar 08 2015 19:50
It's our hepatic carb absorption stuff.
Delays predicted carb absorption when insulin activity is high.
You can turn it down/off by tweaking liverSensRatio. Look at some big meals and see whether the retrospective predictions are better with/without it.
We don't use that for closed loop / DIYPS purposes though. Just for Nightscout.