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

9th
Nov 2015
Oskar Pearson
@oskarpearson
Nov 09 2015 00:23
With Medtronic sensors.. Has anyone noticed a weird time-travel effect when calibrating?
We just calibrated - and the latest glucose information is now two hours in the future
It seems like it might be a decoding-care link interpretation issue or something
It happened to us once before, but I just figured I was going mad ;)
I'm planning on pulling the data pages into a ticket if there isn't one already
Scott Leibrand
@scottleibrand
Nov 09 2015 00:28
I haven't heard of that. saving the pages for Ben to look at sounds like a good next step
Oskar Pearson
@oskarpearson
Nov 09 2015 00:28
Will sort it
Oskar Pearson
@oskarpearson
Nov 09 2015 00:34
So weird.. Went to try grab the data pages and it's now come right..
Scott Leibrand
@scottleibrand
Nov 09 2015 00:34
magic
Oskar Pearson
@oskarpearson
Nov 09 2015 00:40
Timetravel2.jpeg
Oskar Pearson
@oskarpearson
Nov 09 2015 00:47
Timetravel.jpeg
Note that the time it happened was 00:13 on the 9th of November 2015... but the time of the glucose is 02:43 on the same day.. ie in the future
eyim
@eyim
Nov 09 2015 01:41
@jasoncalabrese Thanks Jason for your help on downloading the data from nightscout. In case anyone is following along I had to make the script executable with the command sudo chmod +x (file name) and then in the device args field I had to correctly tell it where to find the script
Jason Calabrese
@jasoncalabrese
Nov 09 2015 01:46
I'm planning to switch to using ns-get tonight, but even for other things later being able to run an arbitrary script is nice. You probably needed the full path since ~/bin isn't in your path, you could add that in your .bashrc and your crontab
Jason Calabrese
@jasoncalabrese
Nov 09 2015 02:45
changed my ns-bgnow to use ns-get, but think there's probably a better way
have this alias get-ns-bgnow = ! bash -c "openaps use ns-bgnow shell | json -e 'this.glucose = this.sgv' > 01.monitor/glucose.json"
the ns-bgnow is just a device/ini with something like
[device "ns-bgnow"]
fields =
cmd = ns-get
args = entries.json https://SITE.com
would be nice to invoke that
and get the json -e 'this.glucose = this.sgv' and > 01.monitor/glucose.json out of the alias
Scott Leibrand
@scottleibrand
Nov 09 2015 02:48
The latter would be done by making it a report.
Jason Calabrese
@jasoncalabrese
Nov 09 2015 02:48
but where would the json -e stuff go
need 2 reports?
Scott Leibrand
@scottleibrand
Nov 09 2015 02:49
Or put it into ns-get?
Jason Calabrese
@jasoncalabrese
Nov 09 2015 02:49
or change oref0 to look for sgv if there isn't a glucose
Scott Leibrand
@scottleibrand
Nov 09 2015 02:50
Ya, probably easy enough.
Jason Calabrese
@jasoncalabrese
Nov 09 2015 02:50
probably in several places
Jason Calabrese
@jasoncalabrese
Nov 09 2015 03:03
Scott Leibrand
@scottleibrand
Nov 09 2015 03:08
easy enough. and while we're at it that function also needs a rewrite to fix the TODO at https://github.com/openaps/oref0/blob/dev/bin/oref0-determine-basal.js#L78
Jason Calabrese
@jasoncalabrese
Nov 09 2015 03:22
why's it going back 4 points
instead of using last 2
have all the interpolation in NS
Scott Leibrand
@scottleibrand
Nov 09 2015 03:23
I use the 15m average delta too
for calculating deviation, for example
interpolating is easy once you can reliably read datestamps. there is no time (or timezone) parsing code in this part of oref0 yet
so need to get that added
Jason Calabrese
@jasoncalabrese
Nov 09 2015 03:25
wouldn't use the system time, would use the times on the records
Scott Leibrand
@scottleibrand
Nov 09 2015 03:26
yeah, only place we need to compare record time to system time is in the "is the data from within the last ~15m" check
Jason Calabrese
@jasoncalabrese
Nov 09 2015 03:26
so many warnings in intellij
Scott Leibrand
@scottleibrand
Nov 09 2015 03:26
yeah, I'm sure it could use a lot of cleanup
the unit tests are fairly bare-bones right now too
Jason Calabrese
@jasoncalabrese
Nov 09 2015 03:27
trying not to get in too deep and focus on making it work
but should do a little cleanup as we can
Scott Leibrand
@scottleibrand
Nov 09 2015 03:27
and still need iob.js unit tests if we're going to stick with that function, or need to switch to @loudnate's IOB calculator (which is python)
Jason Calabrese
@jasoncalabrese
Nov 09 2015 03:27
wanted to use dcalc for iob
share it with NS
get temps in the iob
Scott Leibrand
@scottleibrand
Nov 09 2015 03:28
what is dcalc anyway?
Jason Calabrese
@jasoncalabrese
Nov 09 2015 03:28
also get the dependencies in place
Scott Leibrand
@scottleibrand
Nov 09 2015 03:28
just a name for where we put all this stuff?
or is actually a thing already?
Jason Calabrese
@jasoncalabrese
Nov 09 2015 03:28
Ben started adding to it
will be so nice
get all the calculators well tested
Scott Leibrand
@scottleibrand
Nov 09 2015 03:29
so the former then, k
Jason Calabrese
@jasoncalabrese
Nov 09 2015 03:29
consistent between NS and oref0
Mark Wilson
@mddub
Nov 09 2015 03:59
@jasoncalabrese @bewest @scottleibrand et al: pushed an initial "release" (install and customization instructions) to https://github.com/mddub/nightscout-graph-pebble if you're interested in giving it a try
Dana Lewis
@danamlewis
Nov 09 2015 04:00
Nice!
Scott Leibrand
@scottleibrand
Nov 09 2015 04:01
:+1:
eyim
@eyim
Nov 09 2015 04:08
Okay I now am getting real data from Nightscout so ran the openaps loop. I changed the settings since I am not connecting to his real pump so that it should recommend a temp basal and give him some insulin. But it doesn't because max_iob is 0. Looking through the code I realized that I needed a max_iob.json file to set this to something other than 0. I did that and set it to 3 but even after rerunning everything max_iob still says 0. max_iob.json is in my main openaps folder and in the openaps.ini file I have as one of the inputs for report oref0-predict/profile.json I have max-iob = max_iob.json which seems to match what others have done. But after rerunning everything it still says that max_iob = 0. Did I miss something else?
Ali Mazaheri
@amazaheri
Nov 09 2015 04:12
make sure u r not passing carb ratios as parameter
This message was deleted
This message was deleted
This message was deleted
This message was deleted
This message was deleted
we originally added carb ratios.to get-profile.js but removed it as its not being used
Scott Leibrand
@scottleibrand
Nov 09 2015 04:21
you're probably not passing max_iob.json to get-profile correctly
eyim
@eyim
Nov 09 2015 04:22
removing the carb ratios parameter fixed it thank you @amazaheri
Scott Leibrand
@scottleibrand
Nov 09 2015 04:22
ah, cool
how did you end up getting set up with carb ratios?
was that from an old version of something, or is there still something in there that points to that?
people keep getting tripped up by that, and I'm not sure what still needs fixing
eyim
@eyim
Nov 09 2015 04:23
yes i think it was left over from before oref0 when I was trying stuff
Scott Leibrand
@scottleibrand
Nov 09 2015 04:23
k
I didn't do a very good job of making that a backwards compatible change: sorry
Ali Mazaheri
@amazaheri
Nov 09 2015 04:26
well it was my fault to add it originally to begin with lol
Scott Leibrand
@scottleibrand
Nov 09 2015 04:26
heh
Ali Mazaheri
@amazaheri
Nov 09 2015 04:27
so rotten eggs my way 🙏
Scott Leibrand
@scottleibrand
Nov 09 2015 04:27
well, it was my fault before that for not thinking of bolus snooze sooner and putting carb absorption rate in the original reference design... ;-)
Ali Mazaheri
@amazaheri
Nov 09 2015 04:28
🙈🙉🙊
Scott Leibrand
@scottleibrand
Nov 09 2015 04:29
lol
Dana Lewis
@danamlewis
Nov 09 2015 04:35
All my fault cause I got diabetes ;)
Scott Leibrand
@scottleibrand
Nov 09 2015 04:36
;-)
And cause you went on that first date with me. ;-)
Ali Mazaheri
@amazaheri
Nov 09 2015 04:40
lol
gitter app on Windows Phone sucks
Scott Leibrand
@scottleibrand
Nov 09 2015 04:41
s/on Windows Phone//
Dana Lewis
@danamlewis
Nov 09 2015 04:41
And Ali would have never learned to TAB TAB ;)
Ali Mazaheri
@amazaheri
Nov 09 2015 04:43
what a coincidence look what adds I got
Capture.PNG
Dexcom and BMW lol
Scott Leibrand
@scottleibrand
Nov 09 2015 04:44
Heh nice. But I think you're doing it wrong not using an ad-blocker. :)
Ali Mazaheri
@amazaheri
Nov 09 2015 04:45
lets see what else they know about me, the dark side of the force
Ali Mazaheri
@amazaheri
Nov 09 2015 04:46
:)
Toby Canning
@TC2013
Nov 09 2015 14:03

