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

18th
Jan 2016
Ben West
@bewest
Jan 18 2016 00:01
that's not for oref0
for oref0, try npm show oref0 version
JaysonEwer
@JaysonEwer
Jan 18 2016 00:02
thank you @bewest
Ben West
@bewest
Jan 18 2016 00:02
oh, I misread, that is for oref0, but tells you git status, not the npm version
JaysonEwer
@JaysonEwer
Jan 18 2016 00:03
Yeah, I was just looking to make sure I was on the correct version of oref0. Im at 0.1.2, which is the latest, right?
Ben West
@bewest
Jan 18 2016 00:03
looks like it to me
JaysonEwer
@JaysonEwer
Jan 18 2016 00:04
I'm stuck at setting up enact/enacted.json. I don't see anything in the documents for how to set that up. I see it called using the following alias:
Let me try that again:
enact ! bash -c "rm enact/suggested.json; openaps report invoke enact/suggested.json && cat enact/suggested.json && grep -q duration enact/suggested.json && ( openaps report invoke enact/enacted.json && cat enact/enacted.json ) || echo No action required"
But I haven't created the enacted.json yet. What all do I need to include in the enacted.json?
Ben West
@bewest
Jan 18 2016 00:05
what's your report defintion
JaysonEwer
@JaysonEwer
Jan 18 2016 00:05
I guess that's where i'm stuck.
Ben West
@bewest
Jan 18 2016 00:05
try running it manually without reports using the use command
you can do dopenaps report show enact/enacted.json
JaysonEwer
@JaysonEwer
Jan 18 2016 00:06
Yeah, I haven't created it yet.
Ben West
@bewest
Jan 18 2016 00:07
ah, so you have the suggestion currently
cat enact/suggested.json
JaysonEwer
@JaysonEwer
Jan 18 2016 00:07
correct
pi@Ewer-Open-APS:~/Documents/openaps $ cat enact/suggested.json 
{"temp":"absolute","bg":140,"tick":-2,"eventualBG":135,"snoozeBG":135,"reason":"Eventual BG 135>90 but Delta -2 < Exp. Delta -0.6; no temp to cancel"}
pi@Ewer-Open-APS:~/Documents/openaps $
so how do I turn the suggested into enacted?
Ben West
@bewest
Jan 18 2016 00:08
using temp basals?
usually there is a rate and a duration field, see how the alias is checking for that
so the whole idea here is we want to use temp basals to change insulin
so we need a pump use that does temp basal
JaysonEwer
@JaysonEwer
Jan 18 2016 00:09
Yes, I have seen the rate and duration fields populated before.
Ben West
@bewest
Jan 18 2016 00:09
there should probably be more about this in the docs
but we can look in the pump menu to look at all the uses
openaps use pump -h
JaysonEwer
@JaysonEwer
Jan 18 2016 00:10
@scottleibrand indicated it was very TERSE on this point for good reason. :-D
Ben West
@bewest
Jan 18 2016 00:10
there's a list of all the uses, now that you have some experience with some of the other uses
they should look familiar
there should be one for temp basal :-)
you can look at the help for it
for me it's something like openaps use pump set_temp_basal -h
JaysonEwer
@JaysonEwer
Jan 18 2016 00:11
yes, i've sent the command to my pump in testing to create a temp basal, I guess i'm just not 100% sure how to read in the suggested json settings into the enacted json?
Ben West
@bewest
Jan 18 2016 00:11
hmmm, should probably improve the help output there too
that's the input file
when you did it before, how did you test it?
you put the rate and duration in a file and give the file to this use? it's the same
the suggested.json has the needed input for set_temp_basal
JaysonEwer
@JaysonEwer
Jan 18 2016 00:13
Ok, let me wrestle with this for a few mintues, I think I'm understanding what you're saying.
ok
Ben West
@bewest
Jan 18 2016 00:13
that should probably be clear in the determine-basal tool help, too
so this tool is automatically creating the file you manually created earlier
JaysonEwer
@JaysonEwer
Jan 18 2016 00:14
right, so i'm not sure if you saw the conversation scott and I had earlier. I am currently able to manually run my loop alias. It appears to be good aside from the ability to enact a temp basal.
Ben West
@bewest
Jan 18 2016 00:14
it's similar to how we used the tool to prep the profile
JaysonEwer
@JaysonEwer
Jan 18 2016 00:15
so all my other aliases and reports are working as expected, I just didn't setup the enacted.json yet.
Ben West
@bewest
Jan 18 2016 00:15
and then give the profile to iob tool
one tool preps the recommendation and saves it
the other tool takes the recommendation and enacts it
so the output from one is the input for the next
JaysonEwer
@JaysonEwer
Jan 18 2016 00:16
cool
So here is the output when it appears to work correctly and I'm gathering that it looks good because I don't need a temp basal at the moment.
pi@Ewer-Open-APS:~/Documents/openaps $ openaps loop
cgms://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
pump://JSON/model/model.json
reporting model.json
PREFLIGHT OK
cgms://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
pump://JSON/read_clock/monitor/clock.json
reporting monitor/clock.json
pump://JSON/read_temp_basal/monitor/temp_basal.json
reporting monitor/temp_basal.json
pump://JSON/iter_pump_hours/monitor/pumphistory.json
reporting monitor/pumphistory.json
calculate-iob://JSON/shell/monitor/iob.json
reporting monitor/iob.json
pump://JSON/read_settings/settings/settings.json
reporting settings/settings.json
pump://JSON/read_bg_targets/settings/bg_targets.json
reporting settings/bg_targets.json
pump://JSON/read_insulin_sensitivies/settings/insulin_sensitivities.json
reporting settings/insulin_sensitivities.json
pump://JSON/read_basal_profile_std/settings/basal_profile.json
reporting settings/basal_profile.json
get-profile://text/shell/settings/profile.json
reporting settings/profile.json
determine-basal://text/shell/enact/suggested.json
{"delta":-1,"glucose":134,"avgdelta":-1.3333333333333333}
{"duration":0,"rate":0,"temp":"percent"}
{"bolusiob":0,"iob":0,"activity":0}
{"max_iob":2,"type":"current","dia":4,"current_basal":2,"max_daily_basal":2,"max_basal":3,"min_bg":90,"max_bg":120,"sens":50}
reporting enact/suggested.json
{"temp":"absolute","bg":134,"tick":-1,"eventualBG":130,"snoozeBG":130,"reason":"Eventual BG 130>90 but Avg. Delta -1.33 < Exp. Delta -0.5; no temp to cancel"}
No action required
Ben West
@bewest
Jan 18 2016 00:18
yeah, depending on your version of openaps, I recently added a patch that removes the need for that alias
the alias is adding a little extra bash stuff to test for the duration/rate, and then print "No action required" if it doesn't exist
JaysonEwer
@JaysonEwer
Jan 18 2016 00:18
I think I updated my openaps last night
Ben West
@bewest
Jan 18 2016 00:19
previous version of the tool would produce an error message if the duration/rate is missing, the newer patch (on dev maybe) checks for these things in the tool itself
so, coming soon maybe :-)
JaysonEwer
@JaysonEwer
Jan 18 2016 00:19
cool
JaysonEwer
@JaysonEwer
Jan 18 2016 00:27
@bewest I couldn't help but notice in your openaps-example you are using an enacted.json that appears to be using oref0-predict, is that a different/new way to do it?
Ben West
@bewest
Jan 18 2016 00:28
ah
well, yes, in some ways...
hmm
so instead of enact I call that phase/directory oref0-predict instead
so my oref0-predict/oref0.json is the same as your enact/suggested.json
JaysonEwer
@JaysonEwer
Jan 18 2016 00:29
Ok, that makes sense.
Ben West
@bewest
Jan 18 2016 00:30
just playing with different ways to name/describe things
Toby Canning
@TC2013
Jan 18 2016 00:30
I may need to reload... when I run ./configure --enable-experimental I get
No package 'systemd' found configure: error: systemd system unit directory is required
Ben West
@bewest
Jan 18 2016 00:30
ah, you are not using systemd
are you really on jessie?
Toby Canning
@TC2013
Jan 18 2016 00:30
Yes, but on Edison
Ben West
@bewest
Jan 18 2016 00:30
hmmm
hmmm
try without systemd?
important thing is that enable-experimental thing
Toby Canning
@TC2013
Jan 18 2016 00:31
yes, let me grab that error
ImportError: No module named Adafruit_BluefruitLE
Ben West
@bewest
Jan 18 2016 00:32
that seems good
what is that error from?
Toby Canning
@TC2013
Jan 18 2016 00:32
openaps use share iter_glucose
Ben West
@bewest
Jan 18 2016 00:34
( cd ~/src/; git clone -b wip/bewest/custom-gatt-profile git://github.com/bewest/Adafruit_Python_BluefruitLE.git; cd Adafruit_Python_BluefruitLE; sudo python setup.py develop )
checkout my special branch from my repo, run python install stuff on it
Toby Canning
@TC2013
Jan 18 2016 00:36
thanks!
JaysonEwer
@JaysonEwer
Jan 18 2016 00:41
@bewest @scottleibrand I'm not sure I did the enact/enacted.json, because it didn't cancel my tempbasal, but I also didn't get the invoke error I was before.
{"max_iob":2,"type":"current","dia":4,"current_basal":2,"max_daily_basal":2,"max_basal":3,"min_bg":90,"max_bg":120,"sens":50}
reporting enact/suggested.json
{"temp":"absolute","bg":125,"tick":-1,"eventualBG":121,"snoozeBG":121,"reason":"Eventual BG 121>90 but Avg. Delta -1.33 < Exp. Delta -0.3; cancel","duration":0,"rate":0}
pump://JSON/set_temp_basal/enact/enacted.json
reporting enact/enacted.json
{
  "requested": {
    "duration": 0, 
    "rate": 0, 
    "temp": "absolute"
  }, 
  "bg": 125, 
  "temp": "percent", 
  "snoozeBG": 121, 
  "timestamp": "2016-01-17T19:38:34.993425", 
  "rate": 101, 
  "reason": "Eventual BG 121>90 but Avg. Delta -1.33 < Exp. Delta -0.3; cancel", 
  "eventualBG": 121, 
  "recieved": false, 
  "duration": 30, 
  "tick": -1
}pi@Ewer-Open-APS:~/Documents/openaps $
I'm not sure I did it correctly, that is.
Ben West
@bewest
Jan 18 2016 00:44
does openaps know you changed the history on your pump?
JaysonEwer
@JaysonEwer
Jan 18 2016 00:45
When I set the temp basal to 101%, and re-ran my loop alias, It does show the duration and rate
Ben West
@bewest
Jan 18 2016 00:45
0, 0, it's canceling your temp, yup
JaysonEwer
@JaysonEwer
Jan 18 2016 00:46
yes, it knows I have it set to rate of 101, but It didn't cancel it yet.
Ben West
@bewest
Jan 18 2016 00:46
ah
I see what happened
you are asked for an absolute temp rate
but your pump is in percent mode
JaysonEwer
@JaysonEwer
Jan 18 2016 00:46
ah
How do I make both options available?
Ben West
@bewest
Jan 18 2016 00:47
the pump can only do one at a time
all the oref0 stuff relies on absolute rates
Toby Canning
@TC2013
Jan 18 2016 00:47
This message was deleted
This message was deleted
Ben West
@bewest
Jan 18 2016 00:47
NICE @TC2013 :-)
Toby Canning
@TC2013
Jan 18 2016 00:48
Ha! Deleted wrong message
Thanks @bewest and @scottleibrand for all the help. Wheezy instruction on the edison with that policy modification work perfect!
JaysonEwer
@JaysonEwer
Jan 18 2016 00:50
YES!!!
@bewest @scottleibrand IT WORKED!!!
sweet!!
Thank you, @bewest , you rock!!!
Although, I don't see the prior temp basal rate in this output, but when I set the temp basal, then ran my loop, it canceled the temp basal.
{"delta":-2,"glucose":122,"avgdelta":-1.3333333333333333}
{"duration":30,"rate":1,"temp":"absolute"}
{"bolusiob":0,"iob":-0.049989814,"activity":-0.000002777777777777778}
{"max_iob":2,"type":"current","dia":4,"current_basal":2,"max_daily_basal":2,"max_basal":3,"min_bg":90,"max_bg":120,"sens":50}
reporting enact/suggested.json
{"temp":"absolute","bg":122,"tick":-2,"eventualBG":120,"snoozeBG":120,"reason":"Eventual BG 120>90 but Delta -2 < Exp. Delta -0.3; cancel","duration":0,"rate":0}
pump://JSON/set_temp_basal/enact/enacted.json
reporting enact/enacted.json
{
  "bg": 122, 
  "temp": "absolute", 
  "snoozeBG": 120, 
  "recieved": true, 
  "rate": 0.0, 
  "reason": "Eventual BG 120>90 but Delta -2 < Exp. Delta -0.3; cancel", 
  "eventualBG": 120, 
  "timestamp": "2016-01-17T19:49:58.475526", 
  "duration": 0, 
  "tick": -2
}pi@Ewer-Open-APS:~/Documents/openaps $
Oh, actually I do see the duration and rate, but I don't remember it being set to 1. Let me retry my test.
JaysonEwer
@JaysonEwer
Jan 18 2016 00:56
Fantastic, yep, its working!!
{"delta":-2,"glucose":120,"avgdelta":-1.6666666666666665}
{"duration":60,"rate":0.1,"temp":"absolute"}
{"bolusiob":0,"iob":-0.04998897539125,"activity":-0.000002986111111111111}
{"max_iob":2,"type":"current","dia":4,"current_basal":2,"max_daily_basal":2,"max_basal":3,"min_bg":90,"max_bg":120,"sens":50}
reporting enact/suggested.json
{"temp":"absolute","bg":120,"tick":-2,"eventualBG":117,"snoozeBG":117,"reason":"Eventual BG 117>90 but Delta -2 < Exp. Delta -0.2; cancel","duration":0,"rate":0}
pump://JSON/set_temp_basal/enact/enacted.json
reporting enact/enacted.json
{
  "bg": 120, 
  "temp": "absolute", 
  "snoozeBG": 117, 
  "recieved": true, 
  "rate": 0.0, 
  "reason": "Eventual BG 117>90 but Delta -2 < Exp. Delta -0.2; cancel", 
  "eventualBG": 117, 
  "timestamp": "2016-01-17T19:55:44.360317", 
  "duration": 0, 
  "tick": -2
}pi@Ewer-Open-APS:~/Documents/openaps $
Ben West
@bewest
Jan 18 2016 00:58
IMG_0368.JPG
my new wireless rig :-D
need to something about that power situation
Toby Canning
@TC2013
Jan 18 2016 01:05
Nice!!!
And what a clean desk!
Ben West
@bewest
Jan 18 2016 01:07
lol
that's my piano bench
JaysonEwer
@JaysonEwer
Jan 18 2016 01:18
Is this a sign of impending doom? var/log/messages is filled with this stuff:
Jan 17 16:41:10 Ewer-Open-APS bad zero CRC?
Jan 17 16:41:10 Ewer-Open-APS bad zero CRC?
Jan 17 16:41:11 Ewer-Open-APS bad zero CRC?
Jan 17 16:44:17 Ewer-Open-APS Stick transmit[TransmitPacket:PowerControl:data:unknown] reader[ReadRadio:size:0] download_i[2] status[<LinkStatus:0x03:st
atus:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:
size(0)>]:download(attempts[2],expect[0],results[0]:data[0]):BAD AILING
Jan 17 16:44:19 Ewer-Open-APS Stick transmit[TransmitPacket:PowerControl:data:unknown] reader[ReadRadio:size:0] download_i[3] status[<LinkStatus:0x03:st
atus:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:
size(0)>]:download(attempts[3],expect[0],results[0]:data[0]):BAD AILING
Jan 17 16:49:28 Ewer-Open-APS bad zero CRC?
Jan 17 16:49:29 Ewer-Open-APS bad zero CRC?
Jan 17 16:49:29 Ewer-Open-APS bad zero CRC?
Ben West
@bewest
Jan 18 2016 01:19
probably not
those are expected from time to time, I may remove those log messages
JaysonEwer
@JaysonEwer
Jan 18 2016 01:20
as far as the bad zero CRC, do I need to check my file system with fsck or something like that?
or are those coming from the Carelink?
Ben West
@bewest
Jan 18 2016 01:21
it's coming from decocare, yeah
it's fine
JaysonEwer
@JaysonEwer
Jan 18 2016 01:21
ok
cool, thank you
Aaron Michelson
@Aaybob
Jan 18 2016 01:39
git repository worked after I removed my conflict .gitignore file. while trying to get repository to work I created a "second-repository" and that one still has <cgm>.ini with my serial number. Do I need to pull that repository to delete that file and then push it. Or could I delete "second-repository". Getting confused
Scott Leibrand
@scottleibrand
Jan 18 2016 01:49
@bewest after awhile I'm getting NoneType errors again. :-(
Ben West
@bewest
Jan 18 2016 01:53
hmm
it's intermittent/goes away?
I'm sure there are things to tweak/adjust
Scott Leibrand
@scottleibrand
Jan 18 2016 01:58
So far it hasn't recovered.
Aaron Michelson
@Aaybob
Jan 18 2016 02:00
What does "congratulations on your first PR" mean?
Dana Lewis
@danamlewis
Jan 18 2016 02:00
@aaybob your pull request. although now I see it's a comment on a commit rather than a PR, so will need to walk you through putting it in as a PR
Aaron Michelson
@Aaybob
Jan 18 2016 02:01
I wanted to do a PR
Ben West
@bewest
Jan 18 2016 02:02
I seem to have busted my libc install
Aaron Michelson
@Aaybob
Jan 18 2016 02:02
I'm kind of brain dead now though. And want to read up on Phase 2
Dana Lewis
@danamlewis
Jan 18 2016 02:33
@Aaybob no worries, we can work through it another time when you're up for it & someone (doesn't have to be me!) is around to walk you through it. Here's a good resource, though, for background reading on PRs: https://help.github.com/articles/using-pull-requests/
Aaron Michelson
@Aaybob
Jan 18 2016 02:47
I did do a pull request on my personal public repository, a PR on my PPR. But then I had only two masters and I pulled a blank repository so I could push back to it. But the pull didn't overwrite my local. So I'm finding the principles of git confusing. In other words I checked out "first-repo" which was blank into a local working directory with all the files from setup. The pull brought in a .ignore and readme that were the only files in the git repository. I'm just thinking through what was confusing at the time.
JaysonEwer
@JaysonEwer
Jan 18 2016 02:47
I've been manually running my loop alias and my Blood sugars have been fine, but I started trending low and my openaps just made its first temporary basal change due to an automated calculation. I'm not looping yet, but very excited to see this working!!
Dana Lewis
@danamlewis
Jan 18 2016 02:48
Yea. I tend to work solely on Github for my PRs to docs. @bewest or someone with more traditional git experience may be able to answer some of those questions about checking out things.
:) @JaysonEwer
JaysonEwer
@JaysonEwer
Jan 18 2016 02:48
So, is @logichammer #26, @danamlewis ?
Aaron Michelson
@Aaybob
Jan 18 2016 02:51
exciting @JaysonEwer ,
@danamlewis so how do you save the state of RPi2 code development for possible restoration?
JaysonEwer
@JaysonEwer
Jan 18 2016 02:51
And what parameters need to be met to get the next official number? Who governs the officially licensed OPENAPS numbers. ;-) I'm ordering my new vanity license plate tomorrow as soon as @danamlewis signs off on the official number. :-D
Dana Lewis
@danamlewis
Jan 18 2016 02:52
hahahahaha @JaysonEwer. Can't be tomorrow ;) it's after multiple (3+) nights of successful looping where you've worked most of the kinks out of your system.
(But I'm the unofficial keeper of the numbers, so you'll know once the number rolls)
Aaron Michelson
@Aaybob
Jan 18 2016 02:53
So it doesn't have to be mobile round the clock?
JaysonEwer
@JaysonEwer
Jan 18 2016 02:54
@danamlewis Ok, cool, I knew there was some hurdle I would have to overcome. I'm not sure i'll be looping tonight. I want to get my NS updated still. I was running into some head scratching moments as I was looking at that section of the documentation. :-) I think that was the section @logichammer was going to be working on.
Dana Lewis
@danamlewis
Jan 18 2016 02:55
@JaysonEwer no rush. there's a number for everyone ;) :) who wants to get there.
@Aaybob no, you don't have to be mobile with it. some people are just doing bedside for overnight. and if you mean offline, that's also the case - it can operate offline, but you won't have a way to see what it's doingn or what your netIOB is at that point in time until you get a way to access your logs
Dragan Maksimovic
@dm61
Jan 18 2016 02:57
looks like my treatments are shifted in time on nightscout, something is wrong with my time zoning?
Dana Lewis
@danamlewis
Jan 18 2016 02:57
@Aaybob and re: code, I was specifically referring to using Github for interfacing with the docs, but I also prefer using the Github interface for forking & PRing my code. That being said, I haven't spent a lot of time doing git checkouts from the command line, which is why I recommend a bat signal for @bewest or someone else on those particular questions :)
@dm61 time zones are…evil. and always a problem. did the time change on any of your devices? CGM, pump, computer, etc.?
JaysonEwer
@JaysonEwer
Jan 18 2016 02:58
@danamlewis Is there a way to queue the updates destined for Nightscout and when you re-establish your network connection, it will populate your data accordingly?
Dragan Maksimovic
@dm61
Jan 18 2016 02:58
no, my everything is set to the same time zone
I've seen people use pump-history-zoned.json, not sure what that is?
Scott Leibrand
@scottleibrand
Jan 18 2016 02:58
cat monitor/clock*
Ya, you need to set up the timezone tool for ns
and the subsequent tz stuff
@JaysonEwer it will upload old temp basal history when you reconnect
only limit there is how many hours of iter_pump you do
it won't upload old enact reasons though.
Dragan Maksimovic
@dm61
Jan 18 2016 03:01
"2016-01-17T19:59:45"
Scott Leibrand
@scottleibrand
Jan 18 2016 03:01
k, then you need to set up a zoned version of that and pumphistory.
Dana Lewis
@danamlewis
Jan 18 2016 03:02
@JaysonEwer ^^ @scottleibrand answered while I was #hcsm-ing :) re: uploading previous data from when you were offline
Scott Leibrand
@scottleibrand
Jan 18 2016 03:02
You should have a timezone in the one you upload to NS. Otherwise it has to assume it's UTC
Dragan Maksimovic
@dm61
Jan 18 2016 03:03
need to let ns know what time zone my times are coming from?
ok, I'll look at the setup and try to figure out
JaysonEwer
@JaysonEwer
Jan 18 2016 03:05
@scottleibrand Thank you, @danamlewis Thank you also.
@scottleibrand Is that ns-uploader-setup.sh good to go, I was just trying to get that setup, but ran into some difficulties? Would you like me to test it? :-D
Scott Leibrand
@scottleibrand
Jan 18 2016 03:17
if you're doing a full loop, running it on your loop dir is probably a bad idea. :)
you could run it on a new directory, though, and then set up the rest of the loop stuff there
or you could just copy and paste individual lines out of it as needed
JaysonEwer
@JaysonEwer
Jan 18 2016 03:28
Sounds good. Thanks for the wise words of caution.
Scott Leibrand
@scottleibrand
Jan 18 2016 03:28
@logichammer (moving conv from FB) I use a ps check instead of a lockfile
cd $directory && ( ps aux | grep -v grep | grep -q 'openaps retry-loop' || openaps retry-loop ) 2>&1 | tee -a /var/log/openaps/loop.log
Matt Pressnall
@logichammer
Jan 18 2016 03:31
Grabbing this!...thanks!
And my .git dir is corrupt again...lost power while out... I need that new battery to show up. I got the tecknet 1500, too
Matt Pressnall
@logichammer
Jan 18 2016 03:34
Ha...cronned...this must be common!
Scott Leibrand
@scottleibrand
Jan 18 2016 03:35
yep. :)
Matt Pressnall
@logichammer
Jan 18 2016 03:38
Thanks for the command! So it looks like uploader will go back in time and add any offline / not uploaded meal boluses...magic! How far will it go back in time to do that?
Jason Calabrese
@jasoncalabrese
Jan 18 2016 03:39
depends on what you have in your ini for iter_hours
Matt Pressnall
@logichammer
Jan 18 2016 03:42
Congrats, @JaysonEwer ...feels good to see this stuff actually working, right? We've been looping all day today and will tonight as well but then sending her to school non-looped and then off AP for a bit until I get from a trip. You may beat me to #26.
thanks, jason! Set to four so there I go...
Toby Canning
@TC2013
Jan 18 2016 03:44
Does anyone know if /etc/rc.local is the best place to run sudo hciconfig hci0 up
When using openxshareble that is
Dana Lewis
@danamlewis
Jan 18 2016 03:48
(we're already at 26 :))
JaysonEwer
@JaysonEwer
Jan 18 2016 03:48
@logichammer I'm thinking about ordering that 1500, since i've run into power issues a few times as I have been carrying my rig with me for the last month.
Matt Pressnall
@logichammer
Jan 18 2016 03:49
pretty affordable for the power...hoping it gets her through a full day at school when I really deploy this thing
Dana Lewis
@danamlewis
Jan 18 2016 03:50
It should. My 1500 gets me through a full day traveling including some top-offs for my phone. So rig-only should be excellent
Matt Pressnall
@logichammer
Jan 18 2016 03:50
Man, those numbers are getting bigger pretty fast, @danamlewis ...a few months ago you were saying 15...that's good!
Dana Lewis
@danamlewis
Jan 18 2016 03:50
wait, 1500? or 15,000?
JaysonEwer
@JaysonEwer
Jan 18 2016 03:50
@logichammer it feels VERY GOOD!! Although, i'm currently battling a bit of a low. :-D Thanks to my OPENAPS, its adjusting me nicely. I haven't gone below 60 yet. :-D :worried:
Matt Pressnall
@logichammer
Jan 18 2016 03:50
sorry, 15K
yeah
Dana Lewis
@danamlewis
Jan 18 2016 03:50
k just checking :)
and yes, every time I turn around, numbers changing!
JaysonEwer
@JaysonEwer
Jan 18 2016 03:52
I've currently got a 12K, but it would go down when I unplugged the power, so I I ordered the tecknet, 9k but its just wee bit too small, and I need to "worry" about it a bit too much. I've plugged my 12K into the 9K tecknet, but that's a bit ghetto. ;-)
Matt Pressnall
@logichammer
Jan 18 2016 03:53
I know about for my daughter, Jayson...her basals needs are so low that when she goes low, it take awhile for her to rise on the AP....when your normal basal for an hour is .15 units and you take that away as a way of increasing blood sugar...it sure take a LONG time...but I hung out and watched her slowly trickle down last night and finally hit bottom in the 60s and hang there a good amount of time and then she went back up. She had rolled onto her pump so she was off the AP for a bit, otherwise I think it would have caught things earlier. Building in checks for overnight and not being able to talk to the pump for more than 10 minutes.
ha, yeah!
Toby Canning
@TC2013
Jan 18 2016 03:53
@bewest @scottleibrand Yup, my openxshareble quit working on reboot... can't seem to get it back up
Dragan Maksimovic
@dm61
Jan 18 2016 03:55
thanks @scottleibrand for pointing to that ns setup scrip - I've copied the timezone related lines and now my upload to ns works correctly with -zoned clock and pumphistory. Lots of other good stuff in that script! :smile:
JaysonEwer
@JaysonEwer
Jan 18 2016 03:56
@scottleibrand @jasoncalabrese When I create my 2nd azure site for my dev nightscout install, will I be able to maintain all the non-dev stuff in my original classic nightscout instance?
Also, should I setup a whole new mongodb for my openaps rig?
Dragan Maksimovic
@dm61
Jan 18 2016 03:59
@JaysonEwer as far as I know, these two are completely independent, your old site will continue to work as before
JaysonEwer
@JaysonEwer
Jan 18 2016 04:00
But If I use my same connection strings, will that mess anything up? Thank you, @dm61.
Dragan Maksimovic
@dm61
Jan 18 2016 04:01
@JaysonEwer I am a newbie so I hesitate to give definitive answers, but I do not think you will mess anything up
you should of course give a different name to your new site
Jason Calabrese
@jasoncalabrese
Jan 18 2016 04:03
you can point to the same db, but the profile structure has changed
so either use 2 profile collections or don't edit the profile from your dev site
dev can read from the version on master, but it doesn't work the other way
JaysonEwer
@JaysonEwer
Jan 18 2016 04:06
@jasoncalabrese Thank you, sir! I appreciate the info. I'll be sure to created a 2nd profile collection for the dev site.
Matt Pressnall
@logichammer
Jan 18 2016 04:08

