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

22nd
May 2018
N3FM
@N3FM
May 22 2018 03:27
@laurathiessen I have the same problem. It's a Windows 10 driver issue, for the OTA connection on the Edison Explorer board. For me, it comes up as a USB DEVICE and an RNDIS 'other device' that shows install failed. Switch to another Windows version, or switch to a Linux install, and to should do better. I have not yet found a solution...
maba76
@maba76
May 22 2018 03:58
Hi, I am trying to find an suitable Medtronic pump and noticed that most sellers are in the US. Since I am living in Australia I was wondering if any of those pump models let you change the BGL unit to mmol/l?
Cas Eliëns
@cascer1
May 22 2018 06:03
I don't think Medtronic allows you to change the display units of the pump
Cas Eliëns
@cascer1
May 22 2018 06:08
I'm having an issue where my loop can't complete because it claims my CGM data hasn't changed for 45 minutes, even though it definitely has.
The connection to nightscout works fine (in fact, it's still uploading any boluses I give)
Here's one full loop from my pump-loop.log: https://gist.github.com/cascer1/ac1d157a1ffb3d23503869a059b4f533
Dana Lewis
@danamlewis
May 22 2018 06:10
Depends on what region the pump is from, I believe. @maba76 check out the Aussie Fbk group (http://openaps.readthedocs.io/en/latest/docs/Understanding%20OpenAPS-Overview/communication-support-channels.html#facebook) and ask there - they probably have a better idea which countries you can change the units on.
@cascer1 what CGM type are you using and how do you get that data to your rig?
Cas Eliëns
@cascer1
May 22 2018 06:11
I figured maybe there was some weird data in nightscout, so I waited a while. However, it's still doing this after an entire night.
I'm using a G5 and the data is being uploaded to nightscout by xDrip
Cas Eliëns
@cascer1
May 22 2018 06:16
Monitor/glucose.json contains all my recent readings
I've been trying out the new kaleido pump and manually entering temporary basal rates in percentages into nightscout, could that somehow be messing with it?
Cas Eliëns
@cascer1
May 22 2018 08:10
I'm trying to remove those basal entries from the database, but can't find them
Cas Eliëns
@cascer1
May 22 2018 10:55
I just ran oref0-setup again and getting the same error. Both on dev and on master
Jon Cluck
@cluckj
May 22 2018 12:43
@Alzibiff what model pump are you using?
Alan
@Alzibiff
May 22 2018 13:23
It is a Medtronic Paradigm Veo 554.
WW flavour ... or is that flavor? :-)
Jon Cluck
@cluckj
May 22 2018 13:29
I think the WW pumps have the WW flavour, and the NA pumps have the NA flavor :laughing:
has your pump looped before?
Alan
@Alzibiff
May 22 2018 13:31
Oh yes! Been running with an Edison/Explorer rig for a couple of months - managed to source those after I had ordered the Explorer Hat. I have copied all of my autotune data from my Edison rig using the commands listed in the docs ... is that a bad thing?
Jon Cluck
@cluckj
May 22 2018 13:32
nope, not a bad thing!
Alan
@Alzibiff
May 22 2018 13:32
OK - just wondering whether the PiZero rig was looking for files which don't exist and one of them has 'Edison' in the filename.
Jon Cluck
@cluckj
May 22 2018 13:33
all the error messages you have after "Unsuccessful pump loop" are from the HAT status screen code, don't worry about them
the error that's causing the problem is the "Profile invalid" one
has it been repeating that same sequence of errors for a while?
Alan
@Alzibiff
May 22 2018 13:35
Just checking again ... I will post another screenshot
Jon Cluck
@cluckj
May 22 2018 13:36
:thumbsup:
Alan
@Alzibiff
May 22 2018 13:41
Screen Shot 2018-05-22 at 14.41.10.png
I moved my Edison rig away from the PiZero one and waited for a full cycle on the PiZero. Screenshot is of the most recent loop.
Jon Cluck
@cluckj
May 22 2018 13:47
ah, okay. I think I know what's happening...there are some minor differences between the way that each pump model formats data, and in mmeowlink all of those have been accounted for and fixed over the course of several years; the new Go code has only been thoroughly tested on x22/x23 because those are what the devs have :)
you might be the first person to use an x54 with this code :)
Alan
@Alzibiff
May 22 2018 13:48
Golly!
Jon Cluck
@cluckj
May 22 2018 13:49
how comfortable are you with editing files on the linux command line?
Alan
@Alzibiff
May 22 2018 13:49
Fair enough - I suspect that I am one of the first - if not THE first in the UK with the Explorer Hat. Reasonably comfortable - done a bit of RPi bits and pieces before.
Jon Cluck
@cluckj
May 22 2018 13:50
okay cool :D
can you add the following to your ~/.bash_profile and then source ~/.bash_profile?
MEDTRONIC_PUMP_ID=`grep serial ~/myopenaps/pump.ini | tr -cd 0-9`
export MEDTRONIC_PUMP_ID
MEDTRONIC_FREQUENCY=`cat ~/myopenaps/monitor/medtronic_frequency.ini`
export MEDTRONIC_FREQUENCY
(that'll allow you to run the Go commands from the command line)
Alan
@Alzibiff
May 22 2018 13:53
Added that using nano, quit and saved then run the line which you gave me beginning with source (not a clue what that does :-) )
Jon Cluck
@cluckj
May 22 2018 13:55
it will set the environment variables up so the mdt commands we're about to do for debugging will work
Alan
@Alzibiff
May 22 2018 13:55
Righty ho, fire away...
Jon Cluck
@cluckj
May 22 2018 13:56
that step will eventually make its way into the setup script whenever someone has time to write it :)
okay so do mdt model
Alan
@Alzibiff
May 22 2018 13:57
done
Jon Cluck
@cluckj
May 22 2018 13:58
did it say "554" somewhere in the output?
Alan
@Alzibiff
May 22 2018 13:58
Screen Shot 2018-05-22 at 14.58.30.png
Jon Cluck
@cluckj
May 22 2018 13:59
thanks
I'm going to paste a bunch of commands for you to test, just let me know which one produces an error (it's going to be one of them)
Alan
@Alzibiff
May 22 2018 14:00
I'm good at getting errors!
Jon Cluck
@cluckj
May 22 2018 14:01
mdt sensitivities mdt carbratios mdt targets mdt basal mdt settings
try those one at a time
it'll be fairly obvious if there's an error
Alan
@Alzibiff
May 22 2018 14:03
Screen Shot 2018-05-22 at 15.03.18.png
They all seemed to have generated errors
Jon Cluck
@cluckj
May 22 2018 14:04
haha
they crashed into your currently-running loop, so: systemctl stop cron and give it a minute or two to shut off
Alan
@Alzibiff
May 22 2018 14:05
cron stopped ... I'll wait a bit and then redo
Jon Cluck
@cluckj
May 22 2018 14:05
thanks
I need to go do a res/site change, I'll be back in a bit
Alan
@Alzibiff
May 22 2018 14:06
I'll put the kettle on
PiZero rig is still in the middle of a loop I think - I am watching the log and it is "Listening ..."
Jon Cluck
@cluckj
May 22 2018 14:16
it may have finished and not notified you
try the mdt model command to find out
if it's not done, it'll say the device is in use
Alan
@Alzibiff
May 22 2018 14:17
It still seems to be tootling away ... may have stopped now, I will have another go with those commands
Jon Cluck
@cluckj
May 22 2018 14:17
:thumbsup:
Alan
@Alzibiff
May 22 2018 14:19
They all seemed to have worked! Do you want a screenshot or two?
Jon Cluck
@cluckj
May 22 2018 14:20
yes please, one of them should have failed!
those commands were part of the "Old settings" thing that failed in the loop :laughing:
Alan
@Alzibiff
May 22 2018 14:21
First one
Screen Shot 2018-05-22 at 15.21.27.png
Second one
Screen Shot 2018-05-22 at 15.22.42.png
Next will be met_targets
Jon Cluck
@cluckj
May 22 2018 14:23
hmm, those sensitivities are out of order, that might be the issue?
okay, keep pasting :)
Alan
@Alzibiff
May 22 2018 14:24
Screen Shot 2018-05-22 at 15.23.37.png
Ahh! Next one may be the culprit MDT BASAL
Screen Shot 2018-05-22 at 15.25.02.png
For the sake of completeness, MDT SETTINGS
Screen Shot 2018-05-22 at 15.25.44.png
Jon Cluck
@cluckj
May 22 2018 14:28
yep looks like it :)
@ecc1 what info do you need for fixing that?
Jon Cluck
@cluckj
May 22 2018 14:37
@Alzibiff what are your basal rates?
Alan
@Alzibiff
May 22 2018 14:38
I have quite a few plumbed into the pump .. hang on, I will go to papertrail and pull out the autotune thingy
Screen Shot 2018-05-22 at 15.39.12.png
Jon Cluck
@cluckj
May 22 2018 14:43
that is quite a few, do you want to see if paring those down in your pump fixes the mdt basal issue?
Alan
@Alzibiff
May 22 2018 14:45
I can take out the duplicates and extend the hours so that there will be fewer actual entries. Give me a moment ...
Jon Cluck
@cluckj
May 22 2018 14:45
if not, I can add a bunch to my test rig and see what happens
okay thanks
Alan
@Alzibiff
May 22 2018 14:54
OK - done. removed the duplicated units/hour and extended the times each were active for - got rid of about 8 entries
Jon Cluck
@cluckj
May 22 2018 14:55
cool, give the mdt basal another shot
Cas Eliëns
@cascer1
May 22 2018 14:55
Update on my issue where openaps doesn't do anything because "CGM data is unchanged for the past ~45m": I just did a completely fresh install (new SD card, new raspbian, new everything) and am still getting the same issue. I thought that maybe it was caused by some weird nightscout data yesterday, but it happens even after completely removing all data from yesterday from my nightscout database.
Alan
@Alzibiff
May 22 2018 14:55
That seems to have done the trick
Jon Cluck
@cluckj
May 22 2018 14:56
:clap: sweet!
Alan
@Alzibiff
May 22 2018 14:56
Do I start the cron again now? (and if so, can you remind me of the command)
Jon Cluck
@cluckj
May 22 2018 14:56
turn your loop back on with systemctl start cron and...wait for something else to break :laughing:
Alan
@Alzibiff
May 22 2018 14:57
Here we go ...
Will this have to run for a while in order to get to a situation where all the relevant files have been produced as at the moment there are still some no file or directory errors
Jon Cluck
@cluckj
May 22 2018 14:59
it should pick up all the necessary files on the first complete loop
Alan
@Alzibiff
May 22 2018 15:01
OK - it seems to be doing more this time - it has just checked the pump clock which it didn't do before ... now a stack of numbers and whoo! That display is looking all fancy on the Explorer hat now!
Jon Cluck
@cluckj
May 22 2018 15:01
:thumbsup: yay
Alan
@Alzibiff
May 22 2018 15:04
Just need to get some magnifying glasses :-) Thank you for going through that. I quite like having hourly basals though as it enables me to observe and compare the autotune suggestions. Is this a simple fix? When I last did any programming (and it was in C - none of the sharp versions either) it was a case of declaring a bigger array
Jon Cluck
@cluckj
May 22 2018 15:05
haha yes the text size is a known issue :laughing:
I also think it's an array overflow
eric will be able to fix it when he has a chance, now that we know what it is
Alan
@Alzibiff
May 22 2018 15:08
Good stuff - thank you again. I'm off for some sun in the garden now
Jon Cluck
@cluckj
May 22 2018 15:08
you're welcome!
Eric
@ecc1
May 22 2018 15:16
@cluckj @Alzibiff I'd still like to make the Go code not panic, so just to be clear: you had 24 basal rates in your profile, one at each hour?
Will try to reproduce here (on a non-554 pump though)
Jon Cluck
@cluckj
May 22 2018 15:18
yep
Alan
@Alzibiff
May 22 2018 15:18
Yes - this made is easy to compare the autotune suggestions when looking at the papertrail logs - and make subtle changes quite quickly. Minor thing but I have always done this. Happy to trial anything anytime
Scott Leibrand
@scottleibrand
May 22 2018 15:23
@cascer1 you may want to paste the log output and possibly the last few glucose.json entries.
Jon Cluck
@cluckj
May 22 2018 15:39
he's cooking dinner, but:
Starting oref0-pump-loop at Tue 22 May 17:36:01 CEST 2018 with 23 second wait_for_silence:
Waiting up to 4 minutes for new BG: ls: cannot access '/tmp/pump_loop_completed': No such file or directory
Radio ok. Listening: .No interfering pump comms detected from other rigs (this is a good thing!)
Preflight OK. Profile less than 60m old; Profile valid. Refreshed pumphistory
Warning: setting mealCOB to 0 because currentDeviation is null/undefined
 and meal.json
