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

12th
Jul 2016
Jason Calabrese
@jasoncalabrese
Jul 12 2016 00:00
you'd want 2 rigs or at least 2 different directories
Martin Haeberli
@mhaeberli
Jul 12 2016 00:10
@jasoncalabrese thx then how to switch between them? only actually run the loop on one or the other ?
Jason Calabrese
@jasoncalabrese
Jul 12 2016 00:18
or swap pump.ini files
I'm doing that with openxshareble, I symlink cgm.ini to cgm1.ini or cgm2.ini to swap receivers
Martin Haeberli
@mhaeberli
Jul 12 2016 00:20
cool - any thoughts on running medtronics carelink for pump-a and mmeowlink for pump-b at least for testing purposes on the same instance?
Jason Calabrese
@jasoncalabrese
Jul 12 2016 00:21
I'd just get another pi, but you'll also get interference between them
Dana Lewis
@danamlewis
Jul 12 2016 00:21
we highly recommend getting one rig working. people who go multiple directions at once tend to take a lot longer ;) to get a basic working rig going.
it's really hard to setup a good test environment, I haven't been able to keep one working that is realistic
so I think most people test with live pumps / rigs and manual commands and log watching
Martin Haeberli
@mhaeberli
Jul 12 2016 00:31
@jasoncalabrese btw, where do I find an ERF now - the UK supplier’s page for that product seems to be broken … ?
Jason Calabrese
@jasoncalabrese
Jul 12 2016 00:37
they aren't being produced anymore, but I saw someone was using just the srf part of the erf with a pi zero
and no antenna
both my erfs stopped working
Paul Martin
@Spazholio
Jul 12 2016 00:49
What kind of range do you get with the ERF? I know that it varies from chip to chip, but….
(and has anyone managed to get the new ERF chips working yet?)
Dana Lewis
@danamlewis
Jul 12 2016 00:49
better than carelink, less than TI
Paul Martin
@Spazholio
Jul 12 2016 00:51
No, I get that much. I think I’ve used those exact lines before, actually. :) But has anyone done any testing to give some possible meter/feet/whatever ranges?
Dana Lewis
@danamlewis
Jul 12 2016 00:53
@Spazholio ;p
Jason Calabrese
@jasoncalabrese
Jul 12 2016 00:53
but to me an edison still makes more sense than a pi zero
Chris Oattes
@cjo20
Jul 12 2016 00:53
@jasoncalabrese did you get a chance to try the loop with json -E?
Jason Calabrese
@jasoncalabrese
Jul 12 2016 00:53
not yet
Paul Martin
@Spazholio
Jul 12 2016 00:54
That SRF is the same chip as what’s on the ERF board, right?
Jason Calabrese
@jasoncalabrese
Jul 12 2016 00:55
yeah, check his twitter account, I think there was a link to a gist or github repo
Scott Leibrand
@scottleibrand
Jul 12 2016 00:59
@Spazholio really hard to give good range numbers measured in distances, since comms reliability is so sensitive to noise
Paul Martin
@Spazholio
Jul 12 2016 01:00
@scottleibrand Fair enough.
Scott Leibrand
@scottleibrand
Jul 12 2016 01:00
probably the best you could do would be to figure out average range for a given RSSI, and not try to calibrate it to whether or not you get reliable comms
Paul Martin
@Spazholio
Jul 12 2016 01:02
Ok, so if the ERF isn’t being sold anymore, why don’t people use the SRF chip? It’s the same thing, and it seems simple enough to wire up...
Chris Oattes
@cjo20
Jul 12 2016 01:04
With my TI stick, sometimes it can't read 6" away, other times I'm fine halfway across my flat
Paul Martin
@Spazholio
Jul 12 2016 01:04
(I can NOT stop looking at how simple and beautiful that freaking Pi Zero rig is!)
@cjo20 Really? Mine’s been pretty rock solid. Then again, it’s always in my pocket, next to my pump. But this TI stick’s been a champ so far.
Chris Oattes
@cjo20
Jul 12 2016 01:05
It's mostly fine at home. There's something dodgy going on at work tohugh
I keep on meaning to take in my SDR so I can work out what.
and tell them to stop it.
Martin Haeberli
@mhaeberli
Jul 12 2016 01:06

so 2.4A 722 : tried

openaps use pump set_clock --to 2016-07-12T01:02:00

but the pump time did not change… however, I was able to suspend, for example...

Paul Martin
@Spazholio
Jul 12 2016 01:06
Oddly enough, at home I’m having more issues. I have wireless home automation though, and have NO clue if it works on a competing/similar frequency.
Jason Calabrese
@jasoncalabrese
Jul 12 2016 01:07
yeah, I think one of my neighbors has an old cordless phone, there are some times where a few inches is to far away, but then others when it works through walls
Paul Martin
@Spazholio
Jul 12 2016 01:08
Set up a Faraday cage around your entire residence. You won’t be able to receive cell signal anymore, but it’s a small price to pay for the occasional pump-communications-drop-off, eh?
Jason Calabrese
@jasoncalabrese
Jul 12 2016 01:09
I'd rather find the source and give them a new phone
Chris Oattes
@cjo20
Jul 12 2016 01:10
New Edison tomorrow :D I wonder how long until I blow this one up
Paul Martin
@Spazholio
Jul 12 2016 01:10
HAH!
Dana Lewis
@danamlewis
Jul 12 2016 01:10
@jasoncalabrese lol
Jason Calabrese
@jasoncalabrese
Jul 12 2016 01:10
I saw there were some sdr apps for android, might be good to set that up
Chris Oattes
@cjo20
Jul 12 2016 01:11
Hopefully I can get my new edison set up / soldered / in a case in time for holiday
Paul Martin
@Spazholio
Jul 12 2016 01:11
How much does something like a handheld SDR cost? Or something I can use with my iPhone?
Jason Calabrese
@jasoncalabrese
Jul 12 2016 01:13
Martin Haeberli
@mhaeberli
Jul 12 2016 01:15
I had mmeowlink working with the TI stick on an RPi, but the machine rebooted (and I have a Carelink back on it, too). the mmeowlink was not found any more - I had tried using the recommendation to set up : /etc/udev/rules.d/90-mmeowlink.rules but somehow I can no longer find the device … suggestions welcome ...
Paul Martin
@Spazholio
Jul 12 2016 01:16
If you have the Carelink instead of the TI stick, you’ll have to change the port in pump.ini, I think.
Martin Haeberli
@mhaeberli
Jul 12 2016 01:27
@Spazholio empirically, for some reason, after reboot, the tty for the TI stick was : /dev/ttyACM0 vs /dev/ttyACM1 - for some reason, the udev alias is not working
Paul Martin
@Spazholio
Jul 12 2016 01:31
I think mine has ALWAYS been /dev/ttyAMA0
Martin Haeberli
@mhaeberli
Jul 12 2016 01:51