Stopped looping and starting and want to make sure I understand the ", no temp, " part of reason:

'reason' => 'Eventual BG 62<90, no temp, setting -0.17U/hr',
`

It is just confirming that there is currently no temp basal running...and it is about to set one correct?

Dana Lewis
@danamlewis
Jan 18 2016 04:09
Yes but it can't set a negative so check its setting a zero...
Matt Pressnall
@logichammer
Jan 18 2016 04:10
Yeah, I figured it couldn't suck insulin out of her :)...I like that part, though...yeah, if we could, we'd suck even more out you. We just killed her combo bolus so all good there.
Thanks!
Dana Lewis
@danamlewis
Jan 18 2016 04:17
You probably want to write it to be executing a zero...otherwise may confuse you later. And/or May incorrectly be using a negative as part of the calc instead of zero
Ie if recommended temp is <0, execute as 0
Ben West
@bewest
Jan 18 2016 04:19
@TC2013 I think bluetoothd is not running
eszcloud
@eszcloud
Jan 18 2016 04:19
bewest: what dexcom model are you using in your new mobile setup?
Ben West
@bewest
Jan 18 2016 04:20
g4+share
Matt Pressnall
@logichammer
Jan 18 2016 04:20
But that is just in reason text; the rate is set to 0. Where would it be calculating -.17 or are you saying mess with the algo so that when it comes back with a recommendation, make sure it doesn't represent a negative?
Ben West
@bewest
Jan 18 2016 04:20
I'm not using share, but I am trying to use the ble wireless function
Matt Pressnall
@logichammer
Jan 18 2016 04:21
I can totally add that kind of check but not sure where in the code to do so...
Dana Lewis
@danamlewis
Jan 18 2016 04:23
Hm, Scott disagrees with me. He says it's fine in reason, as long as rate is zero it's fine.
May change the langauge so it's more clear In the reason though
As long as rate enacted is reported zero then you're fine
Matt Pressnall
@logichammer
Jan 18 2016 04:24
I am going to do some post processing on reason so I understand it even better...I'll put my suggestions out there
Good...that makes sense to me...
Dana Lewis
@danamlewis
Jan 18 2016 04:24
:+1:
eszcloud
@eszcloud
Jan 18 2016 04:25
gotcha. i was wondering how it was connected
thanks
Matt Pressnall
@logichammer
Jan 18 2016 04:39
USB extenions: what is the longest folks have been able to get to work with the pi...I think I have a three foot working but 6 feet was too much.
For the Carelink
eyim
@eyim
Jan 18 2016 04:43
I use a 15 ft one and it seems fine
Matt Pressnall
@logichammer
Jan 18 2016 04:43
Is it powered?
eyim
@eyim
Jan 18 2016 04:43
No
Matt Pressnall
@logichammer
Jan 18 2016 04:44
Hmmm...ok more testing thanks eyim!
eyim
@eyim
Jan 18 2016 04:45
Excited to hear things are working for you! It has made a world of difference for us
Matt Pressnall
@logichammer
Jan 18 2016 04:46
Thanks! I can see that already...just smooths out any of the issues related to bad carb counting or the thousands of vagaries of things that influence T1D, right?
Dana Lewis
@danamlewis
Jan 18 2016 04:50
:)
Matt Pressnall
@logichammer
Jan 18 2016 04:51
hey, @eyim , I just tried to other extensions that I have and neither worked...do you know the manufacturer for yours...no rush...just curious...
two other
eyim
@eyim
Jan 18 2016 04:51
I think I got it from monoprice. They were just some old ones I had laying around the house
cheap basic ones
Matt Pressnall
@logichammer
Jan 18 2016 04:53
K, thanks! I'll just poke around and try a few...
Aaron Michelson
@Aaybob
Jan 18 2016 05:02
does the dexcom G5 require some extra code? use <> scan returns "/dev/ttyACM0" but other commands errors like could not parse EGVRecord
Jason Calabrese
@jasoncalabrese
Jan 18 2016 05:08
g5 is very different
Thomas Emge
@ThomasEmge
Jan 18 2016 05:11
ok I followed the description from https://github.com/scottleibrand/Adafruit_Python_BluefruitLE and installed according to https://github.com/bewest/openxshareble
however I am ending up with the following after iter_glucose
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/pkg_resources/__init__.py", line 745, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__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 44, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/pi/openxshareble/openxshareble/__init__.py", line 89, in __call__
    res = self.ble.run_mainloop_with(run, quit_with_loop=False)
  File "/home/pi/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 121, in _user_thread_main
    self._return_code = target()
  File "/home/pi/openxshareble/openxshareble/__init__.py", line 84, in run
    self.before_main(args, app)
  File "/home/pi/openxshareble/openxshareble/__init__.py", line 67, in before_main
    self.prolog( )
  File "/home/pi/openxshareble/openxshareble/app.py", line 89, in prolog
    self.remote.connect()  # Will time out after 60 seconds, specify timeout_sec parameter
  File "/home/pi/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/device.py", line 102, in connect
    self._device.Connect()
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.Failed: No such file or directory
do I need to pair the share first?
bluetoothd seems to be running after the reboot
Jason Calabrese
@jasoncalabrese
Jan 18 2016 05:15
think everything I wanted in the first pass of the pump plugin is in now
nightscout/cgm-remote-monitor#1455
Scott Leibrand
@scottleibrand
Jan 18 2016 05:17
@Aaybob You won't be able to
JaysonEwer
@JaysonEwer
Jan 18 2016 05:17
@jasoncalabrese regarding the 2nd profile you mentioned earlier, what "profile" are you referring too? Is that an azure profile, a mongo profile? Thanks in advance.
Aaron Michelson
@Aaybob
Jan 18 2016 05:19
OpenAps 2015 winter update at openaps.org "Dexcom G5 has been confirmed to work if you plug the receiver into the Raspberry Pi (same as Dexcom G4 with or without SHARE). (Details buried in this thread)." Thread says needs to be built and version management handled. I have a working G4.
Jason Calabrese
@jasoncalabrese
Jan 18 2016 05:20
a NS treatment profile, it's stored in mongo
g5 works via usb or from the share service
but not ble to the pi yet, but there is a ios library so it's only a matter of time https://github.com/loudnate/xDripG5
Thomas Emge
@ThomasEmge
Jan 18 2016 05:22
wait I might be missing a step
Scott Leibrand
@scottleibrand
Jan 18 2016 05:23
@Aaybob there is a branch of dexcom_reader that works with the G5 receiver over USB though. Not sure if that's still only in @loudnate's repo or if it's been merged in yet.
Thomas Emge
@ThomasEmge
Jan 18 2016 05:24
I see Once the requirements above have been met the library can be installed by running the following command inside its root directory: - what is its directory?
Scott Leibrand
@scottleibrand
Jan 18 2016 05:24
Or, like Jason said, you can have NS pull in the BG from Share servers and have oref0 pull from NS
Jason Calabrese
@jasoncalabrese
Jan 18 2016 05:25
I thought it was merged
Scott Leibrand
@scottleibrand
Jan 18 2016 05:25
So for now, I would recommend sticking with G4 for wired, or pull from NS if you have to go to G5.
Jason Calabrese
@jasoncalabrese
Jan 18 2016 05:27
nope, not merged bewest/dexcom_reader#1
one of the issues I see with uploading treatments to NS, is when the bolus isn't complete yet, only the carb/bg portion is sent, I know @sulkaharo added a check for that in https://github.com/sulkaharo/oref0/tree/wip/fixEventsForNightscout, but I'm wondering it the loop should wait, like we wait for the next bg
eyim
@eyim
Jan 18 2016 05:38
I see that quite often. Most of the time I trust the IOB more from the openaps pill than the IOB calc on NS.
Jason Calabrese
@jasoncalabrese
Jan 18 2016 05:40
I usually go into the treatment editor and delete them, and let them get re-added, but it's a pain
eyim
@eyim
Jan 18 2016 05:46
ahhh - good idea. Thank you
Jason Calabrese
@jasoncalabrese
Jan 18 2016 05:54
I added test $(cat monitor/status.json | json bolusing) == "false" && to my upload alias, I think something like that will work
easier than making it wait
seems to work
eyim
@eyim
Jan 18 2016 05:59
Cool - will try it tomorrow when my son gets back
Scott Leibrand
@scottleibrand
Jan 18 2016 05:59
Good idea
Jason Calabrese
@jasoncalabrese
Jan 18 2016 06:00
waiting would be even better, since we could operate on partial data now
Jason Calabrese
@jasoncalabrese
Jan 18 2016 06:13
@ThomasEmge, looks like you have some PRs going in the wrong direction, if you want to update your dev branch try using https://github.com/ThomasEmge/cgm-remote-monitor/compare/dev...nightscout:dev
Thomas Emge
@ThomasEmge
Jan 18 2016 06:15
@jasoncalabrese git is my eternal mystery...I just did switch head and fork...my apologies
Jason Calabrese
@jasoncalabrese
Jan 18 2016 06:15
hard to get the github ui to do that sometimes
I had to edit url
they really need a way to make updating forks easier
Scott Leibrand
@scottleibrand
Jan 18 2016 06:28
@jasoncalabrese can you think of a scenario where partial data is any worse than no data (2m before)?
the carb data would only matter for meal assist, so I guess the scenario would have to be you've already bolused for all your carbs, are rising, and do more carbs and bolus for them, and don't want it to meal assist because all the carbs are covered. doesn't seem like a big deal to high-temp for 5m based on that, though
Jason Calabrese
@jasoncalabrese
Jan 18 2016 06:31
sometimes I sneak a bolus in, between the time the history is read then a high temp might be started when it's not needed
Scott Leibrand
@scottleibrand
Jan 18 2016 06:32
sure, but that's not partial data
Jason Calabrese
@jasoncalabrese
Jan 18 2016 06:32
not an issue it the rig stays in range
Scott Leibrand
@scottleibrand
Jan 18 2016 06:32
that's just "we don't have instant knowledge of boluses"
foreknowledge would be even better. :)
Jason Calabrese
@jasoncalabrese
Jan 18 2016 06:32
could be that a bolus is going and having it wait would help
Scott Leibrand
@scottleibrand
Jan 18 2016 06:32
when would you add the status check?
you can't enact if a bolus is running anyway
Jason Calabrese
@jasoncalabrese
Jan 18 2016 06:33
I was thinking that getting history would wait till bolusing is false
Scott Leibrand
@scottleibrand
Jan 18 2016 06:34
seems like a rather narrow window for a race condition
Jason Calabrese
@jasoncalabrese
Jan 18 2016 06:34
yeah, thats why I just added the extra test
Scott Leibrand
@scottleibrand
Jan 18 2016 06:34
status && pumphistory? that might work
just have the whole loop start over if status is bolusing
Jason Calabrese
@jasoncalabrese
Jan 18 2016 06:35
that might work
fitting it into the order I have isn't as easy
Scott Leibrand
@scottleibrand
Jan 18 2016 06:36
openaps alias add gather '! bash -c "rm monitor/*; ( openaps get-bg | egrep \"reporting|Copied\" && echo -n Re && openaps monitor-pump >/dev/null && echo -n fresh && ( openaps ns-meal-carbs && echo ed ) ) 2>/dev/null"' is what I have now
easy enough to add it right before openaps monitor-pump
that is called by openaps alias add wait-loop '! bash -c "openaps preflight && openaps gather && openaps enact && openaps report invoke monitor/temp_basal.json 2>/dev/null >/dev/null && openaps upload && openaps get-settings 2>/dev/null >/dev/null && openaps wait-for-bg && openaps enact && openaps upload-ns-status >/dev/null"', so if gather returns false, the whole thing will return false, and retry-loop will start over with another preflight
if you can just figure out the command to check status and the json syntax for the bolusing check, I'll add it to mine as well
Jason Calabrese
@jasoncalabrese
Jan 18 2016 06:39
what I have is working
test $(cat monitor/status.json | json bolusing) == false &&
Scott Leibrand
@scottleibrand
Jan 18 2016 06:39
k
I'll need to break out monitor/status.json to run before that
Jason Calabrese
@jasoncalabrese
Jan 18 2016 06:41
another related issue is canceled bolus wizard attempts also get uploaded, but I think there's a flag we can check
I added it to my upload alias, was easier than moving things around
trying to make little fixes to help things run smooth for school
Scott Leibrand
@scottleibrand
Jan 18 2016 06:43
if you want you could try using my setup on another pi or in another directory, and see if/how it's better
I'm sure I've solved a different set of corner cases than you have. :)
Thomas Emge
@ThomasEmge
Jan 18 2016 06:45
I retraced my steps and now I get this error
RuntimeError: Failed to find UART device!
@scottleibrand are you running RPI with Jessie?
Scott Leibrand
@scottleibrand
Jan 18 2016 06:48
yes
got it working once, but now it no longer does
Thomas Emge
@ThomasEmge
Jan 18 2016 06:49
wheezy....hmmm
is starting to look very tempting
Ben West
@bewest
Jan 18 2016 07:42
wow, lots of scollback
:<3 indy-goes-to-school
Aaron Michelson
@Aaybob
Jan 18 2016 07:56
the output of cat profile.json is {...."current_basal":0.4,...} that is the basal that ended at 16:00. ...read_clock "2016-01-17T23:43:59" is correct. profile.json parsed several reports to return an incorrect current_basal. What would I do to repair this error?
Ben West
@bewest
Jan 18 2016 07:58
@Aaybob did you mention problem with date/time before?
does date match what your laptop/wallclock/watch says?
today I got stuck on an issue where the time was some datetime way in the past, like a month
Aaron Michelson
@Aaybob
Jan 18 2016 08:03
first time at this level of development. the pump clock is correctly reported....I remember once having the wrong year and my doctor couldn't do anything to reconcile the cgm, I think he wanted to match it to pump readouts. but anyway the current basal looks like the only error in profile.json
I'm using MM522
pump doesn't have the option of basal profiles turned on
Scott Leibrand
@scottleibrand
Jan 18 2016 08:08
Are you refreshing the current temp report?
Aaron Michelson
@Aaybob
Jan 18 2016 08:08
maybe i found a bug. would it be wise to change basal settings and see what happens? I'm not using the old pump for therapy
Scott Leibrand
@scottleibrand
Jan 18 2016 08:09
Oh, this is in profile. You need to refresh the various settings reports and then refresh the profile report.
Aaron Michelson
@Aaybob
Jan 18 2016 08:09
I just got a profile.json result for the first time
Scott Leibrand
@scottleibrand
Jan 18 2016 08:10
Probably using old inputs though.
Aaron Michelson
@Aaybob
Jan 18 2016 08:10
oh
saved me from a wild goose chase, thanks
Scott Leibrand
@scottleibrand
Jan 18 2016 08:15
np. :-)
Aaron Michelson
@Aaybob
Jan 18 2016 08:25
to refresh the reports I used $ report invoke sensitivities/name on each of the json in settings. The result after invoking profile.json last was still an errant current basal of 0.4.
Scott Leibrand
@scottleibrand
Jan 18 2016 08:27
Did you refresh clock.json too?
Aaron Michelson
@Aaybob
Jan 18 2016 08:28
no
Scott Leibrand
@scottleibrand
Jan 18 2016 08:29
If refreshing that doesn't help, next step to narrow it down is to run oref0-get-profile manually
and manually check the timestamp and contents of each input file.
Aaron Michelson
@Aaybob
Jan 18 2016 08:30
still figuring out how to refresh clock..trying openaps use pumpbuilding -h
Scott Leibrand
@scottleibrand
Jan 18 2016 08:31
There should be a clock.json report you can invoke.
The same one you provided as an input to profile.
Aaron Michelson
@Aaybob
Jan 18 2016 08:32
I don't remember writing one...I just did openaps use pumpbuilding read_clock and it returned the correct time.....ok let me check
Scott Leibrand
@scottleibrand
Jan 18 2016 08:33
Actually you're right. Profile doesn't use clock.json.
But we still need to check pump clock against Pi clock.
Aaron Michelson
@Aaybob
Jan 18 2016 08:34
openaps device add get-profile process --require "settings bg_targets isf basal_profile max_iob" oref0 get-profile was the recomended device there's no pump clock report
Scott Leibrand
@scottleibrand
Jan 18 2016 08:34
Run date to see Pi clock.
Yeah that's right.
I was confusing profile with another report.
profile must use the system time instead of the pump time to figure out current basal.
Aaron Michelson
@Aaybob
Jan 18 2016 08:35
Pi clock says Mon 18 Jan 08:34:28 UTC 2016
Scott Leibrand
@scottleibrand
Jan 18 2016 08:35
That's your problem.
You never set your timezone.
Aaron Michelson
@Aaybob
Jan 18 2016 08:36
In raspi-config?
Scott Leibrand
@scottleibrand
Jan 18 2016 08:36
That was earlier in the setup guide, in the raspi-config section.
Ya
Thomas Emge
@ThomasEmge
Jan 18 2016 08:36
hah, wifi adapter just gave up...must be it for today ;)
Scott Leibrand
@scottleibrand
Jan 18 2016 08:37
Not sure Pi always has the power for both wifi and BT
Aaron Michelson
@Aaybob
Jan 18 2016 08:37
that could explain this
is california pscific-new or pacific ocean?
Scott Leibrand
@scottleibrand
Jan 18 2016 08:39
new
ocean is way out west.
Aaron Michelson
@Aaybob
Jan 18 2016 08:39
thanks
Scott Leibrand
@scottleibrand
Jan 18 2016 08:40
Some islands I think.
Aaron Michelson
@Aaybob
Jan 18 2016 08:40
hawaii
Scott Leibrand
@scottleibrand
Jan 18 2016 08:41
I think that is called HST.
Aaron Michelson
@Aaybob
Jan 18 2016 08:47
did that timezone change effect stuff because now I'm getting errors
Scott Leibrand
@scottleibrand
Jan 18 2016 08:48
Delete the expires line out of your pump.ini
Scary that I know the error you're getting. :-)
I may have spent a little too much time on openaps over the last year. ;-)
that expires thing tells it how long until it has to wake the pump back up.
with the tz change it's probably now 7h in the future.
Aaron Michelson
@Aaybob
Jan 18 2016 08:51
ah ha.yes that would have been another wild goose chase
Scott Leibrand
@scottleibrand
Jan 18 2016 08:51
You would've given up and tried again tomorrow and it would've fixed itself. :-)
so with that, I give you more midnight oil. But I myself must sleep: skiing tomorrow. :-)
Aaron Michelson
@Aaybob
Jan 18 2016 08:53
I wrote an ailias to run profile and the alias doesnt show up in openaps.ini but it runs ??
JaysonEwer
@JaysonEwer
Jan 18 2016 08:53
@scottleibrand I'm trying to find an explanation of where I should be logging all the outputs of my loop data. Is that documented somewhere yet?
Aaron Michelson
@Aaybob
Jan 18 2016 08:53
skiing will be fun, get a good night sleep
some people use syslog. Some just use NS. Some use the git logs.
'Nite
JaysonEwer
@JaysonEwer
Jan 18 2016 08:58
gnight
Daniel Bjørnbakk
@danibjor
Jan 18 2016 09:09
for EU-devices that communicates on 868.35 MHz, could something like this be used? http://www.mouser.com/ds/2/347/dr3001-4849.pdf - or http://www.farnell.com/datasheets/356971.pdf
both are 865.35mhz transievers, with ASK/OOK modulation
Oskar Pearson
@oskarpearson
Jan 18 2016 09:13
@danibjor You're welcome to give it a try, but I'm almost certain it won't, unfortunately. The modem on the pump is a pretty-strange baud rate: 16384. We've tested, and it doesn't work with 19200 (well - it sorta works for short messages, but on longer messages it fails).
There's a lot of discussion about this sort of things on the gitter channels ps2/rileylink and oskarpearson/mmeowlink if you're interested
Daniel Bjørnbakk
@danibjor
Jan 18 2016 09:16
thanks, i'll join those
Oskar Pearson
@oskarpearson
Jan 18 2016 09:16
@danibjor The best bet at the moment is a TI cc1110/cc1111 class device with a 24mhz or 48mhz crystal (not the standard 26mhz crystal on most cc1110 boards). https://github.com/oskarpearson/mmeowlink/wiki has a few setups
The cheapest and smallest option at the moment is https://github.com/oskarpearson/mmeowlink/wiki/Intel-Edison-with-ERF-stick
Depending on how many people want, I may have a cc1110 ERF device with the firmware on it if you want
Daniel Bjørnbakk
@danibjor
Jan 18 2016 09:18
the Edison setup is sweet
but I'm worried about how long the battery would last
@oskarpearson how much do you want for a pre-programmed TI-device?
and, does it work with medtronics on the EU-marked?
Oskar Pearson
@oskarpearson
Jan 18 2016 09:20
(well - you can't run a USB device when running a lipo - so you need 5v in from an portable USB charger)
(and it's a lot less efficient)
v3-overview.jpg
@danibjor Are you in the UK? Or elsewhere in the EU?
Daniel Bjørnbakk
@danibjor
Jan 18 2016 09:26
yea, but with the Edison (and buildt-in wifi/bluetooth) and the TI-radio, there is no need for USB-devices?
I'm in Norway
sorta-part of EU
Oskar Pearson
@oskarpearson
Jan 18 2016 09:45
Yep - no USB devices needed so it's that self contained box above
Drop me your address via email with the subject line "ERF" and I'll try organise you pricing. It'll be at uk cost + shipping and that's all. Not something I'll make a profit from :)
Daniel Bjørnbakk
@danibjor
Jan 18 2016 09:49
sent you an email
Daniel Bjørnbakk
@danibjor
Jan 18 2016 12:12
12570836_10153721738830831_1671185297_n.jpg
finally :D
Thomas Emge
@ThomasEmge
Jan 18 2016 16:40
I need some troubleshooting help. It is now the second morning when the RPI is kind of 'dead'. I have it on battery over night and in the morning the USB devices are down. When I remove and plugin the Dexom USB connector the receiver screen stays black as opposed to coming back with power. My wifi dongle indicator light is out as well. When I plug in the HDMI cable to get a clue what might be going I get a black screen - however the monitor HDMI input stays on as opposed to switching back to other digital input when the RPI is actually turned off. What is my little machine trying to tell me? Bad SD card?
Kevin Wells
@wkcwells
Jan 18 2016 16:51
@scottleibrand thanks for the pointer to oref0-reset-git yesterday. After it resets , do you reconnect it to the github etc. repo? Mine is disconnected right now.
Scott Leibrand
@scottleibrand
Jan 18 2016 16:55
Ideally reset-git will be able to fix-corruption and you won't lose any history. If you do, you could probably rebase onto your github repo if you wanted. If you're not connecting it to github, though, you should be fine: you'll just only have history back to the last unfixable corruption.
@ThomasEmge check the system logs in /var/log maybe?
Scott Leibrand
@scottleibrand
Jan 18 2016 17:01
Also, is your Pi/battery plugged into wall power overnight?
Kevin Wells
@wkcwells
Jan 18 2016 17:03
I’m just getting started, so I haven’t figured out the daily pattern. Last night I plugged in to an adapter that didn’t have enough power. Very bad...
But in general it seems hard to avoid uncontrolled power cuts. Are you able to do that?
Thomas Emge
@ThomasEmge
Jan 18 2016 17:03
No it is running just on battery...yes there was a git corruption (and I had a typo in my script to fix it - so the fix didn't happen)
here are my log from around the time is must have happened
Jan 18 05:17:11 socalAPS kernel: [   16.863105] EXT4-fs (mmcblk0p3): recovery complete
Jan 18 05:17:11 socalAPS kernel: [   16.863204] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
Jan 18 05:17:11 socalAPS org.gtk.Private.UDisks2VolumeMonitor[779]: index_parse.c:191: indx_parse(): error opening /media/pi/SETTINGS/BDMV/index.bdmv
Jan 18 05:17:11 socalAPS org.gtk.Private.UDisks2VolumeMonitor[779]: index_parse.c:191: indx_parse(): error opening /media/pi/SETTINGS/BDMV/BACKUP/index.bdmv
Jan 18 05:17:12 socalAPS kernel: [   17.113269] cfg80211: Calling CRDA to update world regulatory domain
Jan 18 05:17:14 socalAPS kernel: [   19.280342] Bluetooth: RFCOMM TTY layer initialized
Jan 18 05:17:14 socalAPS kernel: [   19.280398] Bluetooth: RFCOMM socket layer initialized
Jan 18 05:17:14 socalAPS kernel: [   19.280427] Bluetooth: RFCOMM ver 1.11
Jan 18 05:17:14 socalAPS rsyslogd-2007: action 'action 18' suspended, next retry is Mon Jan 18 05:17:44 2016 [try http://www.rsyslog.com/e/2007 ]
Jan 18 05:17:15 socalAPS kernel: [   20.263308] cfg80211: Calling CRDA to update world regulatory domain
Jan 18 05:17:15 socalAPS org.blueman.Mechanism[419]: Unable to init server: Could not connect: Connection refused
Jan 18 05:17:15 socalAPS org.blueman.Mechanism[419]: Unable to init server: Could not connect: Connection refused
Jan 18 05:17:18 socalAPS kernel: [   23.413305] cfg80211: Calling CRDA to update world regulatory domain
Jan 18 05:17:21 socalAPS kernel: [   26.563311] cfg80211: Calling CRDA to update world regulatory domain
Scott Leibrand
@scottleibrand
Jan 18 2016 17:07
Yeah, sounds like power.
Thomas Emge
@ThomasEmge
Jan 18 2016 17:10
Would it help if I would get the Dexcom going on bluetooth or is that just a minor power drain?
Scott Leibrand
@scottleibrand
Jan 18 2016 17:15
If Dex battery is fully charged it should be fine.
Thomas Emge
@ThomasEmge
Jan 18 2016 17:20
yes it is, I hope I am down to minor changes in my loop script. Let's see if I can complete my first continuous 24hr cycle today ;)
Jason Calabrese
@jasoncalabrese
Jan 18 2016 17:46
@scottleibrand, @eyim, my bolusing check didn't work, status wasn't fresh at that point, so I had to adjust my history alias. I have gather split in 2 so I can upload after getting the most minimum data from the pump
what I have for it now
history = ! bash -c "(openaps report invoke monitor/model.json monitor/status.json monitor/pump-history.json monitor/clock-zoned.json monitor/pump-history-zoned.json && test $(cat monitor/status.json | json bolusing) == false) || (echo Pump bolusing, waiting to pull history; exit 1)"
eyim
@eyim
Jan 18 2016 17:50
@jasoncalabrese Thank you for the heads up on this.
Jason Calabrese
@jasoncalabrese
Jan 18 2016 17:56
and I finally added oref0-reset-git to my preflight
Thomas Emge
@ThomasEmge
Jan 18 2016 17:57
is there a detectable difference between pump out of range and pump within range but carelink acting up?
Jason Calabrese
@jasoncalabrese
Jan 18 2016 18:01
yeah, using mm-stick warmup
that will fail if the stick is acting up
Thomas Emge
@ThomasEmge
Jan 18 2016 18:05
yes, but I wouldn't need to reboot the USB devices on the RPI when the pump is out of range but the carelink is fine but unable to reach it
Jason Calabrese
@jasoncalabrese
Jan 18 2016 18:06
don't think that fails if the pump is only out of range
Scott Leibrand
@scottleibrand
Jan 18 2016 18:12
mm-warmup can detect stick fail reliably, but without a working stick it's impossible to tell if your pump is in range.
Thomas Emge
@ThomasEmge
Jan 18 2016 18:15
so if the stick is ok but the pump doesn't respond (because it is out of range) does that count as a fail ?
Jason Calabrese
@jasoncalabrese
Jan 18 2016 18:15
no
Scott Leibrand
@scottleibrand
Jan 18 2016 18:38
That will fail the preflight check but not the check used to trigger a reset.
Ben West
@bewest
Jan 18 2016 18:38
the purpose of the warmup is to double check the stick itself
the purpose of the preflight is to "find the pump"
Thomas Emge
@ThomasEmge
Jan 18 2016 18:41
thanks for the clarification...I am still wondering about my fairly frequent USB resets (a new stick is ordered though)
Scott Leibrand
@scottleibrand
Jan 18 2016 18:44
I think there are instances where intermittent pump comms get the stick into its failed state.
Thomas Emge
@ThomasEmge
Jan 18 2016 18:54
one last question for today...I have followed @scottleibrand and @bewest instructions for the share but on openaps use share iter_glucose I am running into
```
hmm, wait this response is different
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/pkg_resources/__init__.py", line 745, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__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 44, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/pi/openxshareble/openxshareble/__init__.py", line 89, in __call__
    res = self.ble.run_mainloop_with(run, quit_with_loop=False)
  File "/home/pi/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 121, in _user_thread_main
    self._return_code = target()
  File "/home/pi/openxshareble/openxshareble/__init__.py", line 84, in run
    self.before_main(args, app)
  File "/home/pi/openxshareble/openxshareble/__init__.py", line 67, in before_main
    self.prolog( )
  File "/home/pi/openxshareble/openxshareble/app.py", line 82, in prolog
    raise RuntimeError('Failed to find UART device!')