Checking pump clock: "2018-05-22T17:37:22+02:00" is within 90s of current time: Tue 22 May 17:36:41 CEST 2018
Temp refreshed
Warning: Autotune has not been run. All microboluses will be disabled until you manually run autotune or add it to run nightly in your loop.
{"carbs":23,"nsCarbs":23,"bwCarbs":0,"journalCarbs":0,"mealCOB":0,"currentDeviation":null,"maxDeviation":0,"minDeviation":999,"slopeFromMaxDeviation":0,"slopeFromMinDeviation":999,"allDev$
{"iob":-0.157,"activity":-0.0009,"basaliob":-0.18,"bolusiob":0.023,"netbasalinsulin":-0.45,"bolusinsulin":2.5,"time":"2018-05-22T15:37:23.000Z","iobWithZeroTemp":{"iob":-0.157,"activity":$
{"delta":0,"glucose":160,"noise":1,"short_avgdelta":0,"long_avgdelta":0,"date":1526947253001}
null
No deliverAt found.
{"reason":"Error: CGM data is unchanged for the past ~45m. Temp 0 <= current basal 0.75U/hr; doing nothing. "}
Couldn't smb_verify_suggested
oref0-pump-loop failed. pump_loop_completed more than 15m old; waiting for 40s silence before mmtuning
Radio ok. Listening: .No interfering pump comms detected from other rigs (this is a good thing!)
lol, nevermind I found the problem
glucose.json is ordered backwards
but....why did it do that
Cas Eliëns
@cascer1
May 22 2018 15:57
And why did it suddenly begin doing it 0.o
Dana Lewis
@danamlewis
May 22 2018 16:17
What changed yesterday?
Cas Eliëns
@cascer1
May 22 2018 16:48
I'm in a trial for a new pump so I wasn't looping, got a warning that I should stop using it because of some error so I switched my rig back on to find this
Lexsus
@Lexsus
May 22 2018 16:54
.еь
Бь
Eric
@ecc1
May 22 2018 16:55
@cluckj @scottleibrand I was able to reproduce @Alzibiff 's crash when there were 24 basal rates in the profile and kind of fix it. But here's the weird thing: when I ask the pump for the basal rates, it only returns the first 21 of them, although all 24 show up in the "basal review" on the pump. I don't think this is Go-specific, that data just isn't in the response packet (but this is a 523 pump). Has anyone been looping with > 21 basal rates? @Alzibiff would you be willing to do a low-level packet capture on your rig?
Eric
@ecc1
May 22 2018 17:01
There should probably be a warning in the docs not to use too many rates ...
Cas Eliëns
@cascer1
May 22 2018 17:01
I have looped with a different rate set every hour on two different pumps
Eric
@ecc1
May 22 2018 17:01
what model pump? do you have one running now?
Cas Eliëns
@cascer1
May 22 2018 17:02
A 754 and a 554
Eric
@ecc1
May 22 2018 17:02
I'd like to see what the Python openaps command prints for your basal schedule
Cas Eliëns
@cascer1
May 22 2018 17:02
I would have one running if it weren't for this weird reverse BG thing
Eric
@ecc1
May 22 2018 17:02
You should still be able to use the "openaps use pump ..." command on it though
(I forget what the exact command is for basal profile)
Cas Eliëns
@cascer1
May 22 2018 17:03
My pump is currently not setup with all those rates, I'll setup my backup pump with some random basal profile after dinner in maybe 1-2 hours
Eric
@ecc1
May 22 2018 17:04
OK, thanks
a simple increasing rate tied to the time would be helpful (increase 0.1 every hour or whatever)
Cas Eliëns
@cascer1
May 22 2018 17:07
Alright, I'll give it a try later
Eric
@ecc1
May 22 2018 18:09
It looks like @ps2 figured this out already for Loop (as usual :-) -- long basal schedules are returned in more than one packet, so I have to add some code to handle that
Cas Eliëns
@cascer1
May 22 2018 18:15
Still need me to test anything?
Just set up an incrementing basal profile on a 522
Eric
@ecc1
May 22 2018 18:17
still curious whether the openaps python code will report all 24 basal rate entries, so if possible yes
Cas Eliëns
@cascer1
May 22 2018 18:17
alright
lemme see if I can find the command
and actually run oref0-setup so I can talk to this pump too :P
Eric
@ecc1
May 22 2018 18:19
You won't need a whole loop running, just the basic openaps settings with the pump's serial number
Cas Eliëns
@cascer1
May 22 2018 18:19
yeah I know
It's just that my current setup is already kinda broken, so I don't want to break it even more :P
we've got some floating point math issues it seems :P
Eric
@ecc1
May 22 2018 18:28
no, that's how FP works :-) (tenths and halves aren't inter-expressible)
but good to know that @bewest handled this correctly too :-) and it's just my code that's broken :-(
Cas Eliëns
@cascer1
May 22 2018 18:29
aww
In order to solve my reverse monitor/glucose.json file, should I just add a jq reverse operation before pump-loop?
Scott Leibrand
@scottleibrand
May 22 2018 18:37
are you using the latest oref0 and go code? where is the glucose data coming from again?
Cas Eliëns
@cascer1
May 22 2018 18:37
I'm not using go I think, running oref0 dev. Glucose is being uploaded to nightscout by xDrip+ from a G5
Did a completely fresh install a few hours ago, oref0 is up-to date
Scott Leibrand
@scottleibrand
May 22 2018 18:41
hmm, that's odd. "completely fresh" = reflashing jubilinux, or ?
Cas Eliëns
@cascer1
May 22 2018 18:41
yes, completely from scratch
with a new SD card
Flashed raspbian, setup wifi/ssh, and ran the install script
Scott Leibrand
@scottleibrand
May 22 2018 18:42
SD card would mean you're not using jubilinux. raspbian, k.
Cas Eliëns
@cascer1
May 22 2018 18:42
whoops, worry :)
Scott Leibrand
@scottleibrand
May 22 2018 18:43
did you use the packaged 0.6.1 install, or switch to the dev branch?
Cas Eliëns
@cascer1
May 22 2018 18:43
switched to dev
checkout dev, npm run global-install
Scott Leibrand
@scottleibrand
May 22 2018 18:45
k, looks like there's very little difference between master and dev so far anyway
Cas Eliëns
@cascer1
May 22 2018 18:45
I was experiencing the same issues on master
Scott Leibrand
@scottleibrand
May 22 2018 18:47
is your monitor/glucose.json newest-on-top or oldest-on-top?
Cas Eliëns
@cascer1
May 22 2018 18:47
oldest on top
Scott Leibrand
@scottleibrand
May 22 2018 18:48
what's your latest /var/log/openaps/ns-loop.log run look like?
Cas Eliëns
@cascer1
May 22 2018 18:49
lemme grab it, just a sec
(eventually)
Starting ns-loop at Tue 22 May 20:50:02 CEST 2018:
ns://JSON/shell/cgm/ns-glucose.json
reporting cgm/ns-glucose.json
ns://JSON/shell/settings/temptargets.json
reporting settings/temptargets.json
get-profile://text/shell/settings/profile.json
reporting settings/profile.json
Refreshed temptargetsns://JSON/shell/monitor/carbhistory.json
reporting monitor/carbhistory.json
 and meal-carbs

Uploaded
Scott Leibrand
@scottleibrand
May 22 2018 18:54
are you using xdripaps, or just online CGM data via NS?
Cas Eliëns
@cascer1
May 22 2018 18:54
online CGM data via NS
Scott Leibrand
@scottleibrand
May 22 2018 18:54
try re-running oref0-setup w/ another CGM option instead of xdripaps
Cas Eliëns
@cascer1
May 22 2018 18:55
so without --cgm=xdrip?
Scott Leibrand
@scottleibrand
May 22 2018 18:55
yeah
Cas Eliëns
@cascer1
May 22 2018 18:55
Alright, lemme give that a try
Scott Leibrand
@scottleibrand
May 22 2018 18:55
it won't necessarily fix the problem, but should make it easier to debug if not
Cas Eliëns
@cascer1
May 22 2018 18:56
running now
rebooting
Cas Eliëns
@cascer1
May 22 2018 19:01
holy crap it works
So setting --cgm=xdrip isn't required when getting BG from nightscout?
Scott Leibrand
@scottleibrand
May 22 2018 19:09
correct, the --cgm options are only for getting CGM data offline
all of those options also try to get CGM data from NS, and then use whatever is most recent
that is obviously unclear in the setup script and/or docs, so if you could PR in a clarification that would be helpful
Cas Eliëns
@cascer1
May 22 2018 19:10
Thanks for explaining, I'll add a note for it to the docs
I'd rather not touch the setup script because I don't want to break anything c:
Scott Leibrand
@scottleibrand
May 22 2018 19:11
but also, sounds like the openaps ns-loop setup for xdripaps may be broken. is anyone else still using that in 0.5.x or 0.6.x, or have all active xdripaps users already migrated to 0.7.0-dev with oref0-ns-loop?
Eric
@ecc1
May 22 2018 19:18
Given how many headaches we have with chronological versus reverse-chronological order, I wonder if it isn't worth the few CPU cycles to just sort rather than assume
Scott Leibrand
@scottleibrand
May 22 2018 19:20
we very explicitly don't want to sort them
because doing so breaks things badly when you change the pump time
if the pump had any concept of absolute time, we would use it, but all we have to go on is the ordering of the CGM records and the pump time change events. sorting breaks that.
Eric
@ecc1
May 22 2018 19:34
right, good point
A simple heuristic like comparing first and last entry times could provide a more sensible error message though
Scott Leibrand
@scottleibrand
May 22 2018 19:46
yeah, lots of things we could do to improve error checking.
Eric
@ecc1
May 22 2018 21:31
I've added but not yet released support for multi-packet basal profiles (> 21 entries). But the current code doesn't fail, it just silently skips the remaining ones, which could be a danger if anyone's basal rates change dramatically during that period.
Correction, it does fail (hard, with a panic). So maybe it will be OK until I push a new release
lschuirmann
@lschuirmann
May 22 2018 23:01

Hi all, it's my first time running autotune (on a mac) since the new updates. I've run it successfully many times before, but I am getting this error message:

-bash: syntax error near unexpected token `]'

I double checked profile.json - could it still be that? Any other troubleshooting ideas? Thanks!

Scott Leibrand
@scottleibrand
May 22 2018 23:16
Context?
lschuirmann
@lschuirmann
May 22 2018 23:20
@scottleibrand this is immediately after running autotune on mac, following the command that begins
oref0-autotune --dir=~/myopenaps
Scott Leibrand
@scottleibrand
May 22 2018 23:23
Please just paste the context. The command you ran, and its output, all together. That way I’m not guessing.
lschuirmann
@lschuirmann
May 22 2018 23:27
Nathaniels-MacBook-Pro:settings NWV$ cp profile.json pumpprofile.json
Nathaniels-MacBook-Pro:settings NWV$ oref0-autotune --dir=~/myopenaps --ns-host=https://mynightscout.com [--start-date=2018-05-20] [--categorize-uam-as-basal=true|(false)]
-bash: syntax error near unexpected token `]'
only thing I changed was my actual nightscout url
Scott Leibrand
@scottleibrand
May 22 2018 23:30
You’re not supposed to include the []’s
lschuirmann
@lschuirmann
May 22 2018 23:31
around start-date and --catergorize, etc?
Scott Leibrand
@scottleibrand
May 22 2018 23:32
Remove all of them, ya.
lschuirmann
@lschuirmann
May 22 2018 23:35
cool, thanks!! sorry that was so obvious :)