on the test pump, trying to:

openaps use pump set_temp_basal { "temp": "absolute", "rate": 0.1, "duration": 60 }

fails

usage: openaps-use [-h] [--format {text,json,base,stdout}] [--output OUTPUT]
                   [--version]
                   device ...
openaps-use: error: unrecognized arguments: temp: absolute, rate: 0.1, duration: 60 }
(obviously, NOT on a live pump on a live patient)
Dan Piessens
@dpiessens
Jul 12 2016 01:53
Oh @Spazholio if your automation is X10 it's on a competing frequency depending on the house code
Dan Piessens
@dpiessens
Jul 12 2016 02:00
Not sure if anyone else has tried this but I got everything working on an edison flashed with Jubilinux (note the J). By everything I mean battery status, pump with TI stick and openxshareble
For me the kicker was that kernel gave me battery status
Chris Oattes
@cjo20
Jul 12 2016 02:02
everything includes bluetooth internet connection sharing?
Paul Martin
@Spazholio
Jul 12 2016 02:04
@dpiessens It’s actually Zwave. Model HA07. Looking it up now...
Dan Piessens
@dpiessens
Jul 12 2016 02:04
That I haven't tried yet, I've been trying to rewrite the bluetooth for the G5. I was making good progress until my transmitter died and stupid FedEx has my new sensors at a sort facility 15 miles away for the last 48 hours
</rant> :)
Paul Martin
@Spazholio
Jul 12 2016 02:04
"908.40 MHz, 916.00 MHz"
Chris Oattes
@cjo20
Jul 12 2016 02:04
Hate it when that happens
also, there is now a tool that reads battery voltage on Yocto and Ubilinux
Paul Martin
@Spazholio
Jul 12 2016 02:05
@dpiessens That’s when I call them. “Don’t put it on the truck, I’ll be there in a few.” They’re usually happy to hold it. Also, I’m staggeringly impatient. =)
Dan Piessens
@dpiessens
Jul 12 2016 02:05
On Ubilinux? I thought the kerenel didn't support it
Paul Martin
@Spazholio
Jul 12 2016 02:05
Yeah, well…@cjo20 wrote it. =)
Chris Oattes
@cjo20
Jul 12 2016 02:06
so did the rest of the internet :)
Paul Martin
@Spazholio
Jul 12 2016 02:06
We forgot to tell him it wasn’t suported, so he went ahead and did it before we could tell him. =)
Dan Piessens
@dpiessens
Jul 12 2016 02:06
@Spazholio this location is Milwaukee's airport so there's no pickup :(
Paul Martin
@Spazholio
Jul 12 2016 02:06
(ssssh, no one tell him about connman not BT tethering on Ubi!)
Dan Piessens
@dpiessens
Jul 12 2016 02:07
I was just ready to say that!
Chris Oattes
@cjo20
Jul 12 2016 02:07
https://github.com/cjo20/EdisonVoltage/ I'd recommend ignoring the server stuff, just make voltage
Dan Piessens
@dpiessens
Jul 12 2016 02:07
is there a good guide for BT teathering I could try? I haven't done it before with the edison
Chris Oattes
@cjo20
Jul 12 2016 02:08
I've played with bluetooth already, didn't get anywhere. I'm probably going to use yocto once my new edison arrives, at leaast until after my holiday
Dan Piessens
@dpiessens
Jul 12 2016 02:09
So the problem I had with yocto is that aidafruit_ble for python doesn't install
if you don't need to connect to the CGM via bluetooth then yocto should work fine. Nice on the voltage utility, I didn't realize the ADC data was coming in on a difference device, nice!
Chris Oattes
@cjo20
Jul 12 2016 02:12
Thanks. I still can't believe noone else found it
Jason Calabrese
@jasoncalabrese
Jul 12 2016 02:16
Is there a way to detect when the Edison stops charging? After hitting the time limit?
Chris Oattes
@cjo20
Jul 12 2016 02:17
I don't know. Maybe.
I need to do more logging and testing when I've actually got an edison
Paul Martin
@Spazholio
Jul 12 2016 02:21
It’s totally possible. Completely. 100%.
cough
Spazholio @Spazholio waits for @cjo20 to work his magic again...
Chris Oattes
@cjo20
Jul 12 2016 02:22
I suspec the voltage starts oscillating when it's full
or timed out
Paul Martin
@Spazholio
Jul 12 2016 02:24
I don’t quite know how to phrase this, but…I’ve noticed odd voltage usage patterns. Like, going from 100% - 80% happens incredibly quickly, but then the percentages stop falling so quickly and even out. That’s normal for LiPo batteries, isn’t it?
Chris Oattes
@cjo20
Jul 12 2016 02:24
The percentage figure is compeltely arbitrary, it's something I made up based on a best guess
What I need to work it out properly is a few battery runs from full to dead
Jason Calabrese
@jasoncalabrese
Jul 12 2016 02:26
It's 100 when plugged in, as soon as it's unplugged the voltage drops, for me send like 94% is max
*seems like
Chris Oattes
@cjo20
Jul 12 2016 02:27
It will be unique per battery, but it should be possible to work out a reasonable average curve. Plugged in should be constant across all devices, the number it drops to after will depend on the battery
What I'm aiming for is to work out a percentage calculation that roughly gives the amount of time remaining in the battery
Jason Calabrese
@jasoncalabrese
Jul 12 2016 02:28
I like that it doesn't stay at 100%
Makes it clear that something happened
Chris Oattes
@cjo20
Jul 12 2016 02:29
So if you know your battery lasts for 12 hours, and it says 50%, you've got about 6 hours left
Yeah. And most people probably don't care about 90-100%, it's just "That's a mostly full battery". 10% -> 0% is quite important to get right.
Jason Calabrese
@jasoncalabrese
Jul 12 2016 02:30
I'm using a 2000mAh, so main issue is using more than the Edison can charge without needing to be unplugged
Chris Oattes
@cjo20
Jul 12 2016 02:30
Because of the 6 hour charge limit?
Jason Calabrese
@jasoncalabrese
Jul 12 2016 02:30
Yeah
Paul Martin
@Spazholio
Jul 12 2016 02:30
Wait, the what now?
Chris Oattes
@cjo20
Jul 12 2016 02:30
No way round that without replacing resistors, afaik
The problem with the intel breakout is that it's set at 190mA charging current, which is low for a 2000 mAh battery
@Spazholio the charging cuts out after 6 hours to protect the battery
I think if you're using a 2000 mAh battery you want closer to 400mA charging current
Jason Calabrese
@jasoncalabrese
Jul 12 2016 02:32
If I could detect when that happens could have a notification
Paul Martin
@Spazholio
Jul 12 2016 02:32
Is that an Adafruit limitation or an Edison breakout board one?
Chris Oattes
@cjo20
Jul 12 2016 02:32
That one is an edison breakout one, it doesn't control what external chargers do
(another reason I want to make my own board, I can set the charging current appropriately)
Jason Calabrese
@jasoncalabrese
Jul 12 2016 02:33
Just extra bulk, another thing to break
Paul Martin
@Spazholio
Jul 12 2016 02:34
Interesting. But a simple un/re-plug should reset it, right?
It explains why my charging light is always amber in the morning, instead of green.
Jason Calabrese
@jasoncalabrese
Jul 12 2016 02:34
Yeah, the light flashes
Paul Martin
@Spazholio
Jul 12 2016 02:34
Oh. My light’s never blinking. Should it?
Chris Oattes
@cjo20
Jul 12 2016 02:35
@jasoncalabrese I've got about 3/4 of a design with a battery charger and console port and proper header for TI stick. It'd replace the intel breakout.
@Spazholio Are you talking about your adafruit board?
Paul Martin
@Spazholio
Jul 12 2016 02:35
Oh, yeah. Which is connected to my Edison.
I think I just got confused for a moment.
Tim Mecklem
@tmecklem
Jul 12 2016 02:47
wow. Just paired a pi zero to an iPhone’s internet connection. I feel like some kind of bluetooth ninja.
Dan Piessens
@dpiessens
Jul 12 2016 02:50
nice, what utility did you use on the pi side?
Martin Haeberli
@mhaeberli
Jul 12 2016 02:58
what is providing bluetooth on the Pi Zero side?
Tim Mecklem
@tmecklem
Jul 12 2016 03:00
bluez 5.37
with the test-network script at the moment. I wanted to see if it worked as a POC
(I have a cheap IO Gear bluetooth adapter)
Martin Haeberli
@mhaeberli
Jul 12 2016 03:02
thx
Tim Mecklem
@tmecklem
Jul 12 2016 03:02
My eventual goal is to have bluetooth provide the internet via a PAN and connect to the dexcom, and use the Slice of Radio to communicate with the pump.
Then I’m only using the single USB port and the uart on the GPIO header
What do people normally use to keep a steady link to the internet on their rigs?
Paul Martin
@Spazholio
Jul 12 2016 03:04
Constant WiFi presence, and barring that, WiFi hotspot on my iPhone.
Tim Mecklem
@tmecklem
Jul 12 2016 03:04
do you have it connect automatically to your phone?
and do you connect it to hotspots in public places?
Paul Martin
@Spazholio
Jul 12 2016 03:05
As long as I have the hotspot ready to go, yes.
And no, I have no way of doing that.
Tim Mecklem
@tmecklem
Jul 12 2016 03:05
ok. That makes sense.
(all of it) :)
Paul Martin
@Spazholio
Jul 12 2016 03:05
I’ve programmed in the 4-5 WiFi hotspots I deal with on a daily basis, with the iPhone set with the lowest priority.
Every minute, a script runs that checks to see if it’s connected, and if not, try all the known APs until it can connect.
Tim Mecklem
@tmecklem
Jul 12 2016 03:06
I’m a little bummed that the iPhone tether option shuts off WiFi and uses cell only even when it could share WiFi over bluetooth.
I think I’m a little off the normal iPhone user path.
Paul Martin
@Spazholio
Jul 12 2016 03:07
Yeah, agreed.
Tim Mecklem
@tmecklem
Jul 12 2016 03:17
@Spazholio do you have a custom script for wifi connecting, or do you just use wpa-supplicant.conf?
foobar
@satiekue
Jul 12 2016 03:26
So I'm new to this, just got started with reading up on openaps and the requirements for it. Do we still have the version 2.4 firmware limitation of the Medtronic pump?
Paul Martin
@Spazholio
Jul 12 2016 03:27
@tmecklem Both. Hang on...
I use wpa_supplicant.conf but the script will just basically take the interface down, wait a few, bring it back up (which invokes the wpa_supplicant.conf file), then run dhclient against wlan0 because for some reason, it won’t make the DHCP request automatically.
Tim Mecklem
@tmecklem
Jul 12 2016 03:30
oh, ok
Pi-ancreas.jpg
This is the case for the Pi 3 with Slice of Radio that my wife is using.
David Cintron
@loudestnoise
Jul 12 2016 03:32
@satiekue Yep, that’s the case for pumps from the US. 2.4 or lower
@tmecklem that case is awesome
foobar
@satiekue
Jul 12 2016 03:33
ugh. so lame. Will hunt through my stash of supplies for old pum.
omg @tmecklem that's a great idea!!!
David Cintron
@loudestnoise
Jul 12 2016 03:33
Yeah, I was lucky enough to have one still. Hadn’t used it in years
Tim Mecklem
@tmecklem
Jul 12 2016 03:33
Happen to be within driving distance of MCM Electronics (http://www.mcmelectronics.com/product/83-17313, http://www.mcmelectronics.com/product/83-17312 )
David Cintron
@loudestnoise
Jul 12 2016 03:34

I like this line in the description

Pi-Blox is cleverly designed to integrate seamlessly with the studded plastic building bricks made by a certain company with four letters in their name (hint: it starts with the letter "L.")

Tim Mecklem
@tmecklem
Jul 12 2016 03:35
heh, yeah
David Cintron
@loudestnoise
Jul 12 2016 03:35
I may need to buy one of these for my RPi rig
Oooh they’re on Amazon too
more pricey but I have a credit there ;)
mariano42
@mariano42
Jul 12 2016 03:59
I am sure this is another stupid mistake I am making, but I am hoping someone could help me figure out how to troubleshoot this.. I am on the Visualization section, sending openaps status to nightscout... i get data when I run it from shell, but when I try to add the report using "openaps report add nightscout/openaps-status.json JSON ns-status shell monitor/clock.json oref0-monitor/iob.json oref0-predict/oref0.json oref0-enacted/enacted-temp-basal.json monitor/battery.json monitor/reservoir.json monitor/status.json" it gives me an error around ns-status.... "usage: openaps-report add [-h] report {base,text,stdout,JSON} device ...
openaps-report add: error: argument device: invalid choice: 'ns-status' (choose from u'calculate-iob', u'cgm', u'cgmdex', u'determine-basal', u'get-profile', u'ns', u'oref0', u'pump', u'tz', u'units')". I have spent a few hours on this hoping something would click, but I have got nothing...
David Cintron
@loudestnoise
Jul 12 2016 04:03
I think that’s because you don’t have a device named ns-status
it looks like you do however have one called ns
mariano42
@mariano42
Jul 12 2016 04:05
i do have an ns device, but not ns-status... i must have missed something where it mentions creating an ns-status device. I assume i should have both an ns and ns-status device?
David Cintron
@loudestnoise
Jul 12 2016 04:07
No, ns is what you want. What page in the documentation are you looking at?
i see in Ben West's openaps example he has both... I think that's where I am mixed up
David Cintron
@loudestnoise
Jul 12 2016 04:09
ah I see that, so what happens if you run the same report add with ns
mariano42
@mariano42
Jul 12 2016 04:09
ConfigParser.NoSectionError: No section: u'device "ns-status"'
David Cintron
@loudestnoise
Jul 12 2016 04:09
something along the lines of
openaps report add nightscout/openaps-status.json JSON ns shell monitor/clock.json oref0-monitor/iob.json oref0-predict/oref0.json oref0-enacted/enacted-temp-basal.json monitor/battery.json monitor/reservoir.json monitor/status.json
mariano42
@mariano42
Jul 12 2016 04:10
still mentions ns-status.. which doesnt make sense
yea, same error
i even created an ns-status device in openaps.ini.. thought that would help... but no dice
David Cintron
@loudestnoise
Jul 12 2016 04:13
so does this work for you?
openaps use ns shell status monitor/clock.json oref0-monitor/iob.json oref0-predict/oref0.json oref0-enacted/enacted-temp-basal.json monitor/battery.json monitor/reservoir.json monitor/status.json
mariano42
@mariano42
Jul 12 2016 04:14
@loudestnoise nope.. same ConfigParser.NoSectionError: No section: u'device "ns-status"'
David Cintron
@loudestnoise
Jul 12 2016 04:15
can you paste the results of openaps device show
mariano42
@mariano42
Jul 12 2016 04:17
timezones://tz
medtronic://pump
openxshareble://cgm/None
process://ns/nightscout/ns https://xyz.azurewebsites.net zyzyzyzyzyzyzyz
process://oref0/oref0/
process://get-profile/oref0/get-profile
process://calculate-iob/oref0/calculate-iob
process://determine-basal/oref0/determine-basal
units://units
dexcom://cgmdex
and i was wrong.. yes, that shell that you pasted did work
David Cintron
@loudestnoise
Jul 12 2016 04:18
ok, so just change your report add to remove the -status bit
openaps report add nightscout/openaps-status.json JSON ns shell monitor/clock.json oref0-monitor/iob.json oref0-predict/oref0.json oref0-enacted/enacted-temp-basal.json monitor/battery.json monitor/reservoir.json monitor/status.json
because you do have a device called ns
just not ns-status
mariano42
@mariano42
Jul 12 2016 04:19
ok.. i ran "openaps report add nightscout/openaps-status.json JSON ns shell monitor/clock.json oref0-monitor/iob.json oref0-predict/oref0.json oref0-enacted/enacted-temp-basal.json monitor/battery.json monitor/reservoir.json monitor/status.json added ns://JSON/shell/nightscout/openaps-status.json" and now...
git.exc.GitCommandError: 'git add openaps.ini' returned with exit code 128
stderr: 'error: insufficient permission for adding an object to repository database .git/objects
error: openaps.ini: failed to insert into database
error: unable to index file openaps.ini
fatal: updating files failed'
David Cintron
@loudestnoise
Jul 12 2016 04:21
oh well um, that bit I’m not sure about
insufficient permission
hmm
mariano42
@mariano42
Jul 12 2016 04:23
i think i managed to screw up my openaps.ini somehow.. i get that same error even when I do openaps device show
David Cintron
@loudestnoise
Jul 12 2016 04:23
Oh right, you mentioned updating openaps.ini
Mitchell Slep
@moomoobloo
Jul 12 2016 04:24
Can anyone comment on why determine-basal does not suggest temp basal changes of less than 0.1, is it just to save battery? E.g. here: https://github.com/openaps/oref0/blob/master/lib/determine-basal/determine-basal.js#L198-L200
mariano42
@mariano42
Jul 12 2016 04:26
@loudestnoise it created the report, but that seemed to be what messed up my openaps.ini... i deleted that and now i can see my devices again.. I will keep playing with it.. thanks for all of your help!
David Cintron
@loudestnoise
Jul 12 2016 04:27
:smile:
GeoffWyche
@GeoffWyche
Jul 12 2016 04:27
@moomoobloo Can any pumps deliver at smaller than 0.1U accuracy?
Mitchell Slep
@moomoobloo
Jul 12 2016 04:28
Yes, many pumps go down to .025.
Dana Lewis
@danamlewis
Jul 12 2016 04:30
@moomoobloo it depends on how much the pump can deliver at that rate for the hour
Although there it's because it's close enough to the insulin need at the time so not worth adjusting
Mitchell Slep
@moomoobloo
Jul 12 2016 04:32
@danamlewis are you saying the intention was to make it the smallest basal increment on the pump?
Dana Lewis
@danamlewis
Jul 12 2016 04:33
No.
Scott Leibrand
@scottleibrand
Jul 12 2016 04:34
@tmecklem we have our rigs auto-connect to open wifi hotspots if none of the known ones are in range. pretty simple setting in wpa_supplicant:
network={
        key_mgmt=NONE
        priority=-999
}
notice the priority is negative, and there's no ssid
David Cintron
@loudestnoise
Jul 12 2016 04:36
@scottleibrand I have two networks at work and I prefer it join one over the other, and did the networks 1-5 for priority
but it never works
it always joins the wrong one
Scott Leibrand
@scottleibrand
Jul 12 2016 04:37
in /etc/network/interfaces I have:
auto wlan0
iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
if you have manual, it won't switch once it attaches to one
David Cintron
@loudestnoise
Jul 12 2016 04:39
oh well that would be it I guess
(pi @ raspberrypi): ~/loop
⇢  more /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Scott Leibrand
@scottleibrand
Jul 12 2016 04:39
if the docs say manual, we should get that updated
or it might be a default that we need to suggest people change
David Cintron
@loudestnoise
Jul 12 2016 04:40
I think it might have just been the default
Scott Leibrand
@scottleibrand
Jul 12 2016 04:40
care to go find that and PR a fix?
David Cintron
@loudestnoise
Jul 12 2016 04:42
I think I can do that. Got another PR I need to do after helping @mariano42 earlier as well
I’m not sure why I have wlan0 and 1.
Oh wait, one is my bluetooth adapter perhaps?
Mitchell Slep
@moomoobloo
Jul 12 2016 04:46
@danamlewis My son's nighttime basal is 0.025, so oref0's low-glucose suspend doesn't work for him. He has to go high first to get bumped up to 0.125 and only then could it go down to 0. I see a couple of other constants like this in the code that would be problematic for small basal rates.
Scott Leibrand
@scottleibrand
Jul 12 2016 04:47
You'd like openaps/oref0#164 then
want to add the other stuff to that issue?
Jason Calabrese
@jasoncalabrese
Jul 12 2016 04:48
Someone was using diluted insulin
Scott Leibrand
@scottleibrand
Jul 12 2016 04:49
yeah, you'd get a lot more control that way. if your normal basal is the pump's minimum, you basically only get "on" or "off". I think @ddaniels1 was doing diluted for his 1-year-old
can't remember who the other person was
Dana Lewis
@danamlewis
Jul 12 2016 04:50
@moomoobloo have you talked to your endo about diluted insulin? See ^^
Mitchell Slep
@moomoobloo
Jul 12 2016 04:55
yeah we used to use diluted insulin with MDI but it was a hassle. Undiluted with Animas Ping has been working well so don't really want to switch back.
We rarely need to do more than a couple of on/offs in a night, so don't need really fine grained resolution in the low end. But right now low glucose suspend doesn't work at all in oref0, unless he started out high.
Scott Leibrand
@scottleibrand
Jul 12 2016 04:56
should be easy enough to fix that. if you're not ready to start changing code yet, you can at least start collecting all the places you can find that need adjusted to support tiny basals and add them to openaps/oref0#164
Mitchell Slep
@moomoobloo
Jul 12 2016 04:57
ok I'll add what i find to the issue
Scott Leibrand
@scottleibrand
Jul 12 2016 04:57
we can also rename that issue to be something more generic if you want, as changing the 0.1U stuff to 20% is probably only part of it
Mitchell Slep
@moomoobloo
Jul 12 2016 04:58
a simple thing that i could do is to just have basal change to 0 always allowed even if it's within the threshold, that's probably a safe thing to do for anyone
Scott Leibrand
@scottleibrand
Jul 12 2016 04:59
true. make sure to note that idea.
David Cintron
@loudestnoise
Jul 12 2016 05:02
If I’m looking at openaps.readthedocs.io does latest = dev ?
so if I’m doing a PR, I don’t see a latest branch, but I’m guessing that’s just a reference to dev?
Scott Leibrand
@scottleibrand
Jul 12 2016 05:03
I think latest should be master
David Cintron
@loudestnoise
Jul 12 2016 05:04
oh ok
Mitchell Slep
@moomoobloo
Jul 12 2016 05:05
@scottleibrand A more generic name would be good. Switching to percent would probably fix the issue but there are other possible solutions like making them configurable, basing it off of the pump specs, etc.
Dana Lewis
@danamlewis
Jul 12 2016 05:06
@loudestnoise remember we are PRing to master now, unless it's a crazy large slew of structural changes
David Cintron
@loudestnoise
Jul 12 2016 05:07
Yep
Scott Leibrand
@scottleibrand
Jul 12 2016 05:07
@moomoobloo updated
Scott Leibrand
@scottleibrand
Jul 12 2016 05:22
any objections to merging AMA to dev? openaps/oref0#125
Ben West
@bewest
Jul 12 2016 06:11
@scottleibrand reading through
Ben West
@bewest
Jul 12 2016 06:26
briefly, I encourage looking at yargs and using option switches; it's not clear if performance from existing dev should change much
looks like mostly new tools for layering on additional controls and some fixes handling various things
jim-andrews
@jim-andrews
Jul 12 2016 12:10
I had an interesting evening. I went low because my rig was unable to communicate to the pump to dial back the temp basal. communications were lost in the early morning hours. I was able through experimentation to determine that the pump battery needed to be changed. even though it was still showing 50%, the receiver on the pump side was going deaf. new battery fixed it all. what I take away from this is that the receiver on the pump side is the first thing to go. so if your headed for bed and your 722 is showing 50%, better just change out the battery.
David Cintron
@loudestnoise
Jul 12 2016 12:18
@jim-andrews for this purpose I have keep AAAs on my nightstand. :D
jim-andrews
@jim-andrews
Jul 12 2016 12:27
I seem to remember hearing in a youtube video on this subject that some users are having much better luck with lithium batteries in their pumps. anyone tried that? longer lasting?
David Cintron
@loudestnoise
Jul 12 2016 12:52
Yeah, I haven't used them but know many do. The one gotcha I hear is they die suddenly and usually around 1.39V
Whereas I can get down to 1.21V on my alkaline before I get low battery
@channemann did some testing here - https://gist.github.com/channemann/0a81661b78703fcb8da6
Scott Leibrand
@scottleibrand
Jul 12 2016 13:01
Lithiums die at a similar voltage, they just drop from 1.4 to 1.2 in less than 12 hours (after taking a week to get down to 1.4)
Eric
@ecc1
Jul 12 2016 13:04
What does openaps say for the voltage of a fresh battery? I measured 1.6 with my multimeter but the pump reported only 1.4 something.
jim-andrews
@jim-andrews
Jul 12 2016 13:14
Wow. over 9 days with the Energizer Ultimate Lithium. that's awesome! understanding the pitfalls of the sudden drop off, I still would prefer to have a battery that lasts a week. I see to only get about 4 days max out of my Duracells, which is a bit worse than the chart shows above. my guess is that it has a great deal to do with how much backlight you use. I seem to always be viewing my pump in the dark (not clear why that is). I'm going to give Lithium a shot. like with my G4 sensor replacement, I can just synch up my battery replacement at the same time.
Chris Oattes
@cjo20
Jul 12 2016 13:16
jim-andrews: how much basal was it delivering for how long to make you go low?
jim-andrews
@jim-andrews
Jul 12 2016 13:20
my normal running rate is 0.8 but I had about 4 hours of that. I tested at 90 around 2 AM, and then was BEEPED!!! awake at 6 AM by the low warning. that was a bit out of cal however, as my actual meeter reading was a bit above that. so it was a confluence of events that conspired to rob me of sleep, but I was able to determine that my last good communications set the pump up for a 0.8 and then no comm for the rest of the evening. I watch the correction pretty closely (side effect of being a new looper) and normally it would have brought that temp basal down to 0. loss of comm probably prevented that.
Eric
@ecc1
Jul 12 2016 13:22
Oh, now I see the voltage column in @channemann 's table shows the same discrepancy
GabeA23
@GabeA23
Jul 12 2016 13:23