RuntimeError: Failed to find UART device!
Thomas Emge
@ThomasEmge
Jan 18 2016 19:00
the other one was slightly different
[ /org/bluez/hci0 ]
    org.bluez.ThermometerManager1
    org.bluez.CyclingSpeedManager1
    org.bluez.Media1
    org.bluez.HeartRateManager1
    org.bluez.NetworkServer1
    org.bluez.Adapter1
      Name = socalAPS
      Powered = 1
      Modalias = usb:v1D6Bp0246d0525
      DiscoverableTimeout = 180
      Alias = socalAPS
      PairableTimeout = 0
      Discoverable = 0
      Address = 5C:F3:70:75:C6:FA
      Discovering = 0
      Pairable = 1
      Class = 0
      UUIDs = dbus.Array([dbus.String(u'00001801-0000-1000-8000-00805f9b34fb'), dbus.String(u'0000110e-0000-1000-8000-00805f9b34fb'), dbus.String(u'00001200-0000-1000-8000-00805f9b34fb'), dbus.String(u'00001800-0000-1000-8000-00805f9b34fb'), dbus.String(u'0000110c-0000-1000-8000-00805f9b34fb')], signature=dbus.Signature('s'), variant_level=1)
[ /org/bluez ]
    org.bluez.ProfileManager1
    org.bluez.HealthManager1
    org.bluez.Alert1
    org.bluez.AgentManager1