@mgranberry

@TC2013 you have Android medtronic pump interaction working, or is that a no go because of kernel issues?

Android works well with the CareLink. I'll add you to my repo if you want to look through anything
Chris Oattes
@cjo20
Nov 09 2015 15:02
does anyone happen to know what kind of CPU the dexcom receivers use?
Jason Calabrese
@jasoncalabrese
Nov 09 2015 15:16
Screen Shot 2015-11-09 at 7.13.56 AM.png
openaps still doesn't know about boluses to the real pump, but it's making a nice skyline
also since upgrading to the dev version of openaps I haven't seen the stick or wifi dongle get stuck
Dana Lewis
@danamlewis
Nov 09 2015 15:22
Sweet
Jason Calabrese
@jasoncalabrese
Nov 09 2015 15:24
going to NY for work early tomorrow morning and then not back till Friday, so probably won't get to do much till next weekend, frustrating since I think with a full day I could be ready to run it for real
Lori
@LoriLori
Nov 09 2015 15:30
@cjo20 DexCom receivers is at91sam92
Chris Oattes
@cjo20
Nov 09 2015 15:34
@LorelaiL thanks
Oskar Pearson
@oskarpearson
Nov 09 2015 16:26
BTW: After countless issues with the Raspberry Pi power failing due to the dodgyness of micro-usb (and ensuring git corruption), I solved it last night by soldering a USB input directly onto the board
I didn’t solder directly onto the polyfuse, as apparently the wrong temperatures can damage it. I soldered onto pp1/2 and pp3 instead
Jason Calabrese
@jasoncalabrese
Nov 09 2015 16:31
are you running the current (dev) version of openaps, I think there are fixes that help with both the stick/usb port and git corruption
Oskar Pearson
@oskarpearson
Nov 09 2015 16:32
If you’re feeling confident in your upstream power supply, you could do it directly to the 5v input pins on the pi, and possibly gain some energy efficiency. I’m not sure if the newer pi’s fix this problem: http://hackaday.com/2012/06/30/raspberry-pi-power-regulator-transplant-reduces-power-consumption/ but it would mean you’re not powering through the inefficient regulator if you go directly to the pins
I wanted to keep flexibility, so I kept things going through the regulator
@jasoncalabrese Apparently so, yep. Our issue is that the usb input just generally seemed dodgy. The box would lose power often as it got banged around in bags etc.
So not only would it corrupt, but it’d go off for periods of time
I’ve not updated to the latest openaps yet. Definitely on my todo
Jason Calabrese
@jasoncalabrese
Nov 09 2015 16:34
I was having lots of issue with the stick needing to be unplugged and didn't see how it would ever work, but since updating I haven't seen it happen again, but it could just be luck
Oskar Pearson
@oskarpearson
Nov 09 2015 16:34
Oh great - that sounds like a positive change indeed
Scott Leibrand
@scottleibrand
Nov 09 2015 17:06
A simpler non-solder solution is just to get a console cable and plug it into the GPIO pins. It provides power, and those pins are a lot more solid than the microusb input.
Scott Leibrand
@scottleibrand
Nov 09 2015 18:21
But sounds like that is only safe if you trust the input voltage and current from your power source (a computer, for example)...
eszcloud
@eszcloud
Nov 09 2015 19:17
What does "status": "error" mean?
Scott Leibrand
@scottleibrand
Nov 09 2015 19:17
Where?
eszcloud
@eszcloud
Nov 09 2015 19:18
in the status of the pump
e.g.:
 ~/myopenaps $ openaps use pump status
{
  "status": "normal",
  "bolusing": false,
  "suspended": false
}
eszcloud
@eszcloud
Nov 09 2015 19:26
the bigger context is that I did a fresh install to upgrade to Jessie, but the loop isn't updating as often as it should, so I'm going back through everything
Ali Mazaheri
@amazaheri
Nov 09 2015 19:26
what is the pump model and software ver?
eszcloud
@eszcloud
Nov 09 2015 19:28
mm522 v2.4A 1.1
Ben West
@bewest
Nov 09 2015 19:43
if status says error it means the pump is in some alarm state currently
you can press esc/act to dismimss
eszcloud
@eszcloud
Nov 09 2015 19:45
ok
would that hang up commands that come after that?
Scott Leibrand
@scottleibrand
Nov 09 2015 19:55
depends on the nature of the alarm
low reservoir doesn't stop temp basals
Ben West
@bewest
Nov 09 2015 19:56
if the open circle is present due to some alarm state, then status: "error" will be set
eszcloud
@eszcloud
Nov 09 2015 19:58
gotcha. thanks!
Jason Calabrese
@jasoncalabrese
Nov 09 2015 20:51
100 Test OpenAPS.png
Dana Lewis
@danamlewis
Nov 09 2015 20:52
Pretty :)
Jason Calabrese
@jasoncalabrese
Nov 09 2015 20:52
if only it was real...
cgm data is
still exciting to watch
eyim
@eyim
Nov 09 2015 21:21
Very nice - seeing it on nightscout makes it a lot easier to understand what is happening. Is there documentation on how to push the info to Nightscout?
Dana Lewis
@danamlewis
Nov 09 2015 21:26
This message was deleted
Scott Leibrand
@scottleibrand
Nov 09 2015 21:28
not yet. we've pasted some stuff here in channel, if you want to go spelunking for it..
openaps alias add upload-recent-treatments '! bash -c "openaps format-latest-nightscout-treatments && test $(json -f upload/latest-treatments.json -a created_at eventType | wc -l ) -gt 0 && (ns-upload $NIGHTSCOUT_HOST $API_SECRET treatments.json upload/latest-treatments.json ) || echo \"No recent treatments to upload\""'
openaps alias add format-latest-nightscout-treatments '! bash -c "nightscout cull-latest-openaps-treatments monitor/pumphistory-zoned.json settings/model.json $(openaps latest-ns-treatment-time) > upload/latest-treatments.json"'
openaps alias add latest-ns-treatment-time '! bash -c "nightscout latest-openaps-treatment $NIGHTSCOUT_HOST | json created_at"'
Jason Calabrese
@jasoncalabrese
Nov 09 2015 21:42
I'm doing almost the same except I have a device for ns-upload with an ini for the host and secret
but bugs me that upload/latest-treatments.json isn't from invoking a report
Scott Leibrand
@scottleibrand
Nov 09 2015 22:12
yeah, you could make that a device and report if you want. I figure data upload isn't something that really needs to be auditable though
as long as the raw data being uploaded is
Jason Calabrese
@jasoncalabrese
Nov 09 2015 22:33
Eventual BG 126>100 but Delta +1 < BGI 0 / 2; no temp to cancel that doesn't seem right 1 < 0?
Scott Leibrand
@scottleibrand
Nov 09 2015 22:36
yeah, that's not the whole story
it's also comparing avgdelta to bgi/2
so if you're down from 15m ago, it will avoid high-temping even if you uptick
I haven't gone through to fix all the reason fields to mention avgdelta if that was the determinant
Jason Calabrese
@jasoncalabrese
Nov 09 2015 22:38
good
Scott Leibrand
@scottleibrand
Nov 09 2015 22:38
was hoping someone would volunteer to write tests at some point
Jason Calabrese
@jasoncalabrese
Nov 09 2015 22:38
I'll write tests as I go
Scott Leibrand
@scottleibrand
Nov 09 2015 22:39
cool
and feel free to fix up the reasons while you're at it. :)
Jason Calabrese
@jasoncalabrese
Nov 09 2015 22:40
took the basal visualizations and pushing to NS to really get me going, did feel like I could really understand what was going on before
Scott Leibrand
@scottleibrand
Nov 09 2015 22:41
yeah, that was a big advance in usability
thx again for everything you did to make that happen
Jason Calabrese
@jasoncalabrese
Nov 09 2015 22:42
think if everything goes right i can try running for real Saturday night, getting more sets this week