I've come here many times with problems over the last few weeks but I'm happy to be able to report some good news.

My loop has been running since yesterday afternoon and it's been incredible! My BG hasn't gone higher than 150 or below 65. I wasn't sure if the hours and hours of setup would be worth it, but it absolutely was.

jim-andrews
@jim-andrews
Jul 12 2016 13:36
congratulations! I know, isn't it awesome!
Paul Martin
@Spazholio
Jul 12 2016 13:48
I currently have a new sensor soaking in my calf, and it is WEIRD.
Sarah Hodson Grady
@shgrady
Jul 12 2016 13:55
@Spazholio I tried a pod in my calf, horrible idea, but then forget when I did a new sensor that I wanted to try, what kind of weird?
Paul Martin
@Spazholio
Jul 12 2016 13:55
When I walk less gingerly than I should, I'm reminded that I have platinum jammed in my calf muscle. =)
Julie
@julieraines
Jul 12 2016 13:57
I'm getting an error message when I try to communicate with the pump or the CGM for the first time. "ValueError: Attempting to use a port that is not open". Working with a RPi2, medtronic 522 and dexcom G5 off my MAC mini.
Sarah Hodson Grady
@shgrady
Jul 12 2016 13:58
@Spazholio my RA is so fired up right now, I have not taken a not gingerly step in at least two weeks, but good to know, trying to figure where on the underside of my forearm wont bang on my desk all day
Paul Martin
@Spazholio
Jul 12 2016 13:59
I did the back of the arm twice. The first time went very well. The second didn't because I put it up too high. Too close to the shoulder, and everytime you swing your arm, you'll feel the tape pull and stretch. That one didn't last long.
Scott Leibrand
@scottleibrand
Jul 12 2016 14:01
@GabeA23 Congrats! :confetti_ball:
Chris Oattes
@cjo20
Jul 12 2016 14:05
Is there a typo in the quick-src script? https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-src.sh
    git clone -b dev git://github.com/openaps/oref0.git || \
        (cd openaps-contrib && git pull)