[ /org/bluez/hci0/dev_A4_77_33_AB_87_1D ]
    org.bluez.Device1
      Paired = 0
      Adapter = /org/bluez/hci0
      LegacyPairing = 0
      Alias = A4-77-33-AB-87-1D
      Connected = 0
      UUIDs = dbus.Array([dbus.String(u'0000fe9f-0000-1000-8000-00805f9b34fb')], signature=dbus.Signature('s'), variant_level=1)
      Address = A4:77:33:AB:87:1D
      Trusted = 0
      Blocked = 0
[ /org/bluez/hci0/dev_E3_96_DA_EC_32_E9 ]
    org.bluez.Device1
      Name = DEXCOMRX
      Paired = 0
      Adapter = /org/bluez/hci0
      LegacyPairing = 0
      Alias = DEXCOMRX
      Connected = 1
      UUIDs = dbus.Array([dbus.String(u'f0aca0b1-ebfa-f96f-28da-076c35a521db')], signature=dbus.Signature('s'), variant_level=1)
      Address = E3:96:DA:EC:32:E9
      Trusted = 0
      Blocked = 0
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/pkg_resources/__init__.py", line 745, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__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 44, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-use", line 57, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/pi/openxshareble/openxshareble/__init__.py", line 89, in __call__
    res = self.ble.run_mainloop_with(run, quit_with_loop=False)
  File "/home/pi/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 121, in _user_thread_main
    self._return_code = target()
  File "/home/pi/openxshareble/openxshareble/__init__.py", line 84, in run
    self.before_main(args, app)
  File "/home/pi/openxshareble/openxshareble/__init__.py", line 69, in before_main
    self.setup_dexcom(serial=serial)
  File "/home/pi/openxshareble/openxshareble/app.py", line 52, in setup_dexcom
    self.remote.disconnect()
  File "/home/pi/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/device.py", line 111, in disconnect
    self._device.Disconnect()
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownObject: Method "Disconnect" with signature "" on interface "org.bluez.Device1" doesn't exist
Ben West
@bewest
Jan 18 2016 19:01
hmmm
you compiled bluez with ./configure --enable-experimental
Thomas Emge
@ThomasEmge
Jan 18 2016 19:01
this is with bluez5.37 on Jessie
yes I did
Ben West
@bewest
Jan 18 2016 19:01
and you are running bluetoothd --experimental?
Thomas Emge
@ThomasEmge
Jan 18 2016 19:03
yes
could it be a bluetooth chip issue?
Ben West
@bewest
Jan 18 2016 19:04
don't think so
Thomas Emge
@ThomasEmge
Jan 18 2016 19:06
I am getting these
pi@socalAPS ~/red_1 $ dmesg | grep bluetooth
[    5.633105] bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0a5c-21e8.hcd failed with error -2
[ 1670.558968] bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0a5c-21e8.hcd failed with error -2
Ben West
@bewest
Jan 18 2016 19:07
oh, odd, good find
that lends some weight to your theory, hmmm
I don't get those
Thomas Emge
@ThomasEmge
Jan 18 2016 19:07
shopping time?
Ben West
@bewest
Jan 18 2016 19:07
oh... hmmm
yes I do
but less
$ dmesg | grep bluetoo [ 7.602685] bluetooth hci0: Direct firmware load for brcm/BCM20702A0-0a5c-21e8.hcd failed with error -2 pi@raspberrypi ~/src/oref0 $
just first time on boot
seems to work though
Ben West
@bewest
Jan 18 2016 19:23
somehow I managed to really screw up this rpi
apparently one of the glitches with my new laptop is the sd card reader doesn't work
Sulka Haro
@sulkaharo
Jan 18 2016 19:59
yay, Pi started logging
Jan 18 19:56:46 eeropi kernel: [ 1498.525577] cdc_acm 1-1.3:1.0: failed to set dtr/rts
Ben West
@bewest
Jan 18 2016 20:13
that's the ti-dongle?
Eric
@ecc1
Jan 18 2016 20:20
@ThomasEmge You might need to install the bluez-firmware package.
Jim Matheson
@jmatheson
Jan 18 2016 20:21
Where are people buying used pumps, cgm, etc?
Thomas Emge
@ThomasEmge
Jan 18 2016 20:23
@ecc1 It is already installed. Or is there an updated one to coincide with bluez5.37?
Ben West
@bewest
Jan 18 2016 20:25
I don't think you need bluez-firmware
that's for older releases it looks like
you're using 5.37, that's the latest and what I'm using
the Adafruit ble library... is that using my special custom-gatt branch?
Thomas Emge
@ThomasEmge
Jan 18 2016 20:27
yep git clone -b wip/bewest/custom-gatt-profile https://github.com/bewest/Adafruit_Python_BluefruitLE.git
Ben West
@bewest
Jan 18 2016 20:28
ah, cool
hmm
is this happening every time now?
or does it go away?
you've been retrying?
Thomas Emge
@ThomasEmge
Jan 18 2016 20:31
I have seen a number of different outcomes, unable to pair because of timeout, authentication refused, but most of time Failed to find UART device
Ben West
@bewest
Jan 18 2016 20:32
hmmm
Thomas Emge
@ThomasEmge
Jan 18 2016 20:34
I also find it strange that when using bluetoothctl sometimes it is listing the dexcom right away, sometimes after a while, and sometimes not at all.
JaysonEwer
@JaysonEwer
Jan 18 2016 20:34
Hello All, How does everyone handle the end of the Dexcom session when looping?
Toby Canning
@TC2013
Jan 18 2016 20:34
@bewest @scottleibrand Ubilinux is a Wheezy distro, but we had been essentially converting it to Jessie. I used the default install and re-install openxshareble and everything it working smoothly. Running for several hours and many reboots to test.
During the 2 hours warm-up?
Ben West
@bewest
Jan 18 2016 20:35
back to basics for 2 hours
JaysonEwer
@JaysonEwer
Jan 18 2016 20:35
Yes, during the 2 hour warm-up.
Ben West
@bewest
Jan 18 2016 20:35
some people have multiple receivers
Toby Canning
@TC2013
Jan 18 2016 20:35
We wait it out
Ben West
@bewest
Jan 18 2016 20:35
so if you have 2 receivers, you can just swap them out basically
Toby Canning
@TC2013
Jan 18 2016 20:35
Leave the loop running
Ben West
@bewest
Jan 18 2016 20:36
otherwise, loop won't do anything, basically
Toby Canning
@TC2013
Jan 18 2016 20:36
It finds no bg so can't act
Ben West
@bewest
Jan 18 2016 20:36
mine will still upload pump info during that time
Toby Canning
@TC2013
Jan 18 2016 20:36
Yes, I left that too
JaysonEwer
@JaysonEwer
Jan 18 2016 20:36
ok, that's cool. Yeah ,I'm just wondering if anyone does a manual override with a fingersticks during that time?
Ben West
@bewest
Jan 18 2016 20:37
yeah, if needed, it's back to basics :-)
but with real-time pump history shared, which is pretty nice
JaysonEwer
@JaysonEwer
Jan 18 2016 20:38
I understand that the loop won't do anything without blood sugars. I may try the staggered dexcom reciever approach or just do the "back-to-the-basics".
Does openaps even allow for a manual overide with blood sugars?
Ben West
@bewest
Jan 18 2016 20:40
not sure what you mean?
one could probably write a script to insert manual finger sticks as glucose records, but the calculators want to see several bgs within 5 minute intervals
you'd have to get that info into openaps, which is feasible, but it seems easier to just use the pump
JaysonEwer
@JaysonEwer
Jan 18 2016 20:41
I'm wondering if I can fee the algorithm manual blood sugars during the 2 hours to allow the decisions to be made?
Ben West
@bewest
Jan 18 2016 20:41
right now, it would take some work
there's nothing to support it, but no reason it couldn't be made to work
but from a practical point of view, for those 2 hours, it's probably easier to use the pump
and let openaps copy the info into NS
JaysonEwer
@JaysonEwer
Jan 18 2016 20:42
Yeah, ok, i won't over think it. I was just curious. :-) Now If I could come up with a sane logging mechanism and get my cronjob to work, i can start my looping. Im currently pretty pleased with how things are running manually.
Ben West
@bewest
Jan 18 2016 20:43
I prefer to log everything to syslog
JaysonEwer
@JaysonEwer
Jan 18 2016 20:43
@bewest Thanks for your thoughts. I'm sure you right.
Eric
@ecc1
Jan 18 2016 20:43
BTW, on Debian stretch systems, bluetoothd from from the bluez package is already compiled with experimental features. It's just not enabled by the bluetooth.service file. To change that, just add "--experimental" to the ExecStart line, then do $ sudo systemctl daemon-reload $ sudo systemctl restart bluetooth.service
JaysonEwer
@JaysonEwer
Jan 18 2016 20:44
@bewest logging to syslog...Is there a quick way to enable that? I think I'd like to take that approach as well.
Ben West
@bewest
Jan 18 2016 20:44
you can pipe everything to syslog like this: openaps my-special-alias 2>&1 | logger -t openaps
that pipes everything to the system logger
JaysonEwer
@JaysonEwer
Jan 18 2016 20:45
When I use my master looping alias will the logs break out each of the subprocesses clearly? I'm sure i'll learn that as soon as I get it working.
Ben West
@bewest
Jan 18 2016 20:45
you can run the alias manually, everything you see will be in syslog
it'll include that -t openaps prefix, openaps: ....
JaysonEwer
@JaysonEwer
Jan 18 2016 20:47
Cool, ill play with it and see if it does what i'm expecting. I guess i'm just wondering if it will be clear if I have a problem in one of the sub aliases, will that be obvious, or not?
Ben West
@bewest
Jan 18 2016 20:48
sort of, you can run it manually and see if you can pick out where it currently is/which alias is being used
usually it prints the report names as it's running them, but you might remember adding some echo/print statements in various places
JaysonEwer
@JaysonEwer
Jan 18 2016 20:49
nice, yeah, I just ran it manually and am looking through the output, thanks for the guidance, sir!
Ben West
@bewest
Jan 18 2016 20:49
yeah, you can probably tell which reports are being run when
Toby Canning
@TC2013
Jan 18 2016 20:49
Not sure if I should post this here or in the NS channel
This first treatment entry is NOT picked up by the OpenAPS minutes ago pill, but the second entry below it is...  What is wrong with the first?
{
    "_id": {
        "$oid": "569d4d4c2bb7e86eaf13996f"
    },
    "raw_duration": {
        "_type": "TempBasalDuration",
        "_description": "TempBasalDuration 2016-01-18T14:36:40 head[2], body[0] op[0x16]",
        "timestamp": "2016-01-18T14:36:40-06:00",
        "_body": "",
        "_head": "1600",
        "duration (min)": 0,
        "_date": "28640e5210"
    },
    "timestamp": "2016-01-18T14:36:40-06:00",
    "absolute": 0,
    "rate": 0,
    "raw_rate": {
        "_type": "TempBasal",
        "temp": "absolute",
        "_description": "TempBasal 2016-01-18T14:36:40 head[2], body[1] op[0x33]",
        "timestamp": "2016-01-18T14:36:40-06:00",
        "_body": "00",
        "_head": "3300",
        "rate": 0,
        "_date": "28640e5210"
    },
    "eventType": "Temp Basal",
    "medtronic": "mm://openaps/mm-format-ns-treatments/Temp Basal",
    "created_at": "2016-01-18T14:36:40-06:00",
    "enteredBy": "openaps://medtronic/722"
}
Working entry:
{
    "_id": {
        "$oid": "569d1e562bb7e86eaf139930"
    },
    "duration": 30,
    "raw_duration": {
        "_type": "TempBasalDuration",
        "_description": "TempBasalDuration 2016-01-18T11:16:55 head[2], body[0] op[0x16]",
        "timestamp": "2016-01-18T11:16:55-06:00",
        "_body": "",
        "_head": "1601",
        "duration (min)": 30,
        "_date": "37500b5210"
    },
    "timestamp": "2016-01-18T11:16:55-06:00",
    "absolute": 4.65,
    "rate": 4.65,
    "raw_rate": {
        "_type": "TempBasal",
        "temp": "absolute",
        "_description": "TempBasal 2016-01-18T11:16:55 head[2], body[1] op[0x33]",
        "timestamp": "2016-01-18T11:16:55-06:00",
        "_body": "00",
        "_head": "33ba",
        "rate": 4.65,
        "_date": "37500b5210"
    },
    "eventType": "Temp Basal",
    "medtronic": "mm://openaps/mm-format-ns-treatments/Temp Basal",
    "created_at": "2016-01-18T11:16:55-06:00",
    "enteredBy": "openaps://medtronic/722"
}
Ben West
@bewest
Jan 18 2016 20:50
hmmm interesting
the non-working one is a 0,0 record
oh
actually the first is missing a duration altogether
nice find
Toby Canning
@TC2013
Jan 18 2016 20:51
How did I mess that up?
Ben West
@bewest
Jan 18 2016 20:52
you probably did not
looks like bug
JaysonEwer
@JaysonEwer
Jan 18 2016 20:52
@bewest Quick question about getting my openaps info into nightscout. I'm working on bringing up a separate nightscout dev environment. I didn't want to "break" anything in my working nightscout 0.8.4 master instance. Do you have more than one nightscout instance or do you just roll with dev? :-D
Ben West
@bewest
Jan 18 2016 20:52
you can stand up a new one easily
I have 4 or 5, I often re-use the same database for them
you don't need a new db, for example
since I'm a dev, I usually am testing some dev branch or some feature branch
JaysonEwer
@JaysonEwer
Jan 18 2016 20:56
Ok, that was the one thing I was a bit unclear about with respect to the database. Folks mentioned not needing a separate db night. There was mention of making sure I had a separate profile setup. But i'm not sure how/where I put that profile?
Ben West
@bewest
Jan 18 2016 20:57
are you already using profile stuff in your existing NS?
JaysonEwer
@JaysonEwer
Jan 18 2016 20:57
I guess i'm not sure? :-D NOOB over here. :-D
Thomas Emge
@ThomasEmge
Jan 18 2016 20:59
@ecc1 you have a share working via bluetooth?
Ben West
@bewest
Jan 18 2016 20:59
sounds probably not
if you are not already using one, you probably don't need to create a second
so no biggy
Toby Canning
@TC2013
Jan 18 2016 21:00
Okay, submitted as an issue
Ben West
@bewest
Jan 18 2016 21:00
looking at the temps.js code, I don't see how it's possible for duration to be missing like that
JaysonEwer
@JaysonEwer
Jan 18 2016 21:03
Thanks @bewest.
JaysonEwer
@JaysonEwer
Jan 18 2016 21:10
@ktomy "So this is the visible result! withaout and with loop running :)
this is the 3rd night having loop running" CONGRATS!!
@ktomy I'm 5 days late on the congrats, but great job.
Peter Miller
@ochenmiller
Jan 18 2016 21:41
Third generation of Hank the Pank is in production! It's about the same size as the medtronic 722 pump, and is capable of doing full loop completely self contained. I'm writing it all up tonight and posting to github. Photo's below.
Oskar Pearson
@oskarpearson
Jan 18 2016 21:43
Yay! :)
Nyadach
@Nyadach
Jan 18 2016 21:45
Hi all, still setting up but wondering if anyone could point me in the right direction as when I invoke a report for monitor/iob.json, it returns a module.js:485 throw err; as a syntex error in settings/profile.json when looking at settings/profile.json it's showing a "BG Target data expected to be expressed in mg/dl. Found in mmol/L settings/bg_targets.json" Assume manually altering files won't help when it's invoked in future, best solution convert pump to run in mg/dl? even though the Dex can't? or any other thoughts? Thanks.
Peter Miller
@ochenmiller
Jan 18 2016 21:45
Still think I can get it down to about half the size. Then, I plan to refocus on Edison and CC1111!
Nyadach
@Nyadach
Jan 18 2016 21:45
Nice size!
Scott Leibrand
@scottleibrand
Jan 18 2016 22:02
There is a conversion tool from mmol to mg/dL.
@Nyadach I think that it's possible you're running an older version of openaps or decocare
Nyadach
@Nyadach
Jan 18 2016 22:05
manually converting the values is easy enough, but everytime it's invoked it will get mmol/L off the pump/dex though...and the raw data line stays the same even if I manually convert
Oskar Pearson
@oskarpearson
Jan 18 2016 22:06
@Nyadach Does it say which module.js file that is? Which package or repo it's in? I can have a quick look
Nyadach
@Nyadach
Jan 18 2016 22:07
0.0.10-dev ?
Oskar Pearson
@oskarpearson
Jan 18 2016 22:09
If you can't get the input file to contain a mg/dl value, then perhaps the best thing to do is modify this section of the code:
I'd say you could change it to something like:
Nyadach
@Nyadach
Jan 18 2016 22:09
oref0-calculate-iob.js:35:22
Oskar Pearson
@oskarpearson
Jan 18 2016 22:11
hm - I actually don't know the content of the bg_targets.json file in your case. Could you paste an example here?
tzachi-dar
@tzachi-dar
Jan 18 2016 22:11
Hi, to all, our pump has just broke down, Most chances that it will be replaced, but assuming it will not, what are the recomended pumps to use with open APS?
Oskar Pearson
@oskarpearson
Jan 18 2016 22:11
@Nyadach it's probably something like this:
{
  "units": "mmol/L",
  "targets": [
    {
      "high": 6.0,
      "start": "00:00:00",
      "low": 5.0,
      "offset": 0,
      "i": 0,
      "x": 0
    }
  ],
  "first": 2
}
So you'd need to update the units to be 'mg/dL', and then update each of the entries in the targets array to be 'high 18.0' and 'low 18.0'
I'm not sure if your data will have an i or an x or an offset
JaysonEwer
@JaysonEwer
Jan 18 2016 22:14
@tzachi-dar You'll find hardware details at the following site: https://github.com/openaps/docs/blob/master/docs/getting-started/hardware.md
tzachi-dar
@tzachi-dar
Jan 18 2016 22:14
Thanks. I'll see what my options are.
JaysonEwer
@JaysonEwer
Jan 18 2016 22:14
Actually that other document @oskarpearson just posted is the better link. :-)
Oskar Pearson
@oskarpearson
Jan 18 2016 22:15
@tzachi-dar Some people have had success buying replacement pumps here: http://www.medwow.com/used-insulin-pump-equipment/medtronic/252_32.med
@tzachi-dar There's been some progress on http://www.animas.com/our-pumps/one-touch-ping - but it's still just in the "hey, this might actually work one day" phase, from what little I understand about it
Nyadach
@Nyadach
Jan 18 2016 22:17

