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

18th
Nov 2015
Jason Calabrese
@jasoncalabrese
Nov 18 2015 00:00
@eyim interesting test results, maybe we're multiplying instead of dividing somewhere
Jason Calabrese
@jasoncalabrese
Nov 18 2015 00:06
just an order of operations thing, this is why I put parens around everything...
eyim
@eyim
Nov 18 2015 00:06
@scottleibrand You can actually run a sq wave and temp basal at the same time. I'll have to figure out the best way to handle that as my son eats those items that require a dual wave bolus a lot
Scott Leibrand
@scottleibrand
Nov 18 2015 00:06
@eyim you'll want to play around with the openaps tools and see what you can and can't do from the carelink
@jasoncalabrese does that mean you know the fix? sorry, haven't looked yet.
Jason Calabrese
@jasoncalabrese
Nov 18 2015 00:10
oref0: var minAgo=(time-bolusTime)/1000/60 * diaratio;
NS: var minAgo = scaleFactor * (time - bolusTime) / 1000 / 60;
Scott Leibrand
@scottleibrand
Nov 18 2015 00:10
I think those are the same, no?
diabeticgonewild
@diabeticgonewild
Nov 18 2015 00:10
I am very close to getting to finishing up #VirtualPancreas, at least the programming for obtaining the parameters needed for simulation. I guess "random walks" were not something to be worried about. All I have left is Markov chain Monte Carlo stuff and then I will be DONE! 😭😄😍☺️
Jason Calabrese
@jasoncalabrese
Nov 18 2015 00:11
no that not it, it's before that
NS: var scaleFactor = 3.0 / dia
oref0: var diaratio = dia / 3;
Scott Leibrand
@scottleibrand
Nov 18 2015 00:11
ah
Jason Calabrese
@jasoncalabrese
Nov 18 2015 00:11
backwards
I'll send a PR
Scott Leibrand
@scottleibrand
Nov 18 2015 00:12
thx
Jason Calabrese
@jasoncalabrese
Nov 18 2015 00:12
probably not till tonight
good find @eyim
Scott Leibrand
@scottleibrand
Nov 18 2015 00:13
:+1:
eyim
@eyim
Nov 18 2015 00:17
Thank you - even though I am not a dev, I always seem to find the bugs. My dev's think I am cursed - lol
Scott Leibrand
@scottleibrand
Nov 18 2015 00:18
usually finding bugs indicates that you pay attention to anomalies. good skill to have. :)
I'm always noticing "hey, that doesn't seem quite right" even when it mostly works
Jason Calabrese
@jasoncalabrese
Nov 18 2015 00:24
I'll finish openaps/oref0#26 later, will get a basic test in place
eyim
@eyim
Nov 18 2015 00:24
I just changed it on my local version and it now says iob of 0.23 compared to nightscout of 0.22 - Thank you @jasoncalabrese for fixing it
Jason Calabrese
@jasoncalabrese
Nov 18 2015 00:24
nice, thats great
Lori
@LoriLori
Nov 18 2015 00:25
was thinking about restructure of code to split for example no temp ->temp into bottom function, I think there is too much duplicate in this area
Scott Leibrand
@scottleibrand
Nov 18 2015 00:25
awesome, thanks for confirming the fix
need to also confirm that bolus IOB still works right
Jason Calabrese
@jasoncalabrese
Nov 18 2015 00:26
really want to get all this into dcalc, then share between all the projects
Lori
@LoriLori
Nov 18 2015 00:26
also not sure what is behind delta and average delta should make only one number out of it, doubt it helps anything
Scott Leibrand
@scottleibrand
Nov 18 2015 00:27
there are two comparisons
delta is last-5m
avgdelta is last-15m
Lori
@LoriLori
Nov 18 2015 00:28
mostly I think it does not much as there is || for both
Scott Leibrand
@scottleibrand
Nov 18 2015 00:28
used in a number of different ways in different places. in that particular code, we compare both of them to BGI/2 or 0
for high-temp it's ||, and for low-temp it's &&, or vice versa
eyim
@eyim
Nov 18 2015 00:30
What is the expected behavior of bolus IOB ? That is decays in half the time? So if DIA =5 hours then for bolus IOB it acts like DIA is set to 2.5 hours? Or something more complex?
Lori
@LoriLori
Nov 18 2015 00:30
might also add numbers in reason like (01) Eventual ... so that it is easier to locate in the code
Scott Leibrand
@scottleibrand
Nov 18 2015 00:30
@eyim that's exactly right
and it only pays attention to boluses, not temp basals
@LorelaiL not a bad idea. feel free to PR that if you'd like. :)
Lori
@LoriLori
Nov 18 2015 00:32
I will do PR :) so far it runs offline only, I saw some strange think in IOB, like IOB input is 0.5 but it say IOB 0.5 > max IOB 2.0
Scott Leibrand
@scottleibrand
Nov 18 2015 00:34
hmm
I think it takes into account whether the suggested high-temp would put you over max_iob, and reduces it accordingly
but I haven't seen that particular one
@eyim let us know if you need help checking out jason's branch to test his version of the fix
Jim Matheson
@jmatheson
Nov 18 2015 00:48
anyone know what "nightscout latest-openaps-treatment” is actually pulling and from where?
possibly getting last 5 from treatments.json?
Scott Leibrand
@scottleibrand
Nov 18 2015 00:53
it uses your NIGHTSCOUT_HOST env var
if it's not set, it will try localhost:1337 and fail
that's how my setup script sets the env var in crontab
Jim Matheson
@jmatheson
Nov 18 2015 00:56
yeah, all that setup right. i should have started from scratch for your script. i’ve had some reports in there that were wrong, but your script saw they existed so pass them over.
Scott Leibrand
@scottleibrand
Nov 18 2015 00:56
no harm in running it again on another dir
eyim
@eyim
Nov 18 2015 01:28
@scottleibrand Hi Scott - Yes sorry I need help understanding how to download jason's branch and test things. Is it possible to do without breaking my current setup? Maybe I should go ahead and get another pi for these sort of things? I only understand at a high level what github does and not the commands to make things happen like pull requests, etc.
which is also why adding my notes to the documentation and reviewing Dana's changes hasn't happened yet
Scott Leibrand
@scottleibrand
Nov 18 2015 01:30
if we do it right, we should be able to set you up to switch your oref0 repo over from where it is now (master or dev) to jason's branch, where you can test things and then move it back
a second Pi makes things safer, but this kind of thing is easy to roll back
do you have a ~/src/oref0 directory, or did you install the non-developer way?
eyim
@eyim
Nov 18 2015 01:32
I have that directory I used curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-src.sh | bash - to install the dev version
and sorry I don't mean for you to have to each me github 101 basics. If there is a good site to learn about it, I can spend time reading up on it so as not to waste your time
i'll also order a second pi but they will take a bit to come in
Scott Leibrand
@scottleibrand
Nov 18 2015 01:35
I can get you specific commands later, but what you want to do is add Jason's repo as a remote for your oref0 repo, then checkout his branch
(walking home now)
eyim
@eyim
Nov 18 2015 01:37
Thank you
Scott Leibrand
@scottleibrand
Nov 18 2015 01:39
i often have to google the exact git commands, so feel free to try that first. :-)
Jim Matheson
@jmatheson
Nov 18 2015 01:58
fresh install seemed to work well with the script. appears to be uploading to NS without error, but nothing showing up in NS and NS treatment reports just hangs on loading and processing data. any ideas?
fairly certain i have the TZ set up correctly
Scott Leibrand
@scottleibrand
Nov 18 2015 02:08
Do you have ENABLE=basal set?
Jim Matheson
@jmatheson
Nov 18 2015 02:10
yes. i think it is in my connection to mongo on the NS side. i can see my records in the DB, but NS says i have 0 records. going to head down that path… thx!
eyim
@eyim
Nov 18 2015 02:14
@scottleibrand I have Jason's branch installed so no need to send me the instructions.

