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

5th
Feb 2018
jquitos
@jquitos
Feb 05 2018 03:24
@ecc1 Thanks! I'll try that but may need some help on how to add the "sleep" in. For now it worked again after I went through the entire set up of 1 of the rigs... I just took my chances to see if it would work and when my son went to a friends house I was happy to see that it was working again
Sacha M
@coolestkidsever
Feb 05 2018 06:02
Hi all, i can't seem to get BT connecting (or starting in cron i think).. If i ask it to connect manually, it will (via putty). but if I try and get it to connect from the phone, it doesnt... does anyone know where to go to start looking into this? I've been using instructiosn from http://openaps.readthedocs.io/en/latest/docs/Customize-Iterate/bluetooth-tethering-edison.html?highlight=bluetooth
Sacha M
@coolestkidsever
Feb 05 2018 06:16
I can get it to connect ok if i run sudo bt-pan client XX:XX:XX:XX:XX, but I can't run that when out and about to get it to connect
Dave Acklam
@dcacklam
Feb 05 2018 06:41
BTW, a thought with oref0 and the Pi Zero W: If you want to speed up execution, run as root & cut out all the 'sudo' calls for stuff like bluetooth..
@coolestkidsever You can't initiate a BT pan from the phone's bluetooth connect screen.
It's supposed to connect automatically when you are off wifi (there is a script that runs on a schedule (cron) that checks connectivity and runs bt-pan client ... for you).
It has to be initiated from the rig to the phone, not the other way around
Sacha M
@coolestkidsever
Feb 05 2018 06:45
@dcacklam yeah, sorry that's what I mean, whilst I know that i can get a connection if i force it via putty... it's not connecting automatically like it should ...
Scott Leibrand
@scottleibrand
Feb 05 2018 06:53
@dcacklam isn’t sudo a no-op running as root? How much CPU time does it take to check perms before switching to running the commands? It can’t be much.
Dave Acklam
@dcacklam
Feb 05 2018 06:55
Not much, but load averages are in the 2-3.xx range... CPU 60-90pct....
This is a pi zero w with gpio SRF (slice of radio)
Scott Leibrand
@scottleibrand
Feb 05 2018 07:03
We’re working on that in hardware-dev with @ecc1's go based loop toolkit
We’ve got it down to sub-2m loops, so should even be able to underclock it to 70% or so to save power.
live4sw
@live4sw
Feb 05 2018 07:30
Just had a weird experience, hoping someone might have some thoughts tomorrow. I woke up a bit high after having a fairly high protein meal for dinner, sometimes this happens since my max_IOB on my nighttime rigs is 2 and sometimes that's just not enough and I need to wake up and bolus a little manually.
So, through easy bolus I dial up 1.5, I may have first dialed up 2 and then cancelled, but then I enact a 1.5. Ten minutes later I check my pump and see a 1.5U bolus at 2:12am, but then also a 0.9U bolus at 2:12am as well. This makes no sense because I always use Easy Bolus, and that's in 0.5U increments.
Even weirder, my openaps log from the rig by my bed says: Feb 05 02:14:20 [rig name] ns-loop.log: [{"duration":0,"bolus":{"_type":"Bolus","_description":"Bolus 2018-02-05T02:12:01 head[4], body[0] op[0x01]","timestamp":"2018-02-05T02:12:01-05:00","_body":"","programmed":1.5,"_head":"010f0f00","amount":2.4,"duration":0,"type":"normal","_date":"018c420512"},"timestamp":"2018-02-05T02:12:01-05:00","created_at":"2018-02-05T02:12:01-05:00","eventType":"Correction Bolus","insulin":2.4,"notes":"Normal bolus (solo, no bolus wizard).\nCalculated IOB: 1.624\nProgrammed bolus 1.5\nDelivered bolus 2.4\nPercent delivered: 160%","medtronic":"mm://openaps/mm-format-ns-treatments/Correction Bolus","enteredBy":"openaps://medtronic/522","_id":"[removed]"},{"_type":"NewTimeSet","_description":"NewTimeSet 2018-02-05T02:12:33 head[2], body[0] op[0x18]","timestamp":"2018-02-05T02:12:33-05:00","_body":"","_head":"1800","_date":"218c024512","medtronic":"mm://openaps/mm-format-ns-treatments/NewTimeSet","created_at":"2018-02-05T02:12:33-05:00","enteredBy":"openaps://medtronic/522","eventType":"Note","notes":"NewTimeSet 522 ","_id":"[removed]"},{"_type":"ChangeTime","_description":"ChangeTime 2018-02-05T02:12:33 head[2], body[0] op[0x17]","timestamp":"2018-02-05T02:12:33-05:00","_body":"","_head":"1700","_date":"218c024512","medtronic":"mm://openaps/mm-format-ns-treatments/ChangeTime","created_at":"2018-02-05T02:12:33-05:00","enteredBy":"openaps://medtronic/522","eventType":"Note","notes":"ChangeTime 522 "}]
Note the "Percent delivered: 160%"
live4sw
@live4sw
Feb 05 2018 07:35
Screenshot 2018-02-05 at 2.34.51 AM.png
And my reservoir readings indicate that I went from 48.8 prior to the bolus to 47.2 three minutes after, consistent with a 1.5U bolus (and 0.1U of basal).
So, I'm kind of confused. Wondering what might have happened.
live4sw
@live4sw
Feb 05 2018 07:55
A look at each of the prior instances (from the past 7 days) of "Percent delivered" of >100% are all situations that are consistent with a microbolus being issued around the same time as an easy bolus at mealtime, or two easy boluses being done in succession (e.g., me deciding that I needed a little more at mealtime). This is the only time it's happened away from mealtime, and what is weird is that the reservoir readings are consistent with 1.5U being delivered, as intended, and not 2.4U (1.5 + the 0.9 mystery #)
Tim Street
@tim2000s
Feb 05 2018 08:51
If you look at the bolus history on the pump, what does it say?
live4sw
@live4sw
Feb 05 2018 11:59
A 0.9U bolus at 2:12A, and then a 1.5U bolus at 2:12A. Which is weird because first of all my easy boluses are in 0.5U increments only, I don't remember starting a bolus and then stopping at 0.9U, and there was no microbolus at that time. So it's just weird to think of where that came from.
live4sw
@live4sw
Feb 05 2018 12:37
The 0.9U bolus says User Entry: 1.5U, Stopped at: 0.9U
That's consistent with me having entered a second 1.5U easy bolus and then suspending it, and then doing a full 1.5U easy bolus, but the reservoir readings in OpenAPS are only consistent with a single 1.5U easy bolus. So still a mystery. If there's no way to figure it out I'll just chalk this up something weird happening late at night and just continue watching. But more than a little weird.
peterfulvi
@peterfulvi
Feb 05 2018 12:48
enableSMB_always,enableSMB_after_carbs,allowSMB_with_high_temptarget,maxSMBBasalMinutes
Are those the preferences. I didn't see them in mine as you see above. Do I just add them with the default values? I heard that I can just do the math in bolus wizard and just do a portion of the bolus with the easy Bolus and the SMB would do the rest. That is approach once I iron this issue out.
Dana Lewis
@danamlewis
Feb 05 2018 17:59
@peterfulvi make sure you understand each of the preferences you're adding. In the docs here: http://openaps.readthedocs.io/en/latest/docs/While%20You%20Wait%20For%20Gear/preferences-and-safety-settings.html#oref1-related-preferences
Yes, you would add them to preferences if you wanted to add them.
Sławomir Malinowski
@sarunia
Feb 05 2018 18:08
@ecc1 See our updated tables and please let me know if you notice any mistake, but it should be ok. Will sequence # be the next number of the sent sequence in the range 0 ... 0xFF?- we think YES. Next CRC-8 is counted for the all sequence, starting from ID 0xA6 up to sequence #. The calculated CRC-8 is added at the end of this sequence and the whole is then coded with b4b6 and after coding and appending synchro, start and end it is sent to the transmitter. https://www.imageupload.co.uk/image/E24V
Eric
@ecc1
Feb 05 2018 18:15
The RF remote uses the same sequence number and retransmits a packet as long as that button is pressed. It increments the sequence number the next time a button is pressed.
Also, in the radio chips I'm familiar with, the hardware takes care of adding the preamble bits and sync word at the beginning of the transmission, and the firmware only needs to send the "body" of the packet.
see for example the data sheet of the TI CC1101, which I think is what the remote uses (I might be wrong)
Sławomir Malinowski
@sarunia
Feb 05 2018 18:49
@ecc1 Eric, how you think if the Paradigm VEO (754) with 3.1E firmware has any possibility of controlling the basal by the remote control? Is this completely blocked in the pump by the manufacturer?
Eric
@ecc1
Feb 05 2018 18:54
No, x54 requires firmware 2.6A or lower (or <= 2.7A if Canadian), according to http://openaps.readthedocs.io/en/latest/docs/Gear%20Up/pump.html
Oh, wait. With a registered remote control it might still be possible (the above info is for CareLink protocol). Don't know
Try it and report back!
Dana Lewis
@danamlewis
Feb 05 2018 18:58
you have to get into PC Connect mode, which does not last long
Scott Leibrand
@scottleibrand
Feb 05 2018 18:59
our understanding is that the remote control can only issue boluses and suspends, not temp basals, so can't be used to safely control the pump (because you have no way to lower insulin delivery without risking DKA if you lose comms). If you can figure out a way to issue temp basal opcodes by emulating a remote, that would be a big breakthrough on making newer pumps usable.
Sławomir Malinowski
@sarunia
Feb 05 2018 18:59
My daughter is currently using the AC Combo pump with remote control, we recently got a new VEO pump and I set myself a goal to make this pump a completely new remote with an OLED graphic display. We want to implement in the code all possible parameters for sending and receiving from the pump including CGM.
Scott Leibrand
@scottleibrand
Feb 05 2018 19:00
I don't know if anyone has tried all the opcodes we use in normal Carelink-emulation mode (what we use for looping) in Remote-emulation mode.
Eric
@ecc1
Feb 05 2018 19:03
Seems unlikely, based on the structure of the RF remote's packets (no place for parameters, unless the decoding is done differently for different command codes)
Sławomir Malinowski
@sarunia
Feb 05 2018 19:03
Maybe we will use a random number generator in the commands and see if the pump will react to something, but at the same time I would not want to spoil it.
Eric
@ecc1
Feb 05 2018 19:05
you can just brute-force all 256 possible ones and see if you get any response. that's the other thing -- since the remote is TX-only, the only acknowledgment in the protocol is a beep from the pump ...
Sławomir Malinowski
@sarunia
Feb 05 2018 19:07
In my project will be transceiver.
Eric
@ecc1
Feb 05 2018 19:18
but the pump wont' transmit anything in response to a remote (A6) packet, only in response to a CareLink (A7) packet
and those definitely have the firmware limitations
(I guess I'm making an assumption there; I never actually listened for a radio response, but I suppose the engineers could have done something odd)
Sławomir Malinowski
@sarunia
Feb 05 2018 19:21
Yes I know about it, the carelink functionality will be included in the new remote controller.
Scott Leibrand
@scottleibrand
Feb 05 2018 19:57
the point we're trying to make is that if you're using the Carelink (A7) protocol, you won't be able to send temp basal commands to a 3.1E firmware pump: you'll need one with a lower firmware version. so unless you can figure out how to set a temp basal with an A6 packet (and then read it back with a subsequent A7), there's no way to safely loop with that pump.
phoenixflame611
@phoenixflame611
Feb 05 2018 20:09
Is autotune supposed to be changing basal patterns automatically or do I need to copy those settings into the pump manually?
Dana Lewis
@danamlewis
Feb 05 2018 20:10
it does not change the pump. if you want to update your baseline pump settings to allow it to tune further, you should do that manually.
autotune creates a profile that is used for looping, though, so you are looping off the tuned basals if you're running autotune on your rig.
phoenixflame611
@phoenixflame611
Feb 05 2018 20:13
I am. So if I change the pump pattern, will that negativly affect the autotune profile being used for looping?
Dana Lewis
@danamlewis
Feb 05 2018 20:14
it won't "negatively" affect. but it won't be used until the next autotune run (so, 4am for the automatic run), or you can run it manually to have it take the new profile from the pump into account sooner and tune from there.
phoenixflame611
@phoenixflame611
Feb 05 2018 20:15
Roger. I'll pull that when I get home (ssh doesn't work on my Edison for some reason, so console only for now) so it can tune me better. It's been pegged at max allowed basal most of today, so I'm thinking basals definitely need an adjust.
Dana Lewis
@danamlewis
Feb 05 2018 20:16
:+1: yea, check your autotune and it should be clear if you're running into the caps, which is another sign you might want to bump the pump basals.