looks like it should be more like cd oref0 && git pull
Scott Leibrand
@scottleibrand
Jul 12 2016 14:20
Yeah looks like it.
Julie
@julieraines
Jul 12 2016 14:39
I just can't talk to the pump now - fixed the dexcom problem by boosting the USB power. Here's my error message: AttributeError: 'Pump' object has no attribute 'model'
ok - fixed it. Having a "Homer Simpson" morning. DOH! entered wrong serial number.
Dana Lewis
@danamlewis
Jul 12 2016 14:58
@GabeA23 woohoo! :)
Scott Leibrand
@scottleibrand
Jul 12 2016 15:07
@julieraines what do you mean by "boosting the USB power"? Plugging the Pi into the wall with a beefier power supply?
Julie
@julieraines
Jul 12 2016 15:08
no - sorry braindead. Meant to say this instead of boosting power: Workaround: If you continue to have problems, try increasing the mA output to the USB ports, you can do this by running the following command sudo bash -c "echo -e \"#Enable Max USB power\nmax_usb_current=1\" >> /boot/config.txt".
Reboot via sudo shutdown -r now to pick up the changes.
Jeremy M Lucas (GetRileyLink.org)
@jlucasvt
Jul 12 2016 15:26
@GabeA23 :+1:
Scott Leibrand
@scottleibrand
Jul 12 2016 16:26
@julieraines ah, gotcha. don't think I ever did that on our Pi: I should try it. :)
Julie
@julieraines
Jul 12 2016 18:26
@scottleibrand it worked like butta
David Cintron
@loudestnoise
Jul 12 2016 18:46
So does anyone who has helped a person IRL setup OpenAPS have any tips? I’m meeting a lady and her daughter who wants to learn more and I told them I would bring my rig and talk through it with them.
Dana Lewis
@danamlewis
Jul 12 2016 18:46
Talk through the mindset of the learning process and what it’s like :) and show them Gitter, etc. so they know where to turn for specific questions with setup process
David Cintron
@loudestnoise
Jul 12 2016 18:47
Yeah, it’s all about the learning. I like that
I also feel conflicted as I’m pretty sure the do not yet have a compatible pump and now that I have a spare I could help with that, but also I don’t want to lose my “backup"
Dana Lewis
@danamlewis
Jul 12 2016 18:49
There’s lot of things they can do before getting the pump, to help them get started
foobar
@satiekue
Jul 12 2016 18:52
@loudestnoise I've just started last Thursday, and I have to say, it is a lot of work. As of yesterday I realized that the most important part is the pump (old firmware) itself. Sigh. So much to read. But I'm thrilled to see how many people are doing it. I'm really hoping we can get some proper devices which could be covered by warranty, etc.
David Cintron
@loudestnoise
Jul 12 2016 18:53
And you can do it. I think the most important part isn’t the pump. It’s the willingness to learn new things and to open your mind to new possibilities
LOL
but yeah, also the pump
foobar
@satiekue
Jul 12 2016 18:54
Well, the one talent I have is stubbornness, so I'm sure i'll get it done. :)
danamlewis @danamlewis successfully has brainwashed @loudestnoise ;)
Dana Lewis
@danamlewis
Jul 12 2016 18:54
@satiekue that’s the spirit! :)
foobar
@satiekue
Jul 12 2016 18:55
@danamlewis I'm also in Seattle (Bellevue actually). Are there any local meetups for #openaps?
Dana Lewis
@danamlewis
Jul 12 2016 18:55
@satiekue awesome! we do them every so often (mostly when someone asks), so we could probably schedule another :) we usually meet downtown Seattle
foobar
@satiekue
Jul 12 2016 18:56
perf! ok. I'll keep an ear out for it then.
Dana Lewis
@danamlewis
Jul 12 2016 18:56
:+1: are you on Twitter? That’s usually where we spread the word the loudest
foobar
@satiekue
Jul 12 2016 18:56
yup, just followed you. :)
Dana Lewis
@danamlewis
Jul 12 2016 18:57
:) and do @OpenAPS too
foobar
@satiekue
Jul 12 2016 18:57
done!
Dana Lewis
@danamlewis
Jul 12 2016 18:59
:thumbsup:
Paul Martin
@Spazholio
Jul 12 2016 19:25
Has anyone flashed the XRF with a CC debugger? If so, are there diagrams anywhere? Checked on the mmeowlink Github but didn't see anything right offhand.
Martin Haeberli
@mhaeberli
Jul 12 2016 19:29
@danamlewis brainwashed to do what?
Scott Leibrand
@scottleibrand
Jul 12 2016 19:33
repeat her lines about the willingness to learn new things. ;-)
Martin Haeberli
@mhaeberli
Jul 12 2016 19:48
:+1:
Eric
@ecc1
Jul 12 2016 20:21
@Spazholio I haven't, but doesn't it use an SRF daughter module too? In which case the connections should be the same as in https://github.com/oskarpearson/mmeowlink/wiki/Writing-Firmware-to-the-ERF-stick
Paul Martin
@Spazholio
Jul 12 2016 21:02
I have no idea. Someone’s asked me to flash it for them, and while I’m happy to do it, I don’t want them to waste postage. =)
Also - @danamlewis or @scottleibrand - when soaking a new sensor, is it still necessary to do the 2-hour bit? Or can I just move the transmitter over?
Dana Lewis
@danamlewis
Jul 12 2016 21:03
you should still do the 2 hour bit
if you have two receivers, you could move the transmitter and one of them will come back in about an hour but I find that data is not reliable, so I don’t like to do that
Scott Leibrand
@scottleibrand
Jul 12 2016 21:07
to really eliminate the 2h penalty box you really have to get a second live transmitter, which obviously costs ~twice as much
Paul Martin
@Spazholio
Jul 12 2016 21:07
I only have one.
Jason Calabrese
@jasoncalabrese
Jul 12 2016 21:08
2 recievers and you can skip the 2 hours of downtime for a restart
Paul Martin
@Spazholio
Jul 12 2016 21:09
Also, whatever tape they use to wrap your arm after you get a blood draw? I used that on my leg all day to keep the flappy bits down and not snapped off. Got all rough on the skin, so I swapped it when I got home for an ACE bandage. Did SOMETHING wrong because all of the sudden, my calf was VERY VERY aware that there was a sensor on it. No idea if I hit muscle or what, but….yowza.
Jason Calabrese
@jasoncalabrese
Jul 12 2016 21:09
I bought an extra transmitter and try to order new whenever possible so that I can use 2 transmitters
since the g4 transmitters last longer than warranty if you're luck you can get ahead of it some
Paul Martin
@Spazholio
Jul 12 2016 21:13
Eh. I’ve dropped a lot of money into this already. Another “needless” $200 is a bit steep.
At least right now.
Especially if the worst case scenario is a 2h gap. Which admittedly sucks, but...
Scott Leibrand
@scottleibrand
Jul 12 2016 21:16
yeah, if you do the soak and then swap sometime when BG is relatively stable, 2h is not that big a deal. we have one of those franken-transmitters someone put new batteries on, but haven't bothered doing the 2-transmitter thing because then you're wearing an ugly one with sticky-out bits all week and getting it caught on everything.
Jason Calabrese
@jasoncalabrese
Jul 12 2016 21:17
a lot can happen in 2hrs
for me it's completely unacceptable
Scott Leibrand
@scottleibrand
Jul 12 2016 21:21
probably different for kids vs. adults
Paul Martin
@Spazholio
Jul 12 2016 21:22
I’m using it for ME, and I get a little wiggy about missing 2h of data. Then again, I remember I did without a Dexcom for decades, so going “old school” for 2 hours won’t really matter.
Scott Leibrand
@scottleibrand
Jul 12 2016 21:23
I would probably be more of a control freak about it than @danamlewis is. :-)
David Cintron
@loudestnoise
Jul 12 2016 21:26
So tempting when they send the two G5s at once. But if I used both and they EOLed after 3 months I’d be SOL
LOL
Scott Leibrand
@scottleibrand
Jul 12 2016 21:28
you might be able to get more than 112 calendar days if you only run each one half the weeks and just overlap for a day at the end of each sensor...
might be worth a try after 90 days: switch to the other one and back and forth and see how many more weeks you get
David Cintron
@loudestnoise
Jul 12 2016 21:29
Eh, but as soon as you take the transmitter out of the box the countdown starts is what I’ve been told
it has a little piece of something or other it sits on in the packaging
Scott Leibrand
@scottleibrand
Jul 12 2016 21:30
that was true for the G4
I think the G5 might count actual days of use
David Cintron
@loudestnoise
Jul 12 2016 21:30
and I always assumed that meant regardless of whether or not you were using the transmitter
oh
hmm
Chris Oattes
@cjo20
Jul 12 2016 22:21
evening. What sort of temperature do your edisons run at?
Paul Martin
@Spazholio
Jul 12 2016 22:21
I can check that? Neat! How do I check that?
Scott Leibrand
@scottleibrand
Jul 12 2016 22:21
"warm"
or do you mean an actual measurement?
Chris Oattes
@cjo20
Jul 12 2016 22:22
@scottleibrand actual measurement
Scott Leibrand
@scottleibrand
Jul 12 2016 22:23
:+1: to @Spazholio then. :)
Chris Oattes
@cjo20
Jul 12 2016 22:23
sudo apt-get -y install lm-sensors && sensors
Paul Martin
@Spazholio
Jul 12 2016 22:24
Ahhh, ok. edison_gimme_temperatures didn’t work, so I was wondering.
coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +45.0°C  (high = +90.0°C, crit = +90.0°C)
Core 1:       +46.0°C  (high = +90.0°C, crit = +90.0°C)

skin0-virtual-0
Adapter: Virtual device
temp1:            N/A  

skin1-virtual-0
Adapter: Virtual device
temp1:        +13.4°C  

msicdie-virtual-0
Adapter: Virtual device
temp1:            N/A  

SoC_DTS0-virtual-0
Adapter: Virtual device
temp1:        +48.0°C  

SoC_DTS1-virtual-0
Adapter: Virtual device
temp1:        +45.0°C
That’s inside my pocket, inside @eluhrs’ 3D printed case
Chris Oattes
@cjo20
Jul 12 2016 22:26
coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +53.0°C  (high = +90.0°C, crit = +90.0°C)
Core 1:       +52.0°C  (high = +90.0°C, crit = +90.0°C)

skin0-virtual-0
Adapter: Virtual device
temp1:            N/A

skin1-virtual-0
Adapter: Virtual device
temp1:        +12.1°C

msicdie-virtual-0
Adapter: Virtual device
temp1:            N/A

SoC_DTS0-virtual-0
Adapter: Virtual device
temp1:        +54.0°C

SoC_DTS1-virtual-0
Adapter: Virtual device
temp1:        +52.0°C
Scott Leibrand
@scottleibrand
Jul 12 2016 22:31
edison-rl:
Core 0:       +57.0°C  (high = +90.0°C, crit = +90.0°C)
Core 1:       +57.0°C  (high = +90.0°C, crit = +90.0°C)
skin1-virtual-0
Adapter: Virtual device
temp1:        +11.9°C