{

"units": "mmol/L",

"raw": "0x02 0x00 0x39 0x48 0x10 0x37 0x44 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00",
"targets": [

{

"high": 6.0,

"start": "00:00:00",

"low": 5.0,

"offset": 0,

"i": 0,

"x": 0

}

],

"first": 2
}

Eric
@ecc1
Jan 18 2016 22:18
I've been able to buy older pumps using craigslist, even though it involved shipping rather than local pickup.
Nyadach
@Nyadach
Jan 18 2016 22:18
pumps a 554, just checking firmware now
2.6A
JaysonEwer
@JaysonEwer
Jan 18 2016 22:18
@ecc1 how much are you paying? I've got a few offers on the table and i'm not sure how much to invest. Even thought I know its worth the investment.
Nyadach
@Nyadach
Jan 18 2016 22:19
it's on the list, so assume it should be alright?
Oskar Pearson
@oskarpearson
Jan 18 2016 22:20
@Nyadach Seems like it
Eric
@ecc1
Jan 18 2016 22:20
@JaysonEwer $200 to $800 so far, usually depending on condition (not always -- one mint condition one was also the cheapest)
JaysonEwer
@JaysonEwer
Jan 18 2016 22:24
@ecc1, nice. I've got 220 for a 522 on the table, and 500 for 722. I think those are reasonable prices. I'm not sure if I want the 522 or the 722. I currently am using 515, but my official pump at the moment is a 530G, which i'm not using, because I JUST STARTED LOOPING today!! I finally got my cronjob sorted and my logging. Now for tweaking and getting my nigghtscout dev site so I can take advantage of the openaps plugin.
Ben West
@bewest
Jan 18 2016 22:32
nice
JaysonEwer
@JaysonEwer
Jan 18 2016 22:34
@bewest I think I spoke too soon. I thought I had my cronjob working, but i'm getting the following error:
Jan 18 17:30:01 Ewer-Open-APS openaps: /bin/sh: 1: openaps: not found
I've got my openaps directory in my PATH variable in my cronfile, but I still get the "openaps: not found"
Here is what my cron command looks like:
 */5 * * * * openaps loop 2>&1 | logger -t openaps
