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

16th
Jan 2016
Ben West
@bewest
Jan 16 2016 00:09
I'm never seeing disk corruption
what I see is occasionally a file we were writing to is corrupt
Toby Canning
@TC2013
Jan 16 2016 00:17
@bewest This weekend I am going to work on getting the Edison to run the loop in an offline-mode. I have two options: openxshareable and https://github.com/oschumac/python-uart-pi-xbridge. I'd prefer openxshareable, but I already spent 4 or 5 hours unsuccessfully on it. It would give me pairing and paired, but then error without pulling any data from the CGM. Oliver has his stuff working on the Pi, but I really prefer the Dexcom CGM. Do you have any more ideas on what I might try?
Scott Leibrand
@scottleibrand
Jan 16 2016 00:18
can the edison do USB OTG for now?
Toby Canning
@TC2013
Jan 16 2016 00:18
It requires 7-12V connection to run USB
Sparkfun board will run USB off 5V
I think
Ben West
@bewest
Jan 16 2016 00:28
did you try openxshareble on the edison?
or just on the pi?
I believe you need the --experimental flag for it to work
@scottleibrand did you enable the -E switch for bluetoothd?
Scott Leibrand
@scottleibrand
Jan 16 2016 00:29
I did what your directions said
/usr/local/bin/bluetoothd --experimental & you mean?
is that the same as -E?
Ben West
@bewest
Jan 16 2016 00:31
yeah
hmm, you mean you're running that by hand in a different terminal or something?
I think systemd is starting bluetooth for you automatically
for upstart, it looks like this https://gist.github.com/bewest/df3df42926b73fc4f4eb
for systemd, I think it's /lib/systemd/system/bluetooth.service, not sure
Ben West
@bewest
Jan 16 2016 00:35
/lib/systemd/system/bluetooth.service yup
Scott Leibrand
@scottleibrand
Jan 16 2016 00:35
I did what is documented there
"add the following line before the exit 0 at the end"
Ben West
@bewest
Jan 16 2016 00:35
hmmmm
I think you are using systemd, aren't you?
Scott Leibrand
@scottleibrand
Jan 16 2016 00:36
your directions had me ./configure --disable-systemd
Ben West
@bewest
Jan 16 2016 00:36
what happens when you type service?
switching to systemd is a relatively recent thing
Scott Leibrand
@scottleibrand
Jan 16 2016 00:37
pi@rpi3 ~/openaps-dev $ service bluetooth status
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Active: inactive (dead)
Docs: man:bluetoothd(8)
Ben West
@bewest
Jan 16 2016 00:37
oh weird
it's dead
Scott Leibrand
@scottleibrand
Jan 16 2016 00:37
I might need to reinstall everything from scratch
Ben West
@bewest
Jan 16 2016 00:38
haha that's so odd
Scott Leibrand
@scottleibrand
Jan 16 2016 00:38
this is after a bunch of fiddling to try to get BT tethering working
Ben West
@bewest
Jan 16 2016 00:38
service is upstart tool
but it's referring to systemd file
Scott Leibrand
@scottleibrand
Jan 16 2016 00:38
also no BT adapter plugged in right now
Ben West
@bewest
Jan 16 2016 00:38
what about systemctl?
Scott Leibrand
@scottleibrand
Jan 16 2016 00:39
lots of stuff loaded active, but not bluetooth
do you have a working Pi setup?
have you tested BT on it?
Ben West
@bewest
Jan 16 2016 00:40
my pis are running older wheezy
Scott Leibrand
@scottleibrand
Jan 16 2016 00:40
seems like easiest path for the rest of us is for you to get a working Pi setup that we can document, since both @TC2013 and I have tried a whole bunch of stuff unsuccessfully
Ben West
@bewest
Jan 16 2016 00:40
it came installed by default and I wasn't convinced that upgrading to jessie was a great idea, partly because of systemd and other things
Scott Leibrand
@scottleibrand
Jan 16 2016 00:41
well, our documentation requires everyone else to be on jessie, so..
Ben West
@bewest
Jan 16 2016 00:41
I've had it working on multiple linux computers
not sure if anyone's done it on RL, I thought I had heard someone had
Scott Leibrand
@scottleibrand
Jan 16 2016 00:42
seems it would be way easier for dogfooding and documentation to set up at least one pi according to the docs
Ben West
@bewest
Jan 16 2016 00:42
not sure I recommend jessie
for now I recommend wheezy
Scott Leibrand
@scottleibrand
Jan 16 2016 00:42
well, then you need to document how to get a fully working setup with wheezy
huge difference between "don't do that" and "here's everything you need to get set up"
sorry I'm a little bit grumpy about this
it just feels like we have too many people off developing in their own environments unwilling to translate what they've done into something that other people can use
Ben West
@bewest
Jan 16 2016 00:45
I set you up on wheezy
not sure when/why it was switched to something I didn't recommend/support
Scott Leibrand
@scottleibrand
Jan 16 2016 00:47
we had a bunch of discussions (including with you) around how to get node and everything working. the documented setup we had was not working with wheezy, so the only thing we were left with was recommending jessie
Ben West
@bewest
Jan 16 2016 00:48
node is simple, nodejs-legacy package was the conclusion
Scott Leibrand
@scottleibrand
Jan 16 2016 00:48
if we want to go set up from scratch on wheezy and update the setup scripts etc. to work with it, great
Ben West
@bewest
Jan 16 2016 00:48
I'm not sure that would solve you your BLE problem
Scott Leibrand
@scottleibrand
Jan 16 2016 00:48
but I was stuck as the only one doing that work, so I got a working setup documented, and it happened to be on jessie
now, if jessie truly is incompatible with bluez, I'm happy to switch
Ben West
@bewest
Jan 16 2016 00:49
I don't recall you being the only one doing that work
Scott Leibrand
@scottleibrand
Jan 16 2016 00:49
sorry, I'm being grumpy and argumentative
Ben West
@bewest
Jan 16 2016 00:49
I recall giving you several scripts and doing it again and again until you adopted them ;-)
Scott Leibrand
@scottleibrand
Jan 16 2016 00:49
yes, that is true. after that, I was the only one running those scripts from scratch and testing the install end to end
and the end-to-end install was having issues any time we did it with wheezy
but working fine on jessie
that's why we ended up on jessie.
so now, we have lots of people on raspian jessie, with working loops, and we want to add BLE support
if downgrading to wheezy is the best path forward, ok
Ben West
@bewest
Jan 16 2016 00:51
I have no idea if that would even solve it
there's no reason to think it would, but right now it's one of the bigger differences between the setups
Scott Leibrand
@scottleibrand
Jan 16 2016 00:51
yeah, me neither, which is mostly why I'm frustrated
Ben West
@bewest
Jan 16 2016 00:51
I need some BLE modules to repro on pi
fwiw, I didn't expect it to work on my new laptop
and was shocked it did
Scott Leibrand
@scottleibrand
Jan 16 2016 00:52
heh, that's a mac, right? :)
Ben West
@bewest
Jan 16 2016 00:52
sort of
it's a mac running native linux
Scott Leibrand
@scottleibrand
Jan 16 2016 00:52
yeah, Mac HW, but not OSX
Ben West
@bewest
Jan 16 2016 00:52
it'd be interesting to try developing your loop on your mac though
Scott Leibrand
@scottleibrand
Jan 16 2016 00:52
that sounds more frustrating than rewarding. :)
Ben West
@bewest
Jan 16 2016 00:52
with the ti-dongle subg_rfspy, you should be able to run whole thing on mac
should work exact same way
would be good for developing, especially working on bring up/installs/tutorial-tools
especially for working on the tools themselves
Scott Leibrand
@scottleibrand
Jan 16 2016 00:54
if we had RL working as a BLE to 900mhz bridge, it'd be cool to be able to loop from any Mac w/o any additional HW
basically any time your RL is within range of a Mac you have loop
but if we're using dedicated USB radios, then a dedicated Pi or Edison seems easier
Ben West
@bewest
Jan 16 2016 00:55
the ti stick has range more like dexcom
Scott Leibrand
@scottleibrand
Jan 16 2016 00:55
how big is the ti-dongle stick?
Ben West
@bewest
Jan 16 2016 00:55
slightly smaller than carelink
Scott Leibrand
@scottleibrand
Jan 16 2016 00:56
how far away have you run a loop that reads and enacts consistently?
Ben West
@bewest
Jan 16 2016 00:56
not sure, still working on that
for now it looks like it reaches my bedroom door from my couch
tvs/microwaves/walls in the way
is pi working with the RL?
Scott Leibrand
@scottleibrand
Jan 16 2016 00:57
today I was getting 10ft line-of-sight range from the Carelink, in one particular orientation. not consistent though
once upon a time I had the Pi paired with the RL over BLE, but we never got mmblelink working so I stopped using that
that was much bluez reconfiguration ago though
Ben West
@bewest
Jan 16 2016 00:58
should be compatible
I think systemd should be enabled on the new image with systemd
but, I have no idea what that might do
I dunno how that systemd bluetooth got in there
did you install the bluetooth package, then uninstall it?
Scott Leibrand
@scottleibrand
Jan 16 2016 01:00
probably
when I try this again I'll need to start over
Ben West
@bewest
Jan 16 2016 01:00
should really go to central computer and pick up some ble dongles
that's actually a legit strategy to get the package manager to lay out the needed system config
Scott Leibrand
@scottleibrand
Jan 16 2016 01:00
might even reinstall Raspbian to make sure it's clean
Ben West
@bewest
Jan 16 2016 01:00
it doesn't install those from source
Scott Leibrand
@scottleibrand
Jan 16 2016 01:01
really wish there was a package for this stuff
I've never had much luck installing things from source
usually indicates not yet well supported software
Ben West
@bewest
Jan 16 2016 01:01
you can make a deb for it :-)
well, there have been lot of changes in this area
Scott Leibrand
@scottleibrand
Jan 16 2016 01:01
that doesn't help, since I don't know what I'm doing
yeah, would just be nice if the bluez project were more mature
no idea why it's not: bluetooth and BLE aren't exactly new
Ben West
@bewest
Jan 16 2016 01:02
packages like bluez and linux kernel have packages that are way old
it's part of debian's background/folklore/culture
generally makes them safe for production use
the switch to systemd is is new
the kernel has undergone a lot of changes
the bluez stack itself also went through tons of changes
apparently most devs complained that bluez made too many breaking changes
at same time, kernel has gone through two major revs
the rev to kernel 3.0 was huge sea-change
bluez 5 is considerably more stable, and has pretty good support for ble from what I can see
it's now mature enough to have bindings in most popular languages, including this d-bus thing which seems future-compat for awhile
Scott Leibrand
@scottleibrand
Jan 16 2016 01:16
seems like with everything being stable now there should be a decent up-to-date package we could use....
Ben West
@bewest
Jan 16 2016 01:18
ah, the distros haven't caught up yet
we could certainly publish such a package though
Dana Lewis
@danamlewis
Jan 16 2016 01:36
Hey @ktomy, @scottleibrand is driving now and suggested you bring that convo here in the meantime
It's not necessary to abort loop because we have a gap in last 3 data points. Instead we could use whatever recent data points to calculate average delta. One data point, that delta is zero. Two data points, delta from that. Only need to abort if time is off from recent data point.
Alin Artiom Kenibasov
@ktomy
Jan 16 2016 01:41
and if between last bg and before-last bg there is more than 30 minutes?
at least for me it is important because in 30 minutes you can "pass over the hill"
Dana Lewis
@danamlewis
Jan 16 2016 01:42
Delta zero then. Avg delta also zero.
Yep.
Alin Artiom Kenibasov
@ktomy
Jan 16 2016 01:44
ok, but then we should write something in reason to let user understand that delta = 0
Dana Lewis
@danamlewis
Jan 16 2016 01:46
So @scottleibrand has some thoughts on interpolation too as an alternative. Could set avg delta to interpolated value, too.
Alin Artiom Kenibasov
@ktomy
Jan 16 2016 01:47
then I'll make glucose_status.IsValid (if it is false, we should abort (parsing error)), glucose_status.IsMeaningfull (when false delta is 0 and no modifications should be made by loop
and glucose_status.ReasonHint - should be integrated in reason to explain why delta is 0
Jason Calabrese
@jasoncalabrese
Jan 16 2016 01:48
We're doing some interpolation for the NS delta, should be able to port that code and tests
Alin Artiom Kenibasov
@ktomy
Jan 16 2016 01:48
also I'll make avg based on last 15 minutes, not last 3 readings, making linear changes between each 2 readings based on time
Alin Artiom Kenibasov
@ktomy
Jan 16 2016 01:49
@jasoncalabrese could you please give me a file/function name, as I didn't open NS code at all
ah, thank you
ok, I'll continue tomorrow as now is too late.
have a nice day
Dana Lewis
@danamlewis
Jan 16 2016 01:52
You too!
Scott Leibrand
@scottleibrand
Jan 16 2016 01:57
Thx @ktomy
and @jasoncalabrese and @danamlewis :-)
Jason Calabrese
@jasoncalabrese
Jan 16 2016 02:22
Might be good to use the same * in the reason to show when we're interpolating
Jason Curry
@mccgm
Jan 16 2016 05:20
Hi all. I am brand new to this and certainly not a programmer. Trying my best to learn as I go. It is taking me a really long time to set up because I am such a newbie. Thank you all for posting here. I keep coming back to this site to try to find answers to my questions. I am following the step by step instructions on openaps. Still on step 1.3. Disabling password login.
Scott Leibrand
@scottleibrand
Jan 16 2016 06:03
That's optional, fwiw
if you have a decent password you can leave it enabled.
Thomas Emge
@ThomasEmge
Jan 16 2016 06:25
Does this provide some help with the bluetooth issues? http://beantalk.punchthrough.com/t/node-red-connecting/2747/5?u=pistolpete
Aaron Michelson
@Aaybob
Jan 16 2016 06:29
Hi....Setting up Raspberry Pi. Path 1 says to follow distributor instructions but that only says to plug in ethernet cable to router. Purchased VILROS kit with Edimax wifi dongle. so I turned it on, it loaded. I typed in the wifi setup command prompt line. pi responded with text. I went to PuTTY download page, now have putty on a widows 8.1 PC, putty responds that Raspberry is not on network. Ran raspi-config to be sure SSH was enabled. no fix. Pluged pi into router still no fix. Then plugged pi into computer no fix. I'm confused about what steps to follow in paths 1, 2 and 3. connection methods aren't working. Would someone give me a set of steps.
Martin Haeberli
@mhaeberli
Jan 16 2016 06:31
@Aaybob for what it’s worth - it can be easier to attach a usb keyboard and mouse, and a video / hdmi cable; then you can configure. I have tried headless configures before but they can be problematic
Aaron Michelson
@Aaybob
Jan 16 2016 06:34
i did do that .. now i want to use SSH .. so I can sit at my desktop computer to code
Martin Haeberli
@mhaeberli
Jan 16 2016 06:34
yes - so you may need to enable ssh
in any event, with the display connected, it may be possible to configure WiFi
Aaron Michelson
@Aaybob
Jan 16 2016 06:35
did.. just following the steps I thought I need to get SSH working before going on.
Martin Haeberli
@mhaeberli
Jan 16 2016 06:35
so with the display, is the RPi on your network wirelessly thru the Edimax?
Aaron Michelson
@Aaybob
Jan 16 2016 06:36
there was a line of code i used wpa_passphrase" " " " >> /etc/wpa_supplicant.conf
with the display uh... the command entered responded with what looked like a good connect. but how to check if pi is on network?
Martin Haeberli
@mhaeberli
Jan 16 2016 06:38
so that should work , but … my luck has varied with that; i have had more luck with the user interface. a) can you ping www.apple.com using a terminal on the gui? b) do you know the RPi’s IP address on your wifi net?
if not, try ifconfig
at the command line (if pings to www.apple.com work)
if you have the IP address, you should be able to connect to it...
Aaron Michelson
@Aaybob
Jan 16 2016 06:41
i understand partly..i could type into RPi command line ping www.apple.com and see if I get a response. then I could command line ifconfig to see if an IP address has been assigned to RPi. is that a good understanding??
Martin Haeberli
@mhaeberli
Jan 16 2016 06:42
yes, exactly!
if you get a response from www.apple.com , then the RPi is on the network
once you have the ip address, then you can get into it with an ssh client; on my end, I’m not a master of Putty; i have much more practice using ssh on linux or macs reaching out to RPis
Aaron Michelson
@Aaybob
Jan 16 2016 06:45
ping responds with "unknown host www.apple.com";
Martin Haeberli
@mhaeberli
Jan 16 2016 06:46
k so its not on the network
Aaron Michelson
@Aaybob
Jan 16 2016 06:47
what could be wrong?
to make your life simpler, you might try first connecting the rpi using an ethernet cable to your router
then you can ssh to it over that connection (maybe even set up vnc so you can get to its GUI remotely); then figure out how to get WiFi working on the edimax
Aaron Michelson
@Aaybob
Jan 16 2016 06:55
the http reference shows a screen as pi@raspberry ~ $ but what I see is root@raspberrypi: /home/pi # so do I just command line ~pi first to get to pi@raspberry? is that important?
well thats the problem the ethernet cable into router or into computer both dont get RPi to SSH...but they could be on the network? I could try pinging with the other connection methods if that seems helpful
Martin Haeberli
@mhaeberli
Jan 16 2016 06:58
two separate points - a) you are logged in as “root” - thus with all superpowers on the machine. b) if you are logged in as pi@, that is fine, but you may need to promote yourself to root (with “sudo”) before you do some of the magic on the machine. - another answer is, I don’t think i know how to explain this part well enough… Google is your friend; try to follow instructions carefully but realize that people who write instructions often forget to double-check them with someone who doesn’t know how to do it.
good luck!
I have to sign off soon ...
Aaron Michelson
@Aaybob
Jan 16 2016 06:59
right root with sudo for full power..alright thanks for the http site that'll be a big help/
Aaron Michelson
@Aaybob
Jan 16 2016 08:19
ugh... did the steps of installing edimax but RPi is not on network. What would be the next step after a good night's rest?
Scott Leibrand
@scottleibrand
Jan 16 2016 08:22
What does ifconfig show?
Ben West
@bewest
Jan 16 2016 08:40
fwiw, the last four days, I went to bed not knowing solution to a problem and woke up solving it within hours
(of course I went to sleep knowing I could wake whenever I was ready)
Sulka Haro
@sulkaharo
Jan 16 2016 08:46
Nightscout reporting says the HbA1c estimate is 5.9% since starting to OpenAPS. If true, puts him well below the best tenth percentile of T1Ds for his age (based on looking at the chart here: http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0109109)
Scott Leibrand
@scottleibrand
Jan 16 2016 08:54
:+1: nice. how is time in range?
Jason Calabrese
@jasoncalabrese
Jan 16 2016 08:54
estimate was really close for us
Sulka Haro
@sulkaharo
Jan 16 2016 11:21
@scottleibrand 69% in range. 26% high, 5% low. FWIW, the dude had something going on in December, where we had to increase insulin doses around 25% and now he's back down with reduced doses, which has increased the unexpected highs and lows.
Where our range is 4 to 8 mmol. The "in range" measures are super misleading, as everyone's ranges vary hugely. I recall seeing someone's "in range" being from 8 to 11 mmol, which made me pretty sad.
IMG_2091.jpg
Just a bit bigger than the pump, rounded. I'll probably reduce size further for V3, although I suspect if I go down further, the Edison might start developing heat issues. The charge ports are exposed on the side. This fits a 18650, Edison and the CC1111, assuming the CC1111 is soldered onto the Edison.
Sulka Haro
@sulkaharo
Jan 16 2016 11:32
@jasoncalabrese did we have a plan on how to manage multiple OpenAPSes reporting to Nightscout simultaneously?
I wanna rig both the dude's bed as well as ours
Sulka Haro
@sulkaharo
Jan 16 2016 12:45
Ha, the case does fit the official MiniMed 554 pouch. Now looks like he's got two pumps on his belt.
Jason Calabrese
@jasoncalabrese
Jan 16 2016 15:10
I was planning on adding a device field to the status json that gets uploaded
That would be some uri that includes the host name of the pi, Edison, etc
Scott Leibrand
@scottleibrand
Jan 16 2016 17:23
But even without that, we have four Pi's uploading with no issues.
Tony Zarro
@tzarro
Jan 16 2016 17:52
Been a few days since I've posted, but here's a quick update: having continued success (especially overnight) with OpenAPS...only thing I've had an issue with is discovering that my battery pack has a feature that automatically shuts itself off after 12 hours or so...when I have some time I'm going to look into doing something about that...ultimately I'd like to integrate a battery into my APS to not worry about undesired features like this :)
Scott Leibrand
@scottleibrand
Jan 16 2016 18:01
In the mean time a lot of us have had success with Tecknet ones.
Kevin Wells
@wkcwells
Jan 16 2016 18:01
My openaps instance got corrupted overnight. pump.ini was empty and git was confused. I rebuilt it pretty quickly. The battery ran out overnight. Do Ineed to explicitly shutdown the pi before pulling power?
Scott Leibrand
@scottleibrand
Jan 16 2016 18:02
Ideally, yes. If it is in the middle of writing pump.ini when it loses power it can fail to finish and leave it truncated.
I used to have a cron job that would copy a backup file if mine was empty. We might need to go back to recommending that for pump.ini
or make it part of oref0-reset-git
Kevin Wells
@wkcwells
Jan 16 2016 18:04
Thanks @scottleibrand . Is there any doc on how git is used? I.e. autocommitting for every command? I was think that - for my online config repo - I would like to turn off autocommit.
Scott Leibrand
@scottleibrand
Jan 16 2016 18:07
It's one commit per alias (executed from shell). So you could reduce the number of commits by consolidating aliases to run each other directly, without running bash in between. That requires moving some logic into devices, though.
Kevin Wells
@wkcwells
Jan 16 2016 18:13
Is that intended just to keep all the current reports in the repo? Or something deeper?
Scott Leibrand
@scottleibrand
Jan 16 2016 18:14
Git gives you a full audit trail of what happened and why.
It's proven useful for in depth debugging of an IOB miscalculation issue. And will be essential if we need to investigate any adverse events.
Matt Pressnall
@logichammer
Jan 16 2016 18:19
About to start looping this weekend! Quick question, I just started my loop up again after not being connected to CGM or messing with the 522 for days. Just hooked everything up for the first time and got a temp basal to set but when it came to do the NS upload, I got back "bash: upload/latest-treatments.json: No such file or directory
No recent treatments to upload". Is this because is needs a backlog of events to pull? Confused as it just set a temp basal...I would think it now has an event / treatment to pull. Thanks!
Kevin Wells
@wkcwells
Jan 16 2016 18:21
Got it. Thanks.
Scott Leibrand
@scottleibrand
Jan 16 2016 18:23
@logichammer did you let it run another pumphistory query after the enacted temp?
Matt Pressnall
@logichammer
Jan 16 2016 18:23
yes
Scott Leibrand
@scottleibrand
Jan 16 2016 18:23
if there were no boluses or temps for 3h prior, the upload immediately after the enact would have no treatments to upload
the next query would pick up the temp though.
Matt Pressnall
@logichammer
Jan 16 2016 18:24
hmmm...run the loop a few times and still no upload
openaps monitor-pump
followed by system("openaps latest-ns-treatment-time");
system("openaps format-latest-nightscout-treatments");
system("openaps upload-recent-treatments");
Scott Leibrand
@scottleibrand
Jan 16 2016 18:24
Try running them manually and see what you get.
And check the intermediate output files.
Matt Pressnall
@logichammer
Jan 16 2016 18:25
running manually and I see both version of the pump history has data
here comes the zoned version
[
  {
    "_type": "TempBasalDuration", 
    "_description": "TempBasalDuration 2000-01-16T10:10:39 head[2], body[0] op[0x16]", 
    "timestamp": "2000-01-16T10:10:39-08:00", 
    "_body": "", 
    "_head": "1601", 
    "duration (min)": 30, 
    "_date": "274a0a5010"
  }, 
  {
    "_type": "TempBasal", 
    "temp": "absolute", 
    "_description": "TempBasal 2000-01-16T10:10:39 head[2], body[1] op[0x33]", 
    "timestamp": "2000-01-16T10:10:39-08:00", 
    "_body": "00", 
    "_head": "3317", 
    "rate": 0.575, 
    "_date": "274a0a5010"
  }
]
AAAAAHHHHH
I think I know what it is
back in a second and it is dumb
Scott Leibrand
@scottleibrand
Jan 16 2016 18:27
That's the y2k16 bug. You need to update openaps/decocare.
You should have gotten an email about it to openaps-dev.
Matt Pressnall
@logichammer
Jan 16 2016 18:29
Y2K16 bug? I think you are joking...my issue, I was a dumb ass and blew away my upload dir...so it couldn't write the file. :)
Scott Leibrand
@scottleibrand
Jan 16 2016 18:29
Until you upgrade, IOB will always be zero, so your loop will have amnesia. Still will work better than no loop, but will oscillate more.
Sounds like two issues then.
After you upgrade, the dates will change from 2000 to 2016
Matt Pressnall
@logichammer
Jan 16 2016 18:30
Ah...I see that now
Going to check email about decocare...didn't see it before
Hmmm...can't see that...best way to update decocare...sorry to be a PITA...
Scott Leibrand
@scottleibrand
Jan 16 2016 18:31
are you subscribed to openaps-dev?
Matt Pressnall
@logichammer
Jan 16 2016 18:32
The google group, I am a member
Scott Leibrand
@scottleibrand
Jan 16 2016 18:32
sudo easy_install -ZU openaps I think.
It was one of Dana's update messages. Early January.
Matt Pressnall
@logichammer
Jan 16 2016 18:32
I see it now...sorry and thanks!
Scott Leibrand
@scottleibrand
Jan 16 2016 18:33
Np
Glad we caught that before you started loping. :-)
Matt Pressnall
@logichammer
Jan 16 2016 18:33
Hell yeah! That would have taken me awhile to figure out
[
  {
    "_type": "TempBasalDuration", 
    "_description": "TempBasalDuration 2016-01-16T10:10:39 head[2], body[0] op[0x16]", 
    "timestamp": "2016-01-16T10:10:39-08:00", 
    "_body": "", 
    "_head": "1601", 
    "duration (min)": 30, 
    "_date": "274a0a5010"
  }, 
  {
    "_type": "TempBasal", 
    "temp": "absolute", 
    "_description": "TempBasal 2016-01-16T10:10:39 head[2], body[1] op[0x33]", 
    "timestamp": "2016-01-16T10:10:39-08:00", 
    "_body": "00", 
    "_head": "3317", 
    "rate": 0.575, 
    "_date": "274a0a5010"
  }
Thanks, Scott!
Scott Leibrand
@scottleibrand
Jan 16 2016 18:34
Cool
Thomas Emge
@ThomasEmge
Jan 16 2016 18:34
what is the motivation for the USB power cycle?
Scott Leibrand
@scottleibrand
Jan 16 2016 18:34
Carelink gets stuck on "ACK is zero bytes"
Matt Pressnall
@logichammer
Jan 16 2016 18:35
Last question for now! You mentioned a circle on the 522 when looping in offline mode...do I need to do anything special to get that to happen or does just talking to the 522 over the carelink make that happen?
Scott Leibrand
@scottleibrand
Jan 16 2016 18:35
have to unplug replug, reboot Pi, or powercycle USB.
The circle just indicates a running temp.
Matt Pressnall
@logichammer
Jan 16 2016 18:35
Easy easy
thanks!
Scott Leibrand
@scottleibrand
Jan 16 2016 18:36
Can also show up for a non-standard basal pattern or a low reservoir though.
Thomas Emge
@ThomasEmge
Jan 16 2016 18:36
Is there a way to target just the stick. I am using SSH and on each cycle my wifi is going as well
Matt Pressnall
@logichammer
Jan 16 2016 18:36
I am so making an image of my pi before looping her today! Lots have gone into this bad boy at this point...really appreciate the help!
Scott Leibrand
@scottleibrand
Jan 16 2016 18:36
It shouldn't reset USB very often. Maybe every few hours.
It should be conditional on mm-stick failing to find the Carelink.
Sounds like your loop may be running it when it shouldn't.
Thomas Emge
@ThomasEmge
Jan 16 2016 18:38
hmm, how do I check for that?
Scott Leibrand
@scottleibrand
Jan 16 2016 18:38
Run that part manually.
mm-stick warmup || echo fail
that will tell you if it's failing and would've run the reset.
Thomas Emge
@ThomasEmge
Jan 16 2016 18:39
correct that is my condition
Scott Leibrand
@scottleibrand
Jan 16 2016 18:40
What is the output?
and is the Carelink plugged in properly?
make sure any USB extension cable is good
Thomas Emge
@ThomasEmge
Jan 16 2016 18:40
and it is failing on the first attempt but then succeeds after the cycle
Scott Leibrand
@scottleibrand
Jan 16 2016 18:41
do you have a second Carelink?
need to narrow down which piece of hardware is being flaky.
Thomas Emge
@ThomasEmge
Jan 16 2016 18:41
unfortunately not....yet
Scott Leibrand
@scottleibrand
Jan 16 2016 18:42
Order one ASAP, cause it might be failing on you.
Thomas Emge
@ThomasEmge
Jan 16 2016 18:42
let me try cable first
Scott Leibrand
@scottleibrand
Jan 16 2016 18:42
For interactive testing, you could do a manual unplug instead of resetting USB.
Matt Pressnall
@logichammer
Jan 16 2016 18:42
@danamlewis, yes, I have an OK soldering iron, lots of solder, wire, helping hands (which is freaking awesome), decent snips. I'm coming downtown Monday and Tuesday so we can meet up if you need them. I'll look like the Unibomber coming through the bus tunnel with all that stuff but I can risk it! :)
Aaron Michelson
@Aaybob
Jan 16 2016 18:44
Hi never RPi on network. ifconfig results are
wlan0
Thomas Emge
@ThomasEmge
Jan 16 2016 18:44
I understand but I want to loop
Scott Leibrand
@scottleibrand
Jan 16 2016 18:45
Does it loop ok once after each reset?
Aaron Michelson
@Aaybob
Jan 16 2016 18:46
Link encap: Ethernet HWAddr 74:.......
UP Broadcast multicast mtu : 1500 metric:1
RX packets:0 errors:0 dropped: 13 overruns:0 friend:0
TX packets:0.....all zeros carrier:0
Thomas Emge
@ThomasEmge
Jan 16 2016 18:47
most of the time when looking at my logs....Sometimes I do see 2 cycles before it succeeds
Aaron Michelson
@Aaybob
Jan 16 2016 18:47
collisions:0 txquesteion:1000
RX bytas:0 (0.0 B) TX bytes:0 (0.0 B)
Scott Leibrand
@scottleibrand
Jan 16 2016 18:48
Might be able to loop by just letting it cycle it until it works. Better to replace the flaky hardware though.
@Aaybob sounds like you're not connected to wifi. Have you tried setting it up with the monitor mouse and keyboard?
Aaron Michelson
@Aaybob
Jan 16 2016 18:49
that's the only way in that i know of with SSH not working
Scott Leibrand
@scottleibrand
Jan 16 2016 18:50
In the GUI there is a wifi settings app. You should be able to get wifi set up that way and verify the Pi has Internet.
Same way you would with a new Windows computer.
Thomas Emge
@ThomasEmge
Jan 16 2016 18:50
currently I am attempting it 3 times before I let it go but I am a little concerned for the wifi dongle and the dex in how they are handling the cycle
Scott Leibrand
@scottleibrand
Jan 16 2016 18:51
Wifi sometimes takes a bit to recover. Dex doesn't seem to care, just flashes the power screen.
For non-interactive you can afford for wifi to be intermittent, as long as Dex is plugged in.
For interactive you can do the resetting manually.
Not ideal, but might work, as long as the reset recovers the Carelink.
Thomas Emge
@ThomasEmge
Jan 16 2016 18:55
yeah I see your point...
Kevin Wells
@wkcwells
Jan 16 2016 18:58
I am running open loop with 2 NS upload cron jobs offeset in time. 1 for status and one for treatments. Even though offset, they tend to collide over the use of the Carelink stick. What is the best practice to avoid this?
Aaron Michelson
@Aaybob
Jan 16 2016 18:59
the command raspi -config says command not found
--help says command not found
ifconfig is found
I was in the gui last night and didn't find a network setup but the keyboard was working and commands were all found
Scott Leibrand
@scottleibrand
Jan 16 2016 19:05
raspi-config has no space
I'd the the GUI again. It's in the menu at the top. If you can't find it, Google for a walkthrough with screenshots.
@wkcwells I do my upload in my main loop.
Aaron Michelson
@Aaybob
Jan 16 2016 19:06
isn't raspi -config the way to start the gui?
Scott Leibrand
@scottleibrand
Jan 16 2016 19:06
No
startx
when working on the command line, you have to pay attention to details like spacing etc.
computers are very literal.
Dana Lewis
@danamlewis
Jan 16 2016 19:08
@logichammer email to openaps-dev was titled "y2k16 bug fix; other OpenAPS updates!" on Jan. 11. Would love suggestions from all on better headlines for emails, since no one reads email anymore ;) :)
Aaron Michelson
@Aaybob
Jan 16 2016 19:08
startx huh..ok well ... where do spaces go, are required?
Scott Leibrand
@scottleibrand
Jan 16 2016 19:08
I told you raspi-config has no space, and you still put a space in it.
You'll have to notice stuff like that to work well at the command line.
@wkcwells I do a full upload after pulling pumphistory and enacting, before waiting for new BG
then after getting new BG and enacting again, just do a status upload (not full treatments, since I haven't refreshed those)
Aaron Michelson
@Aaybob
Jan 16 2016 19:11
OK need to print out the command format
Scott Leibrand
@scottleibrand
Jan 16 2016 19:11
then that loop instance ends, the next one starts <1m later, and it tries another pumphistory query.
@Aaybob yeah, making good notes helps.
@esteward was a Linux newbie at first and took a lot of good notes as we walked him through stuff.
Aaron Michelson
@Aaybob
Jan 16 2016 19:13
when i write something i can't tell if it had a space or not and the paper and pen im using streak the ink
Thomas Emge
@ThomasEmge
Jan 16 2016 19:13
@danamlewis you mentioned a NS battery pillbox in a posting the other day ... what azure enable keyword is that?
Scott Leibrand
@scottleibrand
Jan 16 2016 19:13
Sometimes people use underscores to represent spaces, but then you have to do something different for actual _'s
Could also take your notes on a computer.
Just be careful not to let Word or similar "autocorrect" them. ;-)
Aaron Michelson
@Aaybob
Jan 16 2016 19:15
its going to be so easy when I dont have to run from one room to the other to run a RPi command and see what command to run
Scott Leibrand
@scottleibrand
Jan 16 2016 19:16
;-)
Dana Lewis
@danamlewis
Jan 16 2016 19:20
@ThomasEmge Need to ask @jasoncalabrese if he has it as a pillbox, we aren't displaying as a pillbox, I am using email alerts (plenty good enough from my experience)
I'm also doing alerts for low reservoir warning. Just got one in fact :)
Thomas Emge
@ThomasEmge
Jan 16 2016 19:25
@danamlewis @jasoncalabrese I have a battery pillbox but it shows the battery level from the xdrip rig. Do tell about more this email setup of yours - it sounds interesting.
Scott Leibrand
@scottleibrand
Jan 16 2016 19:29
0 cat /home/sleibrand/oref0-dev/monitor/battery.json | /usr/bin/json -c 'this.voltage < 1.35' | grep [0-9] && cat /home/sleibrand/oref0-dev/monitor/battery.json | mail -s "Low pump battery warning" scottleibrand@gmail.com
Dana Lewis
@danamlewis
Jan 16 2016 19:30
Ah. So my battery alert is from the pump, because lithium batteries last a lot longer than standard (7+ days vs 3 days), but they go from full voltage to little in the course of a few hours. So I do email alerts on voltage status, and you can see it going back and forth for an hour or two and then a few hours later it drops off. (Equivalent of seeing it on pump 3 bars back to 4, then whoosh down to low battery mode on pump, meaning openAPS can't work because RF on pump turns off then.)
Hard to make sure the pump battery won't die overnight otherwise unless you carefully track how many days it's been, and tracking is a pain
Scott Leibrand
@scottleibrand
Jan 16 2016 19:31
That cron job is from my VM, not the Pi. Would probably need to set up Mail on the Pi to do it there. Or use pushover API or something.
Dana Lewis
@danamlewis
Jan 16 2016 19:33
@ThomasEmge ^ see @scottleibrand cron above for example
Thomas Emge
@ThomasEmge
Jan 16 2016 19:41
I see, I haven't really come up with something practical to keep the PI in a connected state at all times. I'll keep that in mind once I have a more real world experience on how everything works.
Dana Lewis
@danamlewis
Jan 16 2016 19:43
Yep. It'll be a bigger deal if/when you're running the loop frequently. Even overnight only will draw battery down faster than standard non-loop pump ise.
Jason Calabrese
@jasoncalabrese
Jan 16 2016 19:52
I'm working on this nightscout/cgm-remote-monitor#1455
Has battery alerts and a pill that currently slowed the reservoir and pump battery
It needs some more options to make it work for everyone
Goal is to have that work for OpenAPS, RileyLink, Connect, tslim, etc
Dana Lewis
@danamlewis
Jan 16 2016 19:54
:+1:
Ben West
@bewest
Jan 16 2016 19:55
cc-1111 :-)
Matt Pressnall
@logichammer
Jan 16 2016 20:00
quick / silly question: the pump had a max basal of 2 units an hour and I see that referenced in profile.json but when it comes to temp basals, the most it sets is .6 an hour. I'm assuming that is some software / config setting that allows that to be hard set / limited. Where might I find that?
Thomas Emge
@ThomasEmge
Jan 16 2016 20:00
@jasoncalabrese after reading through the link I now do remember what type of battery I put into the pump the last time ;)
Scott Leibrand
@scottleibrand
Jan 16 2016 20:01
@logichammer paste your profile.json?
Matt Pressnall
@logichammer
Jan 16 2016 20:02
{"max_iob":20,"type":"current","dia":4,"current_basal":0.25,"max_daily_basal":0.25,"max_basal":2,"min_bg":90,"max_bg":120,"sens":100}
Scott Leibrand
@scottleibrand
Jan 16 2016 20:02
max basal is limited by multiples of your current basal and your max daily basal. Something like 3x and 4x respectively.
So probably the 3x is operative, limiting you to .75U/hr.
Matt Pressnall
@logichammer
Jan 16 2016 20:02
So it is a determined value then in software
Scott Leibrand
@scottleibrand
Jan 16 2016 20:03
It's the min of all three
so you can reduce it, but not raise it, from those multiples.
if you set a higher basal schedule obviously the calculated limits will also be higher.
Matt Pressnall
@logichammer
Jan 16 2016 20:04
So it based off of current_basal as opposed to anything else. Correct?
it is based, I mean
Matt Pressnall
@logichammer
Jan 16 2016 20:14
Perfect! max_daily_basal is pulled from the pump? We are checking right now...new to medtronic
Thanks for passing that along
We can't find out to see max_daily_basal on the pump so where does that number come from?
set
Scott Leibrand
@scottleibrand
Jan 16 2016 20:16
It's the highest basal in your daily schedule.
Matt Pressnall
@logichammer
Jan 16 2016 20:16
PERFECT!
Thanks, man!
Starting the loop in about 10 minutes...after I image the pi! Stoked!
Dana Lewis
@danamlewis
Jan 16 2016 20:22
Wahoo! Take a pic, you'll want to remember it :)
Matt Pressnall
@logichammer
Jan 16 2016 20:22
I will!
Sulka Haro
@sulkaharo
Jan 16 2016 21:33
Hey I'll probably be in San Francisco on Sunday March 13th. If anyone's around, I'd love to meet!
Matt Pressnall
@logichammer
Jan 16 2016 21:53
@danamlewis , looping! Immediately had to do the check / restart USB but things are running fine now...she just ate though so nothing happening for awhile. I checked and had email delivery not turned on for the google group so I have that now on and if you need soldering stuff, let me know. Also, lobbying for Feb 2 or 3rd for a meetup!
Tony Zarro
@tzarro
Jan 16 2016 21:58
pi@aps:~/openaps $ openaps use cgm iter_glucose 2
[
{
"trend_arrow": "FLAT",
"system_time": "2016-01-18T16:00:18",
"display_time": "2016-01-16T16:52:16",
"glucose": 147
},
{
"trend_arrow": "FLAT",
"system_time": "2016-01-18T15:55:18",
"display_time": "2016-01-16T16:47:16",
"glucose": 151
}
]Traceback (most recent call last):
File "/usr/local/bin/openaps-use", line 4, in <module>
import('pkg_resources').run_script('openaps==0.0.9', 'openaps-use')
File "build/bdist.linux-armv7l/egg/pkgresources/_init.py", line 745, in run_script
File "build/bdist.linux-armv7l/egg/pkgresources/_init.py", line 1670, in run_script
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-use";, line 63, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/cli/init.py", line 45, in call
self.epilog( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-use";, line 50, in epilog
super(UseToolApp, self).epilog( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/cli/init.py", line 64, in epilog
self.create_git_commit( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/cli/init.py", line 71, in create_git_commit
self.git_repo( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/cli/init.py", line 67, in git_repo
self.repo = getattr(self, 'repo', Repo(os.getcwd( )))
File "/usr/local/lib/python2.7/dist-packages/GitPython-1.0.1-py2.7.egg/git/repo/base.py";, line 167, in init
raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: /home/pi/openaps
Having an error that cropped up earlier today, but haven't been able to figure it out...looks like the openaps directory is no longer considered a valid git repository...
I've tried oref0-reset-git, but I get the same "not a valid repository" error
pi@aps:~/openaps $ oref0-reset-git
fatal: Not a git repository (or any of the parent directories): .git
mv: cannot stat ‘.git’: No such file or directory
Scott Leibrand
@scottleibrand
Jan 16 2016 22:02
Try getting the latest dev and trying oref0-reset-git again.
I fixed that issue this week.
Tony Zarro
@tzarro
Jan 16 2016 22:02
Ok
Jason Calabrese
@jasoncalabrese
Jan 16 2016 22:05
@sulkaharo would be great to meetup in SF then, I need to see how it lines up with a trip to NY
Ben West
@bewest
Jan 16 2016 22:12
as in tomorrow, @sulkaharo ?
oh march
hehe
Sulka Haro
@sulkaharo
Jan 16 2016 22:12
yeah :D
early warning klaxon
Ben West
@bewest
Jan 16 2016 22:12
added to calendar
Tony Zarro
@tzarro
Jan 16 2016 22:23
@scottleibrand looked back at my notes, and I'm not sure hot to "get the latest dev"...I don't think I've installed any OpenAPS project files since the original install...in order to get the latest dev, is it another install command like "sudo easy_install -ZU openaps", and if so how do I specify the dev branch?
Scott Leibrand
@scottleibrand
Jan 16 2016 22:24
If you want dev you have to do quick-src instead of quick-pkgs
Tony Zarro
@tzarro
Jan 16 2016 22:28
Will look into it later, thanks! :)
Dragan Maksimovic
@dm61
Jan 16 2016 22:40
I was just about to look into getting the latest dev (I've been running the loop using master so far). So, I would do quick-src script as in "Installing from source" section of the doc?
Scott Leibrand
@scottleibrand
Jan 16 2016 22:41
Yep.
Be aware that dev has some more aggressive tweaks to the algorithm for setting high and low temps.
Dragan Maksimovic
@dm61
Jan 16 2016 22:42
ok, will watch for that
Scott Leibrand
@scottleibrand
Jan 16 2016 22:43
If you don't configure meal assist, it will still do "wtf-assist" when rising fast from a meal or anything else, and high-temp to help.
Dragan Maksimovic
@dm61
Jan 16 2016 22:43
ok
Scott Leibrand
@scottleibrand
Jan 16 2016 22:44
On the other side, when dropping more than expected, it projects that deviation to continue for 30m instead of just 15, so it low-temps more aggressively.
If you want it to do meal assist based on carbs: https://gist.github.com/scottleibrand/63a8541397378bf9f4b8
Dragan Maksimovic
@dm61
Jan 16 2016 22:51
Great, thanks. Another question: let's say I wanted to make a change in oref0 code and try it out. Would this be a way to go: install your dev first using quick-src (this should get me everything). Then fork oref0, and do the clone line for oref0 in the quick-src script, but from my fork. Then I can do whatever I like in oref0 locally. Finally, I could push this back to my fork of oref0 and potentially PR if I thought there was anything useful to consider. Does this sound correct?
Scott Leibrand
@scottleibrand
Jan 16 2016 22:51
Too complicated. :-)
You can start by just making the change on your Pi after you do quick-src
Dragan Maksimovic
@dm61
Jan 16 2016 22:52
But at least not wrong :smile:
ok, but then what?
Scott Leibrand
@scottleibrand
Jan 16 2016 22:53
If it tests out and you want to push to github, you can just change the remote to point to your fork
Dragan Maksimovic
@dm61
Jan 16 2016 22:53
ok, makes sense
Scott Leibrand
@scottleibrand
Jan 16 2016 22:53
Basically same thing you said, except only doing things as needed.
Your way would also work though.
Dragan Maksimovic
@dm61
Jan 16 2016 22:53
yes, understand
Scott Leibrand
@scottleibrand
Jan 16 2016 22:54
Also, waiting on changing origin makes it easier to merge new stuff from dev
you just git pull rather than having to PR it to your fork
ideal would be to add your fork as a second origin, if you don't mind keeping track of both.
But there are like 18 ways to do this that will all work fine. ;-)
Dragan Maksimovic
@dm61
Jan 16 2016 22:58
I have to admit GitHub is pretty cool - glad I've got to learn a little bit about it - a side benefit of running the OpenAPS loop :smile:
Scott Leibrand
@scottleibrand
Jan 16 2016 22:59
:-)
Crestym
@Crestym
Jan 16 2016 23:14
Hi Guys. When I pull my pump history from my medtronic 723 pump it it gets the bolus timestamps as being in the year 2000. I checked the system time on the pump and it is accurate. The month and date are fine but the year returns 2000 rather than 2016. This seems to affect my iob calculations as I am getting 0 in the iob.json.
Rachel Sandlain
@audiefile
Jan 16 2016 23:18
that's a 'y2k16' bug, you need to update decocare/openaps. If I remember correctly sudo easy_install -ZU update
Jason Curry
@mccgm
Jan 16 2016 23:21
Where is the best source for troubleshooting my rp connections? I am in phase 1 with my openaps installed and configured. I have added both Medtronic pump and Dexcom. I am able to communicate with the Dex, but no comms with the pump...Any guesses on where I can start?
Rachel Sandlain
@audiefile
Jan 16 2016 23:21
are you sure they are physically close enough? the range is pretty depressing
like 3 feet
Jason Curry
@mccgm
Jan 16 2016 23:22
About 3 ft...
Dragan Maksimovic
@dm61
Jan 16 2016 23:22
I kept my pump next to the CareLink stick while I was setting things up
Jason Curry
@mccgm
Jan 16 2016 23:23
OK, is the CareLink stick essential? I'm using Dexcom share.
Dragan Maksimovic
@dm61
Jan 16 2016 23:24
you can't communicate with the pump without the CareLink stick
Rachel Sandlain
@audiefile
Jan 16 2016 23:24
Try having them even closer. If you have another stick try that one. If you use an extension cable try swaping
Jason Curry
@mccgm
Jan 16 2016 23:24
OK, that's got to be it. Thanks for the great support.
Rachel Sandlain
@audiefile
Jan 16 2016 23:25
People are working on alternative hardware options. I'd get set up with carelink first as it's most straight forward, then once you are confident with things, maybe try one of the alternatives
Jason Curry
@mccgm
Jan 16 2016 23:30
I assume openaps has drivers to run the carelink stick?
Dragan Maksimovic
@dm61
Jan 16 2016 23:32
yes it does
Jason Curry
@mccgm
Jan 16 2016 23:46
Success! Thanks again.
Crestym
@Crestym
Jan 16 2016 23:50
@audiefile Thanks! Fixed it by reinstalling openaps.
Dragan Maksimovic
@dm61
Jan 16 2016 23:53
:+1: