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

3rd
Feb 2016
dougtakeuti
@dougtakeuti
Feb 03 2016 00:20
Not quite sure why I can't retrieve the latest enlite cgm data from pump:
pi@raspberrypi:~/jujuba $openaps use bombadajuju iter_glucose 2
[
  {
    "packet_size": 4,
    "name": "SensorTimestamp",
    "raw": "15-a8-22-10",
    "date": "2016-02-02T21:40:00",
    "date_type": "minSpecific",
    "_tell": 1,
    "op": "0x08"
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 6,
    "sgv": 112,
    "date": "2016-02-02T21:43:00",
    "packet_size": 0,
    "op": 56
  },
  {
    "name": "GlucoseSensorData",
    "date_type": "prevTimestamp",
    "_tell": 7,
    "sgv": 114,
    "date": "2016-02-02T21:38:00",
    "packet_size": 0,
    "op": 57
  }
]pi@raspberrypi:~/jujuba $ openaps use bombadajuju read_clock
"2016-02-02T22:16:05"
I can read the glucose values on the pump screen - it was 113 at 22:16 - but not retrieve those values since 21:43
Jason Curry
@mccgm
Feb 03 2016 01:13
fatal: loose object c87254086d3474ed562061d01b2f5d8c47273501 (stored in .git/objects/c8/7254086d3474ed562061d01b2f5d8c47273501) is corrupt'
I suspect a git corruption
Jason Curry
@mccgm
Feb 03 2016 01:35
Do I start from scratch now or is there a fix?
Dana Lewis
@danamlewis
Feb 03 2016 01:36
Have you tried a git reset?
Kevin Wells
@wkcwells
Feb 03 2016 02:14
A git reset should take care of it. I have to reset git regularly - usually when power is interrupted.
At some point I hope to dig in to understand why git is in a vulnerable state for big chunks of time making it so easy to hit this (that’s an assumption, but something unnecessary/bad is going on).
I am running without the reset scheduled on the loop, and I only have to manually reset git when I lose power.
Jason Calabrese
@jasoncalabrese
Feb 03 2016 02:17
I have the reset in a cron, running every minute so no manual fixing needed
Ben West
@bewest
Feb 03 2016 02:30
it's worth using the oref0-fix-git-corruption instead of the reset
Scott Leibrand
@scottleibrand
Feb 03 2016 02:34
The reset does that first.
It only actually resets if it's unrecoverable.
Ben West
@bewest
Feb 03 2016 02:39
ah, nice
Jason Curry
@mccgm
Feb 03 2016 02:58
OK, I tried the reset and now everything seems back to normal. "PanicMode":"OFF"
Still monitoring my Cron'd loop. If all goes well this evening, tonight will be my first closed loop night.
Jason Calabrese
@jasoncalabrese
Feb 03 2016 03:00
on the branch I'm working on I updated the readme so we can link to individual plugins
etc
so now we could link from openaps docs to the right place in the NS readme
Dana Lewis
@danamlewis
Feb 03 2016 03:11
Excellent @jasoncalabrese
@logichammer ^^^ for your Pr in progress on NS stuff
Jason Calabrese
@jasoncalabrese
Feb 03 2016 03:13
I think I'm done with nightscout/cgm-remote-monitor#1487 unless anyone wants to test it before I merge
@eyim did you try it after updating oref0 to get the hostnames?
eyim
@eyim
Feb 03 2016 03:49
@jasoncalabrese Yes I've been testing it for the past couple of days. It looks good to me. No issues
Thank you for doing that!
Matt Pressnall
@logichammer
Feb 03 2016 03:59
Sorry, @danamlewis , getting ready to get out of town / snow camping slowed me down but I have merged all those changes in...should be good to go!
openaps/docs#80
Aaron Michelson
@Aaybob
Feb 03 2016 04:01
I wore the automatic pancreas all day and all night twice. The first day the pump battery got too low and was off for four hours, the second day my last code change before leaving for work meant it wasn't running all day and when I got home I further wrecked it and it won't run or connect to network now. Its like having a friend helping with diabetes when its working. It fully realizes the potential of the pump by making the insulin delivery changes I would if I had that much time and focus.
Dana Lewis
@danamlewis
Feb 03 2016 04:07
:)
Jason Calabrese
@jasoncalabrese
Feb 03 2016 04:09
thanks for testing it @eyim I'm going to merge it now since I've been running in in my prod site for a couple days
JaysonEwer
@JaysonEwer
Feb 03 2016 04:17
@scottleibrand, yes, G4 505. It went well, unfortunately, my loop has been down for almost the whole day. I think I have a few different problems. I'm having issues connecting headless, something going on with wireless, I still need to iron out git, probably need a oref0-fix-git-corruption, I'm unable to communicate with the upgraded G4-505 now as well. I just did a manual restart. It was a clean /snob/shutdown -r now, but haven't been able to get back into it headless since. :-/
Aaron Michelson
@Aaybob
Feb 03 2016 04:18
I fixed it ,,, instead of mm-stick I had mm -stick and that oref0 command makes me manually reconnect to network
Aaron Michelson
@Aaybob
Feb 03 2016 06:15

Is something wrong with this? When I put preflight in the loop alias it fails. Loop works without preflight and preflight works alone. in the loop preflight says preflight ok but the loop echoes its error message

preflight = ! bash -c "rm -f monitor/clock.json && openaps report invoke monitor/clock.json && grep -q T monitor/clock.json && echo PREFLIGHT OK || echo PREFLIGHT FAIL; exit 1"
loop = ! bash -c "( openaps preflight && openaps gather && openaps enact) || echo IF PREFLIGHT WAS OK THEN ENACT OR GATHER ERROR"

Jason Calabrese
@jasoncalabrese
Feb 03 2016 06:20
maybe your preflight isn't returning an ok value, you can test it with openaps preflight && echo ok || echo not ok
if it's returning 0 it should echo ok
Aaron Michelson
@Aaybob
Feb 03 2016 06:26
that says "not ok" after PREFLIGHT OK from the code
Jason Calabrese
@jasoncalabrese
Feb 03 2016 06:44
think you might need some ()'s
so it ends with echo PREFLIGHT OK || (echo PREFLIGHT FAIL; exit 1)
Aaron Michelson
@Aaybob
Feb 03 2016 06:53
yes of course
John Males
@johnmales
Feb 03 2016 07:56
@juliatakeuti hi I've had exactly the same issue - enlite data retrieved from the pump is hours old, looking at the pump itself the cgm data is up to date. In my case the last reading I could retrieve was at 2240, and then nothing until about 0530 the next morning. I don't know why it happened or why it restarted. Definitely a concern though.
Scott Leibrand
@scottleibrand
Feb 03 2016 08:09
Probably more page boundary issues.
Jason Calabrese
@jasoncalabrese
Feb 03 2016 08:09
I think I have something working that will switch my pis and edisons back home wifi when it available to avoid staying on the hotspot, but it feel overly complicated, if anyone has better ideas let me know
* * * * * ( (wpa_cli status | grep Creeper > /dev/null && echo already on Creeper) || (wpa_cli scan > /dev/null && wpa_cli scan_results | egrep Creeper > /dev/null && wpa_cli select_network $(wpa_cli list_networks | grep Creeper | cut -f 1) && echo switched to Creeper && sleep 15 && (for i in $(wpa_cli list_networks | grep DISABLED | cut -f 1); do wpa_cli enable_network $i > /dev/null; done) && echo and re-enabled other networks) ) 2>&1 | logger -t wifi-select
John Males
@johnmales
Feb 03 2016 08:10
@scottleibrand is there a workaround?
Jason Calabrese
@jasoncalabrese
Feb 03 2016 08:10
in this case our home network is Creeper, kids get to name everything...
Scott Leibrand
@scottleibrand
Feb 03 2016 08:12
Dunno. @bewest might.
Jason Calabrese
@jasoncalabrese
Feb 03 2016 08:13
I played with the wpa supplicant priority setting, but it doesn't cause a lower priority network to be dropped
and select_network does a weird thing where it disables the other networks, and I needed to reenable then, but it you do it too soon the network change doesn't stick
Jim Matheson
@jmatheson
Feb 03 2016 08:27
@jasoncalabrese it would be good if it would swap to any non mobile that was available for those of us with #firstworldproblems
Jason Calabrese
@jasoncalabrese
Feb 03 2016 08:28
yeah, that what I'm trying to do, seems like it works, but also feel too complicated
there must be a better way
dougtakeuti
@dougtakeuti
Feb 03 2016 12:35
@johnmales thanks for letting me know. What is weird is that the other reports seemed fine. Now, does it affect just cgm data or other time-dependent info such as the reporting of bolus insulin? I couldn't tell if it was affecting iob as Julia was asleep and had had her last meal several hours earlier (I do pump history for the previous 4 h, as dia is 3 h). How often have you observed this kind of problem and have you noticed if it also affects iob?
JaysonEwer
@JaysonEwer
Feb 03 2016 13:00
I've currently got two different G4 receivers involved in my Nightscout/OpenAPS environment. I've got my older G4 without share plugged into my pi, I upgraded it to the 505 code yesterday, it's working well. For whatever reason, ive also got a G4 with share that I carry with me for backup. This is the one I've got uploading to my Nightscout site. Is it possible to have more than one upload of cgm data to NS? I was hoping to see how much of a difference there was in the older G4 505 and the newer G4-with share. I guess I'm looking for a way to upload directly from my Pi, has that been done before? I honestly thought that was going to start working when I got the uploads working, but it has not. The other reason I'm asking this is in the last couple days I've had issues with my Bluetooth share going offline.
at some point I see myself moving forward with the Edison setup. So I would end up using my share receiver anyway. I'm not sure what I was thinking with having two different G4 receivers involved. Perhaps I should just move forward with my G4 share and forget about the older receiver.
Jason Calabrese
@jasoncalabrese
Feb 03 2016 14:29
You can upload both to NS, but it can screw up deltas and forecasting some do it's not something you'd want to do long term
There's a oref0 till to convert the data and then you'll need to upload to the sgv endpoint, not sure if it's in the OpenAPS docs or not
JaysonEwer
@JaysonEwer
Feb 03 2016 14:31
Thank you, sir. I think I'll just move to the G4 with share. Thanks.
Jason Calabrese
@jasoncalabrese
Feb 03 2016 14:34
One thing that you can also do is have a share receiver plugged into the pi and also connect to it with ble
Then the loop always has data, even if ble drops
JaysonEwer
@JaysonEwer
Feb 03 2016 14:35
Yeah, that's what I was thinking I'd do. Then move to the Edison. :-D
Is the Edison working well for you?
I should have my TI stick on Friday. I may try to get the Edison by the weekend as well.
Jason Calabrese
@jasoncalabrese
Feb 03 2016 14:37
It works but I don't fully trust it yet, sometimes range with the ti stick is really good, but sometimes seems worse than carelink, I need to do more testing
Did you get the sparkfun board?
JaysonEwer
@JaysonEwer
Feb 03 2016 15:12
Oh yeah, not yet, I need to order that today.
Rachel Sandlain
@audiefile
Feb 03 2016 15:18
@JaysonEwer I second @jasoncalabrese suggestion. I keep my share plugged into the pi and then use xdrip app to upload to nightscout. Its worked very well for me for months.
Elliott
@esteward
Feb 03 2016 15:28
Is there a gitter/Slack channel for those that are trying to close the loop with an Animus Ping or Omni Pod pump?
Matthias Granberry
@mgranberry
Feb 03 2016 15:29
@audiefile @JaysonEwer I have a JVM-based uploader for dexcom receivers that I could package up too. It only consumes ~80m of RAM on the desktop (and 4 on Android) so it would probably work on the Pi. If anyone is interested I can make a release.
Jason Calabrese
@jasoncalabrese
Feb 03 2016 16:01
@JaysonEwer you can use the ti stick with the intel board, but it requires soldering, but the benefit will be much lower battery use
JaysonEwer
@JaysonEwer
Feb 03 2016 16:02
Lower battery use with the soldering vs using sparkfun?
Dana Lewis
@danamlewis
Feb 03 2016 16:28
@esteward As mentioned, there is a slack channel. Will send you the invite.
Jason Calabrese
@jasoncalabrese
Feb 03 2016 16:34
@JaysonEwer yes, usb uses a lot of extra power
Toby Canning
@TC2013
Feb 03 2016 16:41
@sulkaharo I'm thinking that perhaps a reboot resets the charging timer... ??? If yes, then its a pretty easy work around. Either way, our unit is running all day no problem with whatever charge time it is getting.
Jim Matheson
@jmatheson
Feb 03 2016 17:01
@JaysonEwer I am using ble / share exclusively to get my bg into NS. I’ve also ran into some issues. I am not sure how much is ble and how much is the share app dropping connection and doing a poor job reconnecting when switching from wifi to 4g. Have you noticed any particular cases where drops are happening?
JaysonEwer
@JaysonEwer
Feb 03 2016 17:25
I've been working from home the last couple days. I have not upgraded my iPhone 6s to the latest version either.
It could be the share2 app.
Jim Matheson
@jmatheson
Feb 03 2016 17:40
yeah, the G5 app seems to drop connection to the server sometimes which drops the feed to NS (which does not backfill later) which drops the loop. It’s more of an annoyance than anything since it takes 10 mins to figure out that there was a problem. then open the G5 app, click on the share icon and it usually reconnects.
JaysonEwer
@JaysonEwer
Feb 03 2016 17:50
Having a healthy battery in the pump seems to be a good thing. :-). I also caved and upgraded my Azure to the shared plan. NS seems to be much slower/ less responsive now. I still plan to get the NS-DEV deployed in my Heroku site since that seems to be working for you, @jmatheson
JaysonEwer
@JaysonEwer
Feb 03 2016 17:55
I've got my G4 with share in the loop now, im confident that will cause a better response to some of my crazy lows that I've been running into. I'll be good for 6-12 hours, loop doing its thing, everything looks ducky and then in a matter of 30-45 min I'm below 60 and then back up over 100. The loop can only do so much to prevent that, right? I'm fiddling with basalt a couple hours before those lows, which helps, but it also causes highs later. At least that's what it seems is happening. These crazy lows happen just about 12 hours apart from each other too.
Matthias Granberry
@mgranberry
Feb 03 2016 17:58
@JaysonEwer you've verified that they are actually low? I was recently having trouble with too much dinner insulin triggering lows out at about 3.5-4h from the meal where it looked like a basal issue but wasn't. It might be something like that.
30m isn't enough time to prevent a low with basal insulin
JaysonEwer
@JaysonEwer
Feb 03 2016 18:01
Yes, I have verified the low, I can feel myself getting low and then I check, while I'm watching NS and my Dexcom. I think I might need to get creative with how I'm doing my basals through the day and then let the loop keep things under control.
Matthias Granberry
@mgranberry
Feb 03 2016 18:04
It's risky to use it as a crutch. Look for patterns. I've found that delayed-onset hypoglycemia can trigger that kind of a dip especially if it's during meal-time insulin. For me it's usually about 9h after intense exercise if I don't eat a lot of carbs before the 9h window
Matthias Granberry
@mgranberry
Feb 03 2016 18:26
@JaysonEwer 12h+ of fasting can also sometimes cause very rapid drops without additional insulin, but they tend not to be predictable. This sounds like residual meal-time insulin. My body can keep me stable at 85 for 30-40 minutes in the presence of (a smallish amount of) extra insulin, but when whatever it is that's keeping me up runs out I'll drop quite rapidly, Ususally the answer is to look for something to explain the drop. I'd love to have a graph that allows me to compare basal IOB (or activity) alongside meal IOB (activity). I've written a quick hack in d3.js to do it and it was very informative for WTF troubleshooting.
it used a stacked area graph to show IOB from stacked boluses and a fixed-volume basal approximation. It made it really clear what was going on.
maybe it's time for me to look into what it takes to write a nightscout report
JaysonEwer
@JaysonEwer
Feb 03 2016 18:47
Sweet, that's some very good information @mgranberry . When I was diagnosed in 1987, my pediatrician, who also had T1D said that he and I had a relatively rare type of graph that is very predictable through the day and night. It like two very gradual humps in a 24 hour period. I hadn't thought about this statement from him in over 20 years until I had the awesome Nightscout visibility at my finger tips. These slow gradual humps "theoretically" worked nicely with the NPH twice a day because
Ben West
@bewest
Feb 03 2016 19:08
@jasoncalabrese the daemon I'm working on should allow responding to network events
what you've got is not the worst thing I've seen
any cleaner method will be at least as involved
the daemon will handle all the boiler-plate, but I do need to know variety of use cases
basically going to create system wide event bus for openaps/NS, can make it sensitive to networking and hardware events, (drive [from] pebble to/from PI as well)
Jason Calabrese
@jasoncalabrese
Feb 03 2016 19:12
I like the mix of event and ticker in NS
Ben West
@bewest
Feb 03 2016 19:13
it'll also offer nice API to determine status/progress of openaps/looping
yeah, it'll be very similar, actually
Jason Calabrese
@jasoncalabrese
Feb 03 2016 19:13
guess you could have a ticker for dbus
Ben West
@bewest
Feb 03 2016 19:13
the core I' working on is a schedulemanager
it'll allow listing/creating named tickers/timers
that'll generate events on those tickers, so imagine we'll create several for variety of phases and things
thinking you'll be able to associate those events with openaps-do commands, basically will execute any number of high level openaps commands
Jason Calabrese
@jasoncalabrese
Feb 03 2016 19:14
yeah, some things are nice to have a fixed schedule that you can expect
Ben West
@bewest
Feb 03 2016 19:15
so map the "monitor every 5" event to openaps do monitor-stuff clean-up emit-monitored
Jason Calabrese
@jasoncalabrese
Feb 03 2016 19:15
but new BG events help keep the system real-time
Ben West
@bewest
Feb 03 2016 19:15
but it'll manage $n of those, and emit events for every thing openaps does along the way
so easy to create plugin to use the API/listen to events
Jason Calabrese
@jasoncalabrese
Feb 03 2016 19:16
the ticker is just backup
when there are no events
or things that don't need to be done each time, settings, etc
JaysonEwer
@JaysonEwer
Feb 03 2016 21:22
Has anyone played with monit before? https://mmonit.com/monit/
Scott Leibrand
@scottleibrand
Feb 03 2016 21:28
We've used it at work... What are you thinking?
John Males
@johnmales
Feb 03 2016 21:35
@juliatakeuti Hi just one episode where the downloaded glucose values were hours old, even though the readings displaying on the pump were current. All the other reports appeared to be downloading correctly. I know there has been discussion of issues with medtronic data pages as @scottleibrand mentioned, but I don’t know how to diagnose or fix if this is the case.
JaysonEwer
@JaysonEwer
Feb 03 2016 21:37
@scottleibrand it seems like it's functionality might fit into the conversation @bewest and @jasoncalabrese were having earlier, but I don't have any experience with it.
Scott Leibrand
@scottleibrand
Feb 03 2016 21:40
generally monit, supervisord, etc. are used to keep a daemon running. you still have to write a daemon to actually do what you want, though.
JaysonEwer
@JaysonEwer
Feb 03 2016 21:50
Ah, ok.
Jason Curry
@mccgm
Feb 03 2016 23:02
First overnight last night and the line was super smooth. So cool.
Dana Lewis
@danamlewis
Feb 03 2016 23:13
:+1:
Do you have Nightscout visualization working, or what are you using?
Jim Matheson
@jmatheson
Feb 03 2016 23:38
wow, my entire 3 hour graph has a minimum bg of 89 and max of 93. i actually thought there was a a problem and the same reading kept getting passed in to NS.
Dana Lewis
@danamlewis
Feb 03 2016 23:39
:) :) what’s your temp basal history look like? was it busy?
Jim Matheson
@jmatheson
Feb 03 2016 23:42
i wish it was more busy. just a 15 min temp to zero and a 5 minute temp to zero.
Dana Lewis
@danamlewis
Feb 03 2016 23:42
pretty stable then
Jim Matheson
@jmatheson
Feb 03 2016 23:43
yeah. my basal profile must be vastly improved after tweaking it after those first couple of days.
or just lucky
Dana Lewis
@danamlewis
Feb 03 2016 23:43
did you tweak as a result of observing openaps?
Jim Matheson
@jmatheson
Feb 03 2016 23:44
i did. i had a basil jump at 2pm and i moved it up to 10:30am (or something like that)
Dana Lewis
@danamlewis
Feb 03 2016 23:45
been toying with the idea of integrating some basal recommendations stuff, before starting active closed looping somehow…as part of the phase approach. (aligning with some of @dm61’s suggestions, too)
Jim Matheson
@jmatheson
Feb 03 2016 23:45
i am really bad at typing basil instead of basal
Scott Leibrand
@scottleibrand
Feb 03 2016 23:46
is basil kinda like cinnamon? ;-)
Jim Matheson
@jmatheson
Feb 03 2016 23:46
it’s kind of like a rasberry pie.
Dana Lewis
@danamlewis
Feb 03 2016 23:46
Thus, I’m randomly curious about who happened to do that coincidentally, and who didn’t do it (because they didn’t need to, or because they didn’t see big patterns, or didn’t pay attention?). i didn’t see a discernable pattern when I started looping that enabled me to tweak basals, but I’m handicapped by having been using #DIYPS for a year prior to looping, so helpful to hear experiences like this.
:D
Jim Matheson
@jmatheson
Feb 03 2016 23:48
yes, i think that it is a good idea. i watched my readings plus what oref0 was doing for the first 3 days. if i saw anything consistent that i could separate from food or exercise i planned to change basal. i’ve only made that one change so far, but there may be more.