edison-sf:
Core 0:       +51.0°C  (high = +90.0°C, crit = +90.0°C)
Core 1:       +51.0°C  (high = +90.0°C, crit = +90.0°C)
skin1-virtual-0
Adapter: Virtual device
temp1:        +13.6°C

edison-ti:
Core 0:       +57.0°C  (high = +90.0°C, crit = +90.0°C)
Core 1:       +57.0°C  (high = +90.0°C, crit = +90.0°C)
skin1-virtual-0
Adapter: Virtual device
temp1:        +14.9°C
Chris Oattes
@cjo20
Jul 12 2016 22:32
thanks
Scott Leibrand
@scottleibrand
Jul 12 2016 22:34
the first one is the one @danamlewis complains "feels hot", which probably just means its heat sink is more exposed, since its external temp is actually lower
Chris Oattes
@cjo20
Jul 12 2016 22:39
just wanted to check mine was in a comparable range :)
http://i.imgur.com/2NdLVAd.jpg How I connected my TI stick this time
Paul Martin
@Spazholio
Jul 12 2016 22:40
Interesting.
Jason Calabrese
@jasoncalabrese
Jul 12 2016 23:26
nice, now we need to get rig temperature uploaded :smile:
Chris Oattes
@cjo20
Jul 12 2016 23:26
feel free :P
Scott Leibrand
@scottleibrand
Jul 12 2016 23:28
upload ALL THE THINGS!
FYI, just merged the advanced-meal-assist branch of oref0 into dev (finally!) :-)
Chris Oattes
@cjo20
Jul 12 2016 23:29
oooh
Jason Calabrese
@jasoncalabrese
Jul 12 2016 23:29
glad we have yargs in place --core-temp monitor/core-temp.json
Scott Leibrand
@scottleibrand
Jul 12 2016 23:29
if anyone has a test rig (or time to test and back out if it causes any problems), you can update to the latest oref0 dev and make sure nothing is broken
we also need PRs to yarg-ify a bunch more stuff too
Chris Oattes
@cjo20
Jul 12 2016 23:30
@scottleibrand Is avgdelta the same as delta if you're getting a constant stream of data?
Jason Calabrese
@jasoncalabrese
Jul 12 2016 23:30
I'm only a few commits behind, I'll update everything tonight
Scott Leibrand
@scottleibrand
Jul 12 2016 23:30
they both have units of mg/dL/5m, yes
danamlewis @danamlewis cheers for AMA being in dev now
Scott Leibrand
@scottleibrand
Jul 12 2016 23:30
avgdelta is the average over 30m, and delta is since the last data point
just added another one, cleverly named twodelta, for the delta from two data points ago (usually 10m)
Chris Oattes
@cjo20
Jul 12 2016 23:32
yeah, that's what I'm reading through at the moment, and what prompted the question
Scott Leibrand
@scottleibrand
Jul 12 2016 23:33
:+1:
Chris Oattes
@cjo20
Jul 12 2016 23:33
I was wondering whether it would be better to use the 5m and 10m deltas for "voting"
they both need to agree on action to do something
Scott Leibrand
@scottleibrand
Jul 12 2016 23:33
how would that work?
Chris Oattes
@cjo20
Jul 12 2016 23:39
blob
So data point 1 is 10m ago, data point 2 is 5m ago, 3 is current, 4 is what the next reading is probably going to be
if you compare 5, 10 or 15 minutes ago with current, you'll get a negative delta reading
Scott Leibrand
@scottleibrand
Jul 12 2016 23:42
right...
Chris Oattes
@cjo20
Jul 12 2016 23:42
If you say that 1->2, 2->3 and 1->3 all have to (roughly?) agree on a course of action before doing anything, you won't end up setting temp basals for 5 minutes until the CGM realises it's being dumb and gives you a sensible reading
Scott Leibrand
@scottleibrand
Jul 12 2016 23:44
problem is that also means you can't respond as quickly when 3 represents an actual change: when BG starts dropping after a meal, for example
Chris Oattes
@cjo20
Jul 12 2016 23:45
yup
you could include expected delta in the mix
Scott Leibrand
@scottleibrand
Jul 12 2016 23:46
the change I'm making now is to allow the 1->3 drop to drive a low temp (albeit not as strongly as 2->3 would, in the dev code), which can then be continued if 4 comes in at or below 3, or canceled if it goes up
Chris Oattes
@cjo20
Jul 12 2016 23:46
if you're expecting a negative delta, seeing one means you drop the basal rate
Scott Leibrand
@scottleibrand
Jul 12 2016 23:46
so I think this is a movement in the direction you're going for, just with more of a bias to temping to zero just in case on a drop
interesting. I hadn't thought about using expectedDelta to drive how much I trust individual data points.
Chris Oattes
@cjo20
Jul 12 2016 23:47
if you're not expecting a negative delta, wait and see if you're actually seeing a drop over two 5 minute periods before doing anything
Scott Leibrand
@scottleibrand
Jul 12 2016 23:47
this might end up being over-optimization, though, unless we can come up with an elegant way to encode that without a lot more conditionals in the code
Chris Oattes
@cjo20
Jul 12 2016 23:49
var areWeDropping = ((sign(expectedDelta) == sign(Delta5Min)) || (sign(Delta5Min) == sign(Delta10Min))) && sign(Delta5Min) == -1
danamlewis @danamlewis wonders about the complexity of people understanding what the algorithm is doing
Scott Leibrand
@scottleibrand
Jul 12 2016 23:51
hmm, sounds like we could also use sign() to refactor and simplify what's already there first, too
Chris Oattes
@cjo20
Jul 12 2016 23:53
@danamlewis you think it might be problematic?
Scott Leibrand
@scottleibrand
Jul 12 2016 23:54
we'd need to comment it well to explain why we're doing it that way, or I won't remember in 6 months. :)
Chris Oattes
@cjo20
Jul 12 2016 23:54
sounds like a good plan :D
Scott Leibrand
@scottleibrand
Jul 12 2016 23:55
I'll think about that and see how I'd want to use the sign(expectedDelta) stuff there
I'm not entirely happy with the number of conditionals in the code already, so if you have any ideas for refactoring to simplify, those would be welcome as well.
most of them still do something useful, though
just a question of whether we can express it more clearly and concisely I think
Chris Oattes
@cjo20
Jul 12 2016 23:57
I'll take a look at that after my holiday if you like
Jason Calabrese
@jasoncalabrese
Jul 12 2016 23:59
I have to think that through, but I like having 5m, 10m, 15m, 30m, etc deltas instead of making assumptions on their spacing, gaps, etc