Jason Calabrese
@jasoncalabrese
Jan 18 2016 22:36
try adding cd /path/to/your/instance && before openaps
Scott Leibrand
@scottleibrand
Jan 18 2016 22:37
The openaps command isn't in your dir
type which openaps to see where is is
and add that to your PATH
JaysonEwer
@JaysonEwer
Jan 18 2016 22:38
Ah...I think i see the problem now.
Thank you, @scottleibrand @jasoncalabrese .
need to add /usr/local/bin to my path
pi@Ewer-Open-APS:~/Documents/openaps $ which openaps
/usr/local/bin/openaps
Nyadach
@Nyadach
Jan 18 2016 22:42
fixed it, converted pump to run in mg/dl and it invoked everything again and it sorted everything
JaysonEwer
@JaysonEwer
Jan 18 2016 22:54

Dang, that shouldn't have taken me that long to figure out. :-D Thanks for all the help gentlemen. @scottleibrand @jasoncalabrese @bewest and all the rest out there. In summary for anyone else that gets to this section, what I learned is you need to have the following components in your cron file:

1.) PATH=local directory where the openaps binary is located, which happened to be /usr/local/bin/ this can be found using the following command:
pi@Ewer-Open-APS:~/Documents/openaps $ which openaps /usr/local/bin/openaps
2.)

2.) Add the path to the location of you openaps instance followed by the name of your loop alias in the actual cron schedule section like so:
*/1 * * * * cd /home/pi/Documents/openaps && openaps loop 2>&1 | logger -t openaps
Ben West
@bewest
Jan 18 2016 23:01
yeah, looks good
make sure to define PATH=.... near the top
also, eventually you'll probably add API_SECRET=... as well
although it's not required
the ns-upload --config tool can help manage that
the api secret bit
JaysonEwer
@JaysonEwer
Jan 18 2016 23:02
I added 'PATH=' directly below all the comments and above the first schedule line. Is that ok, or should I add it to the very top of the file?
Ben West
@bewest
Jan 18 2016 23:03
yeah, that's great
perfect the way you have it
JaysonEwer
@JaysonEwer
Jan 18 2016 23:03
ok thanks
Ben West
@bewest
Jan 18 2016 23:03
oh
hmmm
you might need to tweak that a bit
`2.) Add the path to the location of you openaps instance followed by the name of your loop alias in the actual cron schedule section like so:
*/1 * * * * (cd /home/pi/Documents/openaps && (openaps loop 2>&1 | logger -t openaps))
the extra parens might not be needed in this case
JaysonEwer
@JaysonEwer
Jan 18 2016 23:26
When I set it to run every 1 min for testing, i've got some stuff hung up and the carelink stick is offline.