the commands I used were:
git remote add jason https://github.com/jasoncalabrese/oref0
git fetch jason
git checkout wip/iob-test

when I do that a few strange things happen when I run my loop
1) I get this error on my commands to upload treatments to NS
bash: nightscout: command not found
bash: nightscout: command not found
2) It shows IOB: 0.08, Bolus IOB: 0.65
Unfortunately I had a temp basal and a sq bolus going a few hours ago so hard to compare to what iob should be but I can't think of any reason why Bolus IOB would be 0.65

Scott Leibrand
@scottleibrand
Nov 18 2015 02:21
The nightscout error is an easy one. Just need to re-run npm install and/or link to reflect the rename of ns.sh to nightscout.sh.
If bolus IOB is now off, that probably means my earlier fix now needs reversed as well in light of Jason's.
Jason Calabrese
@jasoncalabrese
Nov 18 2015 02:26
@eyim just notice that branch wasn't current with dev
I merge in dev and pushed
Scott Leibrand
@scottleibrand
Nov 18 2015 02:27
Oh, may not need to re-install then
Jason Calabrese
@jasoncalabrese
Nov 18 2015 02:27
couldn't fiugre out why it broke my loop, but it was missing the sgv/glucose that I got merged to dev awhile ago
eyim
@eyim
Nov 18 2015 02:27
Sorry - does that mean I can download and try again?
Jason Calabrese
@jasoncalabrese
Nov 18 2015 02:28
yeah
eyim
@eyim
Nov 18 2015 02:28
k
Jason Calabrese
@jasoncalabrese
Nov 18 2015 02:28
but I haven't run it yet
doing it now
need to get my 2nd pi setup
working on a live system like this is too stressful
but also kind of fun
git push insulin
Jim Matheson
@jmatheson
Nov 18 2015 02:31
wrong path :) will have to dig in more later.
eyim
@eyim
Nov 18 2015 02:32
that took care of the nightscout error but still getting a bolus iob of 0.54
Jason Calabrese
@jasoncalabrese
Nov 18 2015 02:34
we don't have any insulin on board, because they are waiting on me to go out to dinner...
Scott Leibrand
@scottleibrand
Nov 18 2015 02:44
probably just need to reverse this:
sleibrand@diyps ~/src/oref0/lib/iob $ git show 95599737e7957aff7fc85636b8df506d66e27ac0 | grep bIOB
-                var bIOB = iobCalc(treatment, time, dia/3)
+                var bIOB = iobCalc(treatment, time, dia*3)
that was my earlier fix for this issue for bolus IOB. now that we've fixed it properly, that probably needs reversed
want to give that a shot @eyim and/or @jasoncalabrese ?
Matt Pressnall
@logichammer
Nov 18 2015 03:39
This is probably a totally n00b question but: how often are folks calibrating their CGMs given the importance of getting good / accurate numbers? Has anyone seen a case where the T1D was lower than what the CGM reported (says 75 and the CGM reports 150...pretty unlikely but going for edge case here) and the OAPS pushed them lower? I'm sure you guys have already thought about this / figure it out and wanted to get your take. Many thanks!
Matthias Granberry
@mgranberry
Nov 18 2015 03:41
I find that my CGM is most accurate when I only calibrate when it is stable. I try to do every morning and another time during the day when BG is elevated but stable.
Scott Leibrand
@scottleibrand
Nov 18 2015 03:47
I think twice a day is typical, except right after inserting a new sensor, particularly if it's "jumpy" or otherwise off. Most people on OpenAPS can feel when they're high or low, so they know to test when the number seems wrong.
Jason Calabrese
@jasoncalabrese
Nov 18 2015 04:05
@scottleibrand I'll include and test that
Tempting to try setting up my new pi for camping mode for the drive to Tucson tomorrow, but probably a stretch
Haven't been able to find the I'll when it's on my hotspot to ssh to
Not positive it's switching networks correctly
Scott Leibrand
@scottleibrand
Nov 18 2015 04:09
do you have a console cable yet?
Jason Calabrese
@jasoncalabrese
Nov 18 2015 04:09
But I got the console cable, so maybe I can do it as we drive
Haven't tried it yet
Scott Leibrand
@scottleibrand
Nov 18 2015 04:10
I find the loop works quite well offline, but unless your phone can hotspot it's difficult to connect to it and see what it's doing
we haven't yet re-added the "set current basal as temp" feature that we were using during the honeymoon to get the little open circle whenever the loop is working successfully
Jason Calabrese
@jasoncalabrese
Nov 18 2015 04:11
That's a good idea
But I need to set it when it's in the back seat
Scott Leibrand
@scottleibrand
Nov 18 2015 04:12
it should also be possible to set up a script that controls the green LED to go on whenever the loop is successfully talking to the pump (within the last 5m, say) instead of it being an SSD activity light
Jason Calabrese
@jasoncalabrese
Nov 18 2015 04:12
Thinking about having it on his desk at school
Would cover about half the day
Scott Leibrand
@scottleibrand
Nov 18 2015 04:12
once you have it hotspotting, you can usually connect with raspberrypi.local or whatever, or with the last IP it got on that particular hotspot
I use Serverauditor, the app Monica recommended.
Matt Pressnall
@logichammer
Nov 18 2015 04:17
Thanks, folks! Yes, @mgranberry , we only calibrate when level otherwise with shifting deltas, it would introduce too much lag.
Matthias Granberry
@mgranberry
Nov 18 2015 04:18
the 505 firmware appears to predict some and it helps
Scott Leibrand
@scottleibrand
Nov 18 2015 04:19
I've never noticed bad results from calibrating while rising or falling. Probably isn't quite as effective as calibrating while stable, but better than not at all
Matt Pressnall
@logichammer
Nov 18 2015 04:19
We're on the peds version now but should have a 505 coming our way soon...Looks like it is more accurate during lows, too...
Scott Leibrand
@scottleibrand
Nov 18 2015 04:20
my own theory is that it's also important to calibrate at both ends of your normal variability range, so it has some data to determine the proper slope
Matthias Granberry
@mgranberry
Nov 18 2015 04:20
@scottleibrand yep. That's why I try to get some high ones in
Scott Leibrand
@scottleibrand
Nov 18 2015 04:21
if you always calibrate at 110 in the morning, it won't know if a high number is 250 or 300, but if you calibrate at 160 it will help make sure you don't end up overtreating highs
Matt Pressnall
@logichammer
Nov 18 2015 04:21
Interesting will see about doing that...
Scott Leibrand
@scottleibrand
Nov 18 2015 04:22
we've noticed a lot of new sensors will read highs as higher than actual, and lows as lower than actual, until they get enough calibration data
Jason Calabrese
@jasoncalabrese
Nov 18 2015 05:02
Yup, I can confirm that bolus iob is wrong, if I can just get these kids to bed I could fix it
Jason Calabrese
@jasoncalabrese
Nov 18 2015 05:09
Nice fixed from vim on my phone live on the pi
Scott Leibrand
@scottleibrand
Nov 18 2015 05:19
:-D
did you push to github from there too? ;-)
Matt Pressnall
@logichammer
Nov 18 2015 05:27
If I wanted to add a report called / that lives at: settings/settings.json, what would the command look like roughly? I have been making my way through / figuring out all the reports I need to add but this one doesn't seem like it would come off the pump or cgm so I'm stuck. Thanks!
as in it would be used via:
openaps report add settings/profile.json text get-profile shell settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json max_iob.json
Scott Leibrand
@scottleibrand
Nov 18 2015 05:30
that's from the pump read_settings command
Matt Pressnall
@logichammer
Nov 18 2015 05:30
merci!
Scott Leibrand
@scottleibrand
Nov 18 2015 05:41
@jasoncalabrese you want me to just merge openaps/oref0#26 and make the bIOB change in dev?
Jason Calabrese
@jasoncalabrese
Nov 18 2015 06:17
Doing it now, kids in bed and cargo box on the car
Scott Leibrand
@scottleibrand
Nov 18 2015 06:17
:)
Jason Calabrese
@jasoncalabrese
Nov 18 2015 06:19
pushed
let me update my pi before you merge if we're not going to wait on the test
Scott Leibrand
@scottleibrand
Nov 18 2015 06:20
it can wait now; just didn't want to slow @amazaheri or @eyim down
if no one sees any problems from openaps/oref0@d416bc2 I'll merge it tomorrow
Jason Calabrese
@jasoncalabrese
Nov 18 2015 06:21
in your diff above, you were using / 3, but it's just /2 instead of *2
Scott Leibrand
@scottleibrand
Nov 18 2015 06:21
yeah, the change from 3 to 2 was after that commit
your fix looks correct
Jason Calabrese
@jasoncalabrese
Nov 18 2015 06:23
next bg in 2 mins, then I'll confirm it's working live
works, good if you want to merge
Scott Leibrand
@scottleibrand
Nov 18 2015 06:29
k
merged
@eyim you can switch back to dev now and do a git pull
Jason Calabrese
@jasoncalabrese
Nov 18 2015 06:31
thanks, tring port the NS iob test now
Jason Calabrese
@jasoncalabrese
Nov 18 2015 06:59
iob tests openaps/oref0#27
eyim
@eyim
Nov 18 2015 07:08
@scottleibrand @jasoncalabrese Thank you Scott and Jason. I really appreciate the help
Scott Leibrand
@scottleibrand
Nov 18 2015 07:09
what's the difference between should and should.be in after3hDIA.iob.should.greaterThan(0); and hourLater.iob.should.be.greaterThan(0); ?
Jim Matheson
@jmatheson
Nov 18 2015 07:10
has anyone run into this error "Invalid Operation, No operations in bulk” while trying to do a ns-upload?
Dana Lewis
@danamlewis
Nov 18 2015 07:10
If anyone else has trouble keeping Pis from corrupting SD cards...highly recommend getting an extra SD card (or two) and having them pre-loaded so you can swap it out on the go without having to fix the corrupted one just then. (Not sure why I didn't do this earlier.)
Scott Leibrand
@scottleibrand
Nov 18 2015 07:14
@jasoncalabrese merged. feel free to do another PR if you want to clean up anything, but these tests are way better than nothing. thx.
Jim Matheson
@jmatheson
Nov 18 2015 07:17
i guess it is throwing the error when upload/latest-treatments.json is blank, so maybe that is fine.
Scott Leibrand
@scottleibrand
Nov 18 2015 07:17
@eyim no problem. thanks for finding the bug and helping us test the fixes. if you want to keep going down this road, we could use some more test cases to augment openaps/oref0#27 - let use know if you have any questions about how you'd go about extending that. would love to see a PR with tests replicating what you did manually today. :)
eyim
@eyim
Nov 18 2015 07:19
@scottleibrand No problem. Glad I could add some value. Would love to help out more but will take some more time on my part to understand what is needed. I've never done a pull request or even understand how the test cases are constructed and entered into a pull request so there will be some learning needed on my part
I can also confirm that the new release appears to have fixed the iob and bolus iob calc. Now if only the sensor would work I could give this thing an actual test tonight. Just getting ??? on the sensor for the last few hours.
Jason Calabrese
@jasoncalabrese
Nov 18 2015 07:24
so tempting to add support for rawbg
eyim
@eyim
Nov 18 2015 07:25
ya just one darn bad data point an hour ago causing this
Jason Calabrese
@jasoncalabrese
Nov 18 2015 07:25
not looping because your waiting on a restart sucks
would need some safety check, maybe look for a recent calibration
trying to get the console cable to work
can open a terminal, but the default pi/raspberry isn't letting me in
Jason Calabrese
@jasoncalabrese
Nov 18 2015 07:31
oh, the user is root then
think it's only a partial recovery os
Scott Leibrand
@scottleibrand
Nov 18 2015 07:32
did you fry it? should normally be the same login you use over ssh
@eyim no worries. there's a lot to learn, but you've demonstrated willingness and ability to do so, so I don't have any problem giving you a stretch goal toward actually doing some serious Pay it Forward. :)
Jim Matheson
@jmatheson
Nov 18 2015 07:33
props to @eyim for helping me :)
Jason Calabrese
@jasoncalabrese
Nov 18 2015 07:34
this is the new one
Scott Leibrand
@scottleibrand
Nov 18 2015 07:34
you'll want to fork a copy of the oref0 repo if you haven't already, and add it as a remote like you did with jason's
Jason Calabrese
@jasoncalabrese
Nov 18 2015 07:34
was going to try to avoid the hdmi crap
Scott Leibrand
@scottleibrand
Nov 18 2015 07:34
@jasoncalabrese ah. you might want to put a fresh image of jessie on it
eyim
@eyim
Nov 18 2015 07:35
@jmatheson Did you get it to work?
Jason Calabrese
@jasoncalabrese
Nov 18 2015 07:35
yeah, guess I should do that, got the card adapter for that reason
Jim Matheson
@jmatheson
Nov 18 2015 07:35
not yet! but still appreciate the help. farther along than i would have been
Scott Leibrand
@scottleibrand
Nov 18 2015 07:36
@eyim on your local repo on your pi, you can basically just copy the existing tests and start extending them with different initial conditions and expected results
there is also some documentation at https://github.com/openaps/docs/blob/dev/docs/Automate-system/validate-output.md on how to run the tests locally (it'll be the same for these new ones as for the determine-basal.test.js it talks about)
then, once you have your new tests passing, you can do a git push up to your fork, and from there you can do a pull request to pull your changes into the main openaps dev branch. that will automatically run the tests again to make sure they pass, and let us review them before merging
you can also do a similar thing with a fork of the docs repo, which allows you to make edits to the documentation on your own copy, and then do a pull request over to the openaps/docs dev branch when you're ready to merge them in. editing the https://github.com/openaps/docs/blob/dev/docs/Automate-system/validate-output.md documentation itself might also be good, to capture what wasn't obvious when you went through it.
heh, that is a lot, isn't it? ;-)
Scott Leibrand
@scottleibrand
Nov 18 2015 07:42
heck, someone could even copy and paste some of what I typed above into the appropriate places in docs and submit that as a PR, if you think it'd be helpful.
now, for me, time for bed. thx again for all your help everyone
Jason Calabrese
@jasoncalabrese
Nov 18 2015 07:43
good night
I'm going to try to get this new pi setup with Jessie before bed
then I can work on offline from the car
we don't leave till after the kids get home from school tomorrow, but going to try getting a full day of work in too
I'll sleep next week
Scott Leibrand
@scottleibrand
Nov 18 2015 07:52
Heh. See you tomorrow hopefully!
Or Thursday morning. :-)
Jason Calabrese
@jasoncalabrese
Nov 18 2015 08:04
nice Jessie is already installed, was easier than I expected
Jason Calabrese
@jasoncalabrese
Nov 18 2015 08:52
ugh, no wonder the jessie download was so big, it has openoffice on it
we need a custom image
Ben West
@bewest
Nov 18 2015 08:52
yeah
I had to remove ton of stuff
kde, gnome, x....
Jason Calabrese
@jasoncalabrese
Nov 18 2015 08:53
really like the console cable
should have done that from the start
Ben West
@bewest
Nov 18 2015 08:53
yeah, console cable is really nice
I think it's the fastest way in
Jason Calabrese
@jasoncalabrese
Nov 18 2015 09:04
think I used a different node package than the nodejs-legacy in the docs on the other pi
something more current and built for the pi
Lori
@LoriLori
Nov 18 2015 12:47
think if change
  var diaratio = dia / 3;
to 
var diaratio = 3.0 / dia;

then we need 
var bIOB = iobCalc(treatment, time, dia/2);
instead
var bIOB = iobCalc(treatment, time, dia*2);
should a target be to speed up bolus decay rather then slowing it down
Lori
@LoriLori
Nov 18 2015 13:43
This message was deleted
Scott Leibrand
@scottleibrand
Nov 18 2015 15:25
Yes, that's exactly what we just did in dev.
The * was compensating for diaratio being inverted.
Scott Leibrand
@scottleibrand
Nov 18 2015 15:38
@jasoncalabrese should we update the docs for nodejs?
eyim
@eyim
Nov 18 2015 15:52
@scottleibrand Thanks Scott for the instructions. Definitely a lot to take in and understand. I'll see what I can do
Jason Calabrese
@jasoncalabrese
Nov 18 2015 15:55
I think so, need to figure out what I used on my current pi
was something @bewest recommended 0.12.x
Jason Calabrese
@jasoncalabrese
Nov 18 2015 16:01
also made some notes to update the Jessie install
no need to waste time upgrading openoffice, should be removed before doing the apt-get upgrade
Scott Leibrand
@scottleibrand
Nov 18 2015 16:02
Agreed. Happy to update the docs.
Jason Calabrese
@jasoncalabrese
Nov 18 2015 16:03
and some notes for updating the card on the mac, was easy, but could save a few clicks
Scott Leibrand
@scottleibrand
Nov 18 2015 16:03
I always skip the formatting step and go straight to diskutil and dd
Jason Calabrese
@jasoncalabrese
Nov 18 2015 16:05
yeah, thats what I did
Matthias Granberry
@mgranberry
Nov 18 2015 16:50
I hear of all sorts of problems with the Pi. Maybe a laptop by the bed would work better for most people?
Scott Leibrand
@scottleibrand
Nov 18 2015 17:07
Pi is rock solid on wall power. It's only a problem on flaky battery power.
Jason Calabrese
@jasoncalabrese
Nov 18 2015 17:10
and they are cheap, so you can get redundancy by having several
I made the same mistake with the pi that I initialy did with the pebble, need to be more pragmatic, doesn't have to be perfect to be way better than nothing
Scott Leibrand
@scottleibrand
Nov 18 2015 17:12
Exactly.
Jason Calabrese
@jasoncalabrese
Nov 18 2015 17:15
there must be a case for the pi with a built in battery
even if it was small it could act like an ups
Scott Leibrand
@scottleibrand
Nov 18 2015 17:16
That would be nice.
Funding Unsuccessful :-(
Jason Calabrese
@jasoncalabrese
Nov 18 2015 17:20
it's a little big too, but would probably be worth it
Scott Leibrand
@scottleibrand
Nov 18 2015 17:27
A lot smaller than the batteries we use. Not sure if that project is still live somewhere else?
Matthias Granberry
@mgranberry
Nov 18 2015 17:43
does the Pi have any built-in flash? The problems mostly seem to stem from SD cards being generally terrible devices.
Scott Leibrand
@scottleibrand
Nov 18 2015 17:44
Nope. Just microSD and USB.
Jason Calabrese
@jasoncalabrese
Nov 18 2015 17:45
the edison seems like the next platform
Scott Leibrand
@scottleibrand
Nov 18 2015 17:45
We could probably mount the main partition read-only with a small scratch space.
Jason Calabrese
@jasoncalabrese
Nov 18 2015 17:45
maybe a different filesystem would help
using ext4 now, but there are lots of others
eyim
@eyim
Nov 18 2015 17:51
This message was deleted
Scott Leibrand
@scottleibrand
Nov 18 2015 17:52
Sounds like ext4 is one of the better ones.
Jason Calabrese
@jasoncalabrese
Nov 18 2015 17:54
yeah, multiple partitions might help
but there is something nice about mostly using defaults
if we do something more complicated we'd really need to make a custom image
Scott Leibrand
@scottleibrand
Nov 18 2015 18:00
Yep
and if we go that route, we might as well preload it with all the stuff we need.
eyim
@eyim
Nov 18 2015 18:01
blob
Results from last night. It wasn't until about 2:30 am that we got consistent steady readings from the Dexcom. At that point he was in a pretty good range - I think 150 or so by blood. It gave him extra insulin which ending up pushing him down too far and then the system cut basal to bring him back up. Still a work in progress but thought I would share our results
Scott Leibrand
@scottleibrand
Nov 18 2015 18:04
Nice
eyim
@eyim
Nov 18 2015 18:04
Thank you to Scott Dana and Jason for all your help.
Scott Leibrand
@scottleibrand
Nov 18 2015 18:04
Liftoff to SFO!
Ali Mazaheri
@amazaheri
Nov 18 2015 18:07
Safe travels
Lori
@LoriLori
Nov 18 2015 18:17
pi replacement Linux on Nexus 7 https://wiki.ubuntu.com/Nexus7/Installation
Dana Lewis
@danamlewis
Nov 18 2015 18:28
Wow @eyim Congrats on all of your progress!
Jason Calabrese
@jasoncalabrese
Nov 18 2015 18:34
nice @eyim
@LorelaiL I was wondering about something like that, have a general linux os is great for hacking, but running it on a phone or tablet is a great form factor
Eric
@ecc1
Nov 18 2015 18:55
@amazaheri How are you using G5 in openaps? Bridge from Dexcom's share site?
Jason Calabrese
@jasoncalabrese
Nov 18 2015 18:57
I think so, he was pulling from share service before the g5
Eric
@ecc1
Nov 18 2015 18:58
Not wild about those external comm and site dependencies ...
Jason Calabrese
@jasoncalabrese
Nov 18 2015 18:59
yeah, having it all local is ideal
I like the idea of using the pi and the NS uploader for everything
Ali Mazaheri
@amazaheri
Nov 18 2015 19:07
@ecc1 correct, I am using the bridge.
we are using Share as my son happy with just having the iPhone with him. and since we are running over night we are good so far. No receiver anymore.
Eric
@ecc1
Nov 18 2015 19:12
Thanks, and congrats on the nice results.
Ali Mazaheri
@amazaheri
Nov 18 2015 19:21
:+1:
Jim Matheson
@jmatheson
Nov 18 2015 19:27
Are there any drawbacks with @amazaheri G5 approach besides network risks? Still trying to make the call if i go G5 or G4 with my impending order.
Lori
@LoriLori
Nov 18 2015 19:28
little box capable of running linux with battery https://plus.google.com/+IanMORRISON/posts/GamZSBaCkAx
Matthias Granberry
@mgranberry
Nov 18 2015 19:36
I liked the Chumby for this kind of thing. It was terrible, but it had Linux, a loud speaker, USB ports, storage, and enough documentation to do whatever you wanted to with it. It also had 9v emergency battery option.
Scott Leibrand
@scottleibrand
Nov 18 2015 19:41
G5 should be fine for online-only usage. And @loudnate is close to having the BLE comms figured out.
Nathan Racklyeft
@loudnate
Nov 18 2015 20:24
@ecc1 I've been using the G5 receiver over USB. I have the same aversion to network dependencies.
The necessary changes can be found here: bewest/dexcom_reader#1
we'll eventually get those into a release branch that supports multiple receiver protocols. haven't had time.
Lori
@LoriLori
Nov 18 2015 20:28
fun, JS can be put on SD card of Android and there is no need to recompile Android app, it will just grab the changes
Scott Leibrand
@scottleibrand
Nov 18 2015 20:37
Awesome!
can it load them from the network too?
Jim Matheson
@jmatheson
Nov 18 2015 20:58
@loudnate nice. maybe i will go G5 after all.
Matthias Granberry
@mgranberry
Nov 18 2015 21:07
@loudnate I have some Java code I want you to run if you don't mind. I'd like to capture the record page header to see if it is possible to handle it more gracefully.
Scott Leibrand
@scottleibrand
Nov 18 2015 21:14
@bewest you coming down to Palo Alto today?
Ben West
@bewest
Nov 18 2015 21:14
yes
where should I head
Scott Leibrand
@scottleibrand
Nov 18 2015 21:14
Westin on Camino Real
Dana Lewis
@danamlewis
Nov 18 2015 21:14
Westin Palo Alto
Scott Leibrand
@scottleibrand
Nov 18 2015 21:14
Dana and I are here
Ben West
@bewest
Nov 18 2015 21:14
I'll collect mark wilson
Scott Leibrand
@scottleibrand
Nov 18 2015 21:15
cool
Ben West
@bewest
Nov 18 2015 21:15
think ken is there too
Dana Lewis
@danamlewis
Nov 18 2015 21:15
He gets here this afternoon but not sure if he's landed yet.
Matthias Granberry
@mgranberry
Nov 18 2015 21:47
@loudnate I regurgitated some extra info about the Dexcom records on the PR. It should make it easier to do it correctly if you ever decide to change up the record parser.
Eric
@ecc1
Nov 18 2015 22:27
@loudnate Instead of trying to switch on API version, can't you dynamically figure out EGV record size ((page size - header size - padding) / #records)?
Matthias Granberry
@mgranberry
Nov 18 2015 22:51
bewest/dexcom_reader#1
that's the info I just sent. It is in the XML description that is available from the device.
and the header also has information on record version so it is possible to determine which of several parsers to use
Jim Matheson
@jmatheson
Nov 18 2015 23:20
How's the meetup going?
Jim Matheson
@jmatheson
Nov 18 2015 23:39
@danamlewis @scottleibrand i am swinging by in 10min
Dana Lewis
@danamlewis
Nov 18 2015 23:40
@jmatheson cool! see you soon. turn right when you walk in, we're in the bar area with our laptops.
I might still be on hold with Dexcom, ha. (15 minutes and counting)
Ali Mazaheri
@amazaheri
Nov 18 2015 23:54
:)
chase Nate :)
Dana Lewis
@danamlewis
Nov 18 2015 23:55
I will if my backup transmitter dies - I was lucky I had a second one otherwise I would have been up a serious creek.
20 minutes. Phew. They must be slammed because of G5
Ali Mazaheri
@amazaheri
Nov 18 2015 23:56
They are indeed
Dana Lewis
@danamlewis
Nov 18 2015 23:56
"let's launch a new product and not boost our customer service capabilities"?