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

17th
Jan 2016
JaysonEwer
@JaysonEwer
Jan 17 2016 00:04
Congrats on looping @logichammer
My goal was to get looping today, but i'm not sure i'll make it. :-) I didn't have time to work on it this last week. And Its now getting a bit late in the day, but I'm going to see what I can get accomplished. Going to do the Y2K16 update now. :-D
Matt Pressnall
@logichammer
Jan 17 2016 00:08
Thanks, @JaysonEwer !! I finally made it happen and so very happy! Lots of trials to run but having the loop closed and working is thrilling...
http://content.screencast.com/users/loki_mdog/folders/Snagit/media/aa06f854-a4b1-4b9e-ac2e-0b307f6ce5ec/01.16.2016-16.07.png
JaysonEwer
@JaysonEwer
Jan 17 2016 00:09
@logichammer How long would you say it took you to get to this point?
@logichammer AWESOME!!! I'm very happy for you!! Great pictures!
Matt Pressnall
@logichammer
Jan 17 2016 00:10
About as long as I expected with all the different testing: two months but I could have made it faster if I didn't have other projects / weekend trips.
Thanks, man!
I could have gotten it done in less than a month if I spent ALL my free time on it...my wife nix'd that idea even before I started work. :)
It was actually a condition for letting me try this....seriously.
JaysonEwer
@JaysonEwer
Jan 17 2016 00:15
That's still a pretty good clip.
It also makes me feel better. :-) I'm one of the new guys. I'm able to communicate, and I'm just getting comfortable with all the commands.
I'm in the monitoring phase and would like to get my pi talking to Nightscout with all the status info. I'm currently entering my info into Nightscout manually.
I'm very close to that point.
Matt Pressnall
@logichammer
Jan 17 2016 00:20
Yeah, it took me awhile with all that as well. I'm actually going to write the documentation for that bit because it doesn't exist.
let me find some commands for you
If you don't have these as aliases added to your openaps.ini file, you should add them in:
latest-ns-treatment-time = ! bash -c "nightscout latest-openaps-treatment https://somesite.azurewebsites.net | json created_at"
format-latest-nightscout-treatments = ! bash -c "nightscout cull-latest-openaps-treatments monitor/pumphistory-zoned.json settings/model.json $(openaps latest-ns-treatment-time) > upload/latest-treatments.json"
upload-recent-treatments = ! bash -c "openaps format-latest-nightscout-treatments && test $(json -f upload/latest-treatments.json -a created_at eventType | wc -l ) -gt 0 && (ns-upload https://somesite.azurewebsites.net password treatments.json upload/latest-treatments.json ) || echo \"No recent treatments to upload\""
JaysonEwer
@JaysonEwer
Jan 17 2016 00:22
sweet, thanks
Matt Pressnall
@logichammer
Jan 17 2016 00:22
You need to issue a openaps monitor-pump after a temp basal has been set so the order is:
temp basal set
openaps monitor-pump
and then those three commands listed above
JaysonEwer
@JaysonEwer
Jan 17 2016 00:23
I'll obviously use my nightscout site. ;-)
Matt Pressnall
@logichammer
Jan 17 2016 00:24
well shit...yes!
JaysonEwer
@JaysonEwer
Jan 17 2016 00:24
haha
Matt Pressnall
@logichammer
Jan 17 2016 00:25
:)
JaysonEwer
@JaysonEwer
Jan 17 2016 00:25
So, I'm not sure I'm even at that point yet? Is the "latest-ns-treatment-time" something I need to create, or does that already exist?
As far as reports are concerned? In other words, is that a report I need to define first?
That's where I currently am. I've just started defining my reports and such.
Matt Pressnall
@logichammer
Jan 17 2016 00:27
Yes, you normally create an alias via the openaps command line
JaysonEwer
@JaysonEwer
Jan 17 2016 00:27
k
Matt Pressnall
@logichammer
Jan 17 2016 00:27
but they all get stored in openaps.ini
JaysonEwer
@JaysonEwer
Jan 17 2016 00:27
Understood.
Matt Pressnall
@logichammer
Jan 17 2016 00:27
so you can hack the file ifyou want to to drop that stuff in
JaysonEwer
@JaysonEwer
Jan 17 2016 00:28
ah
cool
Matt Pressnall
@logichammer
Jan 17 2016 00:28
Took me a little while to wrap my mind around the reports / aliases, etc...working with it though, it all started to make sense
JaysonEwer
@JaysonEwer
Jan 17 2016 00:28
I'm sure that will be helpful. I just backed up my openaps environment and now need to do the y2k16 update.
I get it, its just SUPER slow and not second nature yet
You're help is much appreciated!
Matt Pressnall
@logichammer
Jan 17 2016 00:29
Good deal. Are you writing the PI image to file using Win32DiskImager? Of course...we are all trying to figure it out
!
JaysonEwer
@JaysonEwer
Jan 17 2016 00:32
I'm using the "Backing Up Your openaps Instance" section at the following site: https://github.com/openaps/docs/blob/master/docs/Log-clean-analyze-with-openaps-tools/using.md
works pretty well as far as I can tell. I haven't tried to restore it to my other pi yet, but will
not today, but soon.
I'll also take an image of my Pi using dd or something like that.
Matt Pressnall
@logichammer
Jan 17 2016 00:34
That is a must but if you make any system changes (I have) to your pi, you should do this every once in a while:
JaysonEwer
@JaysonEwer
Jan 17 2016 00:34
cool, thanks for the link
I'm a mac user, there are a few utilities to accomplish the same result. I used to support windoze. :-) No offense to the Windows folks in the audience. :-D
Matt Pressnall
@logichammer
Jan 17 2016 00:36
You bet! Got to boogie...good luck...you can do this!
JaysonEwer
@JaysonEwer
Jan 17 2016 00:38
Thanks again, great job
JaysonEwer
@JaysonEwer
Jan 17 2016 00:45
I did the y2k16 update, is it that easy? :-D Do I need to restart anything? Or does that one command take care of it?
Dana Lewis
@danamlewis
Jan 17 2016 00:47
Yep, it's that easy
Crestym
@Crestym
Jan 17 2016 00:48
How do I find the y2k16 update?
Dana Lewis
@danamlewis
Jan 17 2016 00:49
Are you in the openAPS-dev Google group?
There's an email from jan 11 about it, or scroll up to see @audiefile Had pasted it an hour or so back :)
direct link posted above @Crestym
Dana Lewis
@danamlewis
Jan 17 2016 00:51
Thx @JaysonEwer
JaysonEwer
@JaysonEwer
Jan 17 2016 00:51
@danamlewis , NO THANK YOU!!! :-D
@danamlewis YOU GUYS ROCK!! @scottleibrand When I get tired of saying that, i'll start sending bags of gold and jewels.
maybe sooner
Scott Leibrand
@scottleibrand
Jan 17 2016 00:53
:+1: :-)
Dana Lewis
@danamlewis
Jan 17 2016 00:54
:) Our pleasure. Happy we're able to pay it forward from what we have been able to do on top of @bewest years of amazing work & many others. Can't speak for all but many of us would prefer/appreciate just as much those things in the shape of 12 packs of diet coke ;)
Dragan Maksimovic
@dm61
Jan 17 2016 00:54
Hey @danamlewis, listened to your interview on TuD last Wed - it was great!
Crestym
@Crestym
Jan 17 2016 00:55
@danamlewis And there it is! Thanks Dana.
Dana Lewis
@danamlewis
Jan 17 2016 00:55
(I'm kidding. It really makes me happy to see so many people finding this stuff as useful as I do)
JaysonEwer
@JaysonEwer
Jan 17 2016 00:55
Yes, didn't mean to leave any of the other AWESOME out the mix @bewest and others!
Scott Leibrand
@scottleibrand
Jan 17 2016 00:55
I dunno, :moneybag: + :ring: will buy a lot of Diet Coke. ;-)
JaysonEwer
@JaysonEwer
Jan 17 2016 00:55
:-D
stick to the H20, diet coke will kill you. ;-)
Dana Lewis
@danamlewis
Jan 17 2016 00:55
Thanks @dm61! I couldn't see the chat but Emily mentioned you were sharing some insights too :)
@Crestym Welcome
I'm serious about the request for thoughts on headlines that people will know to open and read if there's a major find like the y2k16 thing that everyone needs to know about.
JaysonEwer
@JaysonEwer
Jan 17 2016 00:58
Does anyone have the link to the manual profile I need to setup for my older 515 handy? I don't remember where I found that, but I know I need to create something manually due to the older model pump.
Scott Leibrand
@scottleibrand
Jan 17 2016 01:00
515 should be fine I think.
Dana Lewis
@danamlewis
Jan 17 2016 01:00
It's on the hardware page, see if that's for the 15 or the 12
(In the docs)
Scott Leibrand
@scottleibrand
Jan 17 2016 01:00
IIRC it's just the 512 that needs manual profile configuration.
JaysonEwer
@JaysonEwer
Jan 17 2016 01:01
hardware page, thank you
Dana Lewis
@danamlewis
Jan 17 2016 01:01
:+1:
JaysonEwer
@JaysonEwer
Jan 17 2016 01:03
yeah, you're right @scottleibrand , my bad, 512/712 "For 512/712 pumps, certain commands like Read Settings, BG Targets and certain Read Basal Profile are not available, and requires creating a static json for needed info missing to successfully run the loop (see example here)."
JaysonEwer
@JaysonEwer
Jan 17 2016 01:12
When I'm looking at my Nightscout and have the pill box with batter, is that the pump batter?
battery
Dana Lewis
@danamlewis
Jan 17 2016 01:13
Might be the Dexcom receiver battery, not sure what you're using/seeing.
JaysonEwer
@JaysonEwer
Jan 17 2016 01:14
I guess a longer question would be, What is the best way to determine the source of the pillbox?
Dana Lewis
@danamlewis
Jan 17 2016 01:15
Look at the settings for clues, and check the Nightscout wiki for details based on whichever version you have.
JaysonEwer
@JaysonEwer
Jan 17 2016 01:16
I think it is my pump battery, which is actually really cool, cause it means I do have communication from my PI to Nightscout, at least partially working. I know I was working on that last weekend, but it didn't seem to work all the way, so I bailed and am only getting back to it today.
Ok, thanks for the pointers, @danamlewis
Dana Lewis
@danamlewis
Jan 17 2016 01:18
Yup. And I'd ask @jasoncalabrese about anything else more specific for pillboxes, he and others have been doing the good work for that for NS. He shared a link to a WIP earlier that you might be able to scroll back and find for more info about what he's working on/might be ready for testing
Jason Calabrese
@jasoncalabrese
Jan 17 2016 01:19
Yeah, it's here nightscout/cgm-remote-monitor#1455
Scott Leibrand
@scottleibrand
Jan 17 2016 01:19
Any pill you already have in NS talking about battery is probably the android-uploader phone battery, not pump.
Dana Lewis
@danamlewis
Jan 17 2016 01:20
Thanks @jasoncalabrese :)
Jason Calabrese
@jasoncalabrese
Jan 17 2016 01:20
Battery and reservoir alerts too
Dana Lewis
@danamlewis
Jan 17 2016 01:21
Btw for anyone who hasn't seen it, @mariusae has been working magic with the Animas Ping :D https://twitter.com/marius/status/688245308401127424
JaysonEwer
@JaysonEwer
Jan 17 2016 01:23
That's very cool, @danamlewis @mariusae!! I'm a little sad I upgraded my ping to the vibe. :-)
@jasoncalabrese @scottleibrand Thank's guys. I did enable xdrip for about an hour using my wifes Amazon fire tablet, perhaps its lingering from that interaction? I decided to go back to my share2 app with my dexcom with share. I has been stuck at 72% battery since I dissociated it.
JaysonEwer
@JaysonEwer
Jan 17 2016 01:30
@jasoncalabrese Are you looking for additional testers for the pump plugin?
Jason Calabrese
@jasoncalabrese
Jan 17 2016 01:58
yes
I'm going to try to wrap up the first pass of it tonight
JaysonEwer
@JaysonEwer
Jan 17 2016 02:12
I guess i'll need to setup a nightscout dev site. I'm using master at the moment. I saw a link to setting up a second dev site. I'll work on that. Thank you for all your work @jasoncalabrese ! I'm very excited to receive my nightscout stickers in the mail. I made my first, but certainly not my last, nightscout foundation donation yesterday.
Jason Calabrese
@jasoncalabrese
Jan 17 2016 02:22
I think for anyone running openaps, you should probably stick to the dev branch, but setting up a test site to make sure it works for you is a good idea
JaysonEwer
@JaysonEwer
Jan 17 2016 02:23
sounds good! Thank you.
eyim
@eyim
Jan 17 2016 04:54
@scottleibrand Hi Scott - In your meal assist script https://gist.github.com/scottleibrand/63a8541397378bf9f4b8 It has git checkout meal-assist. That branch I don't think exists anymore. I think it is in the dev branch. Not sure if it makes a difference
Jason Calabrese
@jasoncalabrese
Jan 17 2016 04:57
It's on dev now
Pete Schwamb
@ps2
Jan 17 2016 04:57
:+1:
Wait, you’re not saying the pump plugin is on dev yet, are you?
Scott Leibrand
@scottleibrand
Jan 17 2016 04:58
No, just that meal assist is in oref0 dev.
Pete Schwamb
@ps2
Jan 17 2016 04:59
Well, I’ll keep the +1, as it sounds like something good anyways. ;)
Jason Calabrese
@jasoncalabrese
Jan 17 2016 04:59
No, not the pump plugin
Scott Leibrand
@scottleibrand
Jan 17 2016 04:59
Gist updated to point to dev. Thx.
Jason Calabrese
@jasoncalabrese
Jan 17 2016 05:00
Got a little on it done today, going to try to wrap it up tonight
Pete Schwamb
@ps2
Jan 17 2016 05:01
Sweet, I’ve been enjoying it on my site, pulling data from RL.
Jason Calabrese
@jasoncalabrese
Jan 17 2016 05:01
Nice
What do you think about 1 pill vs multiple pills
Pete Schwamb
@ps2
Jan 17 2016 05:01
Wondering a bit about communicating recency somehow.
Jason Calabrese
@jasoncalabrese
Jan 17 2016 05:02
Going to make that an option
Pete Schwamb
@ps2
Jan 17 2016 05:02
I am fine with 1 pill, wouldn’t object to multiple pills either.
Jason Calabrese
@jasoncalabrese
Jan 17 2016 05:02
I didn't add it before since it's there for OpenAPS
Pete Schwamb
@ps2
Jan 17 2016 05:03
It’s tough to support all the variations of how data gets into NS.
Is this pump plugin intended to be used by openaps users as well?
Aaron Michelson
@Aaybob
Jan 17 2016 05:06
my RPi is responding with -bash: lsb_release: command not found
its responding the same for most commands
Jason Calabrese
@jasoncalabrese
Jan 17 2016 05:08
Yeah, going to try to make it generic enough that it will be able to work for everything we can pull from now
The OpenAPS pill will be for loop status, and the pump info would be handled by the pump pluging, but there is some overlap
Pete Schwamb
@ps2
Jan 17 2016 05:09
very cool
Aaron Michelson
@Aaybob
Jan 17 2016 05:37
was that from pressing the memory and having it pop out and putting right back in? Anyway, I'm downloading Raspbian jessie to a reformatted memory.
Scott Leibrand
@scottleibrand
Jan 17 2016 05:43
That could corrupt the SD card, yeah.
Aaron Michelson
@Aaybob
Jan 17 2016 06:12
the "recomended" image writer would not accept dashes in the name of .img file. downloaded zip of 2015-11-21-raspbian-jessie.img....but soon rasp.img will be on the memory card and I can start all over again....always gets easier with repetition
Matt Pressnall
@logichammer
Jan 17 2016 06:44

Still trying to interpret the Reason text

Eventual BG 90>90 but Delta -7 < BGI -5.45 / 2; no temp to cancel

Why is BGI divided by 2 and why if we see a delta of -7 when she is 90 does the AP think it doesn't need to do anything? I'm assuming in the next few minutes a temp basal is coming but just trying to wrap my head around the decisions. Thanks!

As I typed this, she leveled out (maybe)...will see in 5 minutes...but hey, maybe that algo knows what it doing. Still curious why BGI is divided by two...
Scott Leibrand
@scottleibrand
Jan 17 2016 06:49
@logichammer your code is way out of date.
Pull the latest oref0 with quick-packages (if that's what you used before)
Matt Pressnall
@logichammer
Jan 17 2016 06:50
openaps 0.0.9
ahhh
Scott Leibrand
@scottleibrand
Jan 17 2016 06:50
BGI/2 has been replaced with expected delta in latest oref0 release.
Matt Pressnall
@logichammer
Jan 17 2016 06:51
sorry, how do I do a oref0 pull...it is not part of the openaps updates I have been doing?
Scott Leibrand
@scottleibrand
Jan 17 2016 06:51
The quick-packages script should do it.
sudo npm install -g oref0
(if you only want to update oref0)
Matt Pressnall
@logichammer
Jan 17 2016 06:52
thanks! I am still unclear on what gets updated with the different commands
I'm running this now, though so thanks so much!
Scott Leibrand
@scottleibrand
Jan 17 2016 06:53
Python stuff and js stuff are different worlds.
openaps is Python, so it can update all Python dependencies like decocare.
But oref0 is js, so it's separate.
Matt Pressnall
@logichammer
Jan 17 2016 06:54
gotcha...now that I am subscribed to the google group emails, I should hopefully have my ears open about changes
Scott Leibrand
@scottleibrand
Jan 17 2016 06:54
js stuff is done by npm, Python by easy_install
Matt Pressnall
@logichammer
Jan 17 2016 06:55
oh yeah, I have never done the npm command...so I am way out of date
Scott Leibrand
@scottleibrand
Jan 17 2016 06:55
there are also OS packages maintained by apt-get
but their update cycle is years, not weeks. :-)
except for some security patches.
Matt Pressnall
@logichammer
Jan 17 2016 06:56
And I just broke it...thank god I imaged this thing earlier today... :)
Checking if we can talk to pump

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.eg
going to run that quick script first
Jason Calabrese
@jasoncalabrese
Jan 17 2016 07:01
get a No space left on device error, but looks like I do have space
think it might be a tmp mount
Jason Calabrese
@jasoncalabrese
Jan 17 2016 07:07
it's my giant repo
damn
Matt Pressnall
@logichammer
Jan 17 2016 07:07
@jasoncalabrese , I freed up space on my pi by removing Wolfram engine 400mbs or so
sudo apt-get purge wolfram-engine
Jason Calabrese
@jasoncalabrese
Jan 17 2016 07:08
already gone
I cleaned most stuff off a long time ago
Matt Pressnall
@logichammer
Jan 17 2016 07:10
figured...I need to figure out how to resize my stuff...I have a 16gb disk but since I imaged an 8gb install and put it on my 16gb and it only sees it as an 8b setup. I'm sure there is a way but I haven't looked into it. I figure my log files will eat this up quickly.
Jason Calabrese
@jasoncalabrese
Jan 17 2016 07:10
rm -rf .git :worried:
think I'll need to rotate repo if I'm going to keep pushing to github and trying to preserve history
Matt Pressnall
@logichammer
Jan 17 2016 07:13
Ack...any ideas here:
pi@raspberrypi:~/openaps$ openaps monitor-cgm
dexie://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.0.9', 'openaps-report')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 726, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1651, in run_script
Scott Leibrand
@scottleibrand
Jan 17 2016 07:13
@logichammer raspi-config and expand file system. Back it up first though, because your backup will expand too. :-)
Is that the complete error?
Matt Pressnall
@logichammer
Jan 17 2016 07:14
Thanks, @scottleibrand ! I know there had to be a way to make it bigger
no...here it comes
pi@raspberrypi:~/openaps$ openaps monitor-cgm
dexie://JSON/iter_glucose/monitor/glucose.json
reporting monitor/glucose.json
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.0.9', 'openaps-report')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 726, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1651, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.9-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, 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-report", line 69, in epilog
    super(ReportToolApp, 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 72, in create_git_commit
    if self.repo.is_dirty( ) or self.repo.index.diff(None):
  File "/usr/local/lib/python2.7/dist-packages/GitPython-1.0.1-py2.7.egg/git/repo/base.py", line 582, in is_dirty
    len(self.git.diff('--cached', *default_args)):
  File "/usr/local/lib/python2.7/dist-packages/GitPython-1.0.1-py2.7.egg/git/cmd.py", line 440, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/GitPython-1.0.1-py2.7.egg/git/cmd.py", line 834, in _call_process
    return self.execute(make_call(), **_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/GitPython-1.0.1-py2.7.egg/git/cmd.py", line 627, in execute
    raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git diff --cached --abbrev=40 --full-index --raw' returned with exit code 128
stderr: 'error: object file .git/objects/10/6089fd83ee34ec6bf58e178712f008ce370403 is empty
error: object file .git/objects/10/6089fd83ee34ec6bf58e178712f008ce370403 is empty
fatal: loose object 106089fd83ee34ec6bf58e178712f008ce370403 (stored in .git/objects/10/6089fd83ee34ec6bf58e178712f008ce370403) is corrupt'
Scott Leibrand
@scottleibrand
Jan 17 2016 07:15
Your git repo is corrupt.
Matt Pressnall
@logichammer
Jan 17 2016 07:15
F word
Scott Leibrand
@scottleibrand
Jan 17 2016 07:15
Use oref0-reset-git
Matt Pressnall
@logichammer
Jan 17 2016 07:15
but why is that borking this
ok
Scott Leibrand
@scottleibrand
Jan 17 2016 07:15
It will attempt to fix, and start the repo over if it can't.
You might lose git history, but shouldn't lose anything current.
Jason Calabrese
@jasoncalabrese
Jan 17 2016 07:16
Screen Shot 2016-01-16 at 11.13.52 PM.png
think I'll let that stand as a record and make a new repo
Scott Leibrand
@scottleibrand
Jan 17 2016 07:16
Glad I don't upload mine. :-)
Jason Calabrese
@jasoncalabrese
Jan 17 2016 07:16
maybe a repo a month
Matt Pressnall
@logichammer
Jan 17 2016 07:16
Holy crap, @jasoncalabrese!
Scott Leibrand
@scottleibrand
Jan 17 2016 07:17
i should go see what my Pi's local repos have
Jason Calabrese
@jasoncalabrese
Jan 17 2016 07:17
was pushing in real time since the beginging
Scott Leibrand
@scottleibrand
Jan 17 2016 07:17
only recently got the fix-corruption working tho, so likely have been reset lots of times.
Matt Pressnall
@logichammer
Jan 17 2016 07:17
Damn, Scott, you know everything! That fixed it...repro got reset
Scott Leibrand
@scottleibrand
Jan 17 2016 07:17
Been there done that, like four dozen times. ;-)
Matt Pressnall
@logichammer
Jan 17 2016 07:17
ideas why it got corrupted?
Scott Leibrand
@scottleibrand
Jan 17 2016 07:18
if it's writing to a file when it loses power is one common cause.
Matt Pressnall
@logichammer
Jan 17 2016 07:18
Well, I have lost power like 3 times today...I need to turn off some of that stuff I see folks talking about HDMI, other USB slots
I'm just happy to have it working!
My reason is much shorter now:
"reason": "BG 61<70",
Scott Leibrand
@scottleibrand
Jan 17 2016 07:19
Or just get a better battery. Tecknet doesn't cut power when you charge it.
Your min_bg must be really low.
Matt Pressnall
@logichammer
Jan 17 2016 07:20
Yeah, I am planning on getting a big boy
Aaron Michelson
@Aaybob
Jan 17 2016 07:20
Setup Password-less Login Windows. follow "this guide" from GitHub to create one."
this all went well but then it asked me to use a command to copy to my clipboard my key. but the command was nonexistant. But did I make a key. the copy was for pasting into git hub. Next the Setup Pass- directions said to logoout and copy key into RPi2 by entering "command". where is that command to be entered?
Scott Leibrand
@scottleibrand
Jan 17 2016 07:20
110-120 target range is typical. Some people start higher when first testing.
Matt Pressnall
@logichammer
Jan 17 2016 07:20
110...but she was not looping while I updated the pi
and she was dropping
dah!
Scott Leibrand
@scottleibrand
Jan 17 2016 07:20
Hmm, why is it comparing to 70 I wonder?
We should remove that passwordless stuff from the docs.
It's unnecessary and confusing for non-technical folks.
Matt Pressnall
@logichammer
Jan 17 2016 07:21
is that 70 supposed to be her target?
Scott Leibrand
@scottleibrand
Jan 17 2016 07:21
No reason you can't just log in with a decent password.
Matt Pressnall
@logichammer
Jan 17 2016 07:22
because I have done something wrong then
Scott Leibrand
@scottleibrand
Jan 17 2016 07:22
no that's the low glucose suspend threshold.
Aaron Michelson
@Aaybob
Jan 17 2016 07:22
ok so just setup password in raspi-config later...for now use pi rasp...
Scott Leibrand
@scottleibrand
Jan 17 2016 07:22
You need to set a decent password, but can skip all the key garbage.
Default passwords are dangerous.
But a reasonable password you set is fine.
Aaron Michelson
@Aaybob
Jan 17 2016 07:23
Okay just don't know what lies ahead...guessing its important
Scott Leibrand
@scottleibrand
Jan 17 2016 07:23
Just a question of whether anyone who can access your Pi over wifi can control your insulin dosing.
So kinda important. :-)
Aaron Michelson
@Aaybob
Jan 17 2016 07:24
how often does one end up logging into pi?
Scott Leibrand
@scottleibrand
Jan 17 2016 07:24
@logichammer can you paste your profile?
Matt Pressnall
@logichammer
Jan 17 2016 07:24
{"temp":"absolute","bg":61,"tick":-4,"eventualBG":51,"snoozeBG":51,"reason":"BG 61<70","duration":30,"rate":0}
suggested.json...just want to make sure it looks ok
will do that now
{"max_iob":20,"type":"current","dia":4,"current_basal":0.15,"max_daily_basal":0.25,"max_basal":1,"min_bg":90,"max_bg":100,"sens":100}
Scott Leibrand
@scottleibrand
Jan 17 2016 07:24
That looks good to enact at least.
Matt Pressnall
@logichammer
Jan 17 2016 07:25
and my profile?
Scott Leibrand
@scottleibrand
Jan 17 2016 07:25
max_iob should be more like 2
I really need to rename that to max_basal_iob
Matt Pressnall
@logichammer
Jan 17 2016 07:25
gotcha...is that influencing the targets?
Scott Leibrand
@scottleibrand
Jan 17 2016 07:26
You said target was 110, but it's actually 90-100
max IOB doesn't usually matter.
Only comes into play if it high-temps for a long time.
Matt Pressnall
@logichammer
Jan 17 2016 07:26
Ah this is where it is set
I was looking at (looking for a file)
Scott Leibrand
@scottleibrand
Jan 17 2016 07:26
It's the bolus wizard settings on the pump.
Matt Pressnall
@logichammer
Jan 17 2016 07:27
{
  "units": "mg/dL", 
  "raw": "0x01 0x00 0x6e 0x78 0x0c 0x5a 0x64 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": 120, 
      "start": "22:00:00", 
      "low": 110, 
      "offset": 0, 
      "i": 0, 
      "x": 0
    }, 
    {
      "high": 100, 
      "start": "06:00:00", 
      "low": 90, 
      "offset": 360, 
      "i": 12, 
      "x": 1
    }
  ], 
  "first": 1
}
bg targets
Scott Leibrand
@scottleibrand
Jan 17 2016 07:27
Youll need to change it on the pump and reread settings
So you have two for day and night?
Matt Pressnall
@logichammer
Jan 17 2016 07:28
yes correct
Scott Leibrand
@scottleibrand
Jan 17 2016 07:28
Are you rereading settings in your loop?
cause your day settings are still in effect.
Matt Pressnall
@logichammer
Jan 17 2016 07:28
no...only updating settings occasionally
AHHHH
I will cron that
Scott Leibrand
@scottleibrand
Jan 17 2016 07:28
Need to reread and regen profile in loop or at least occasionally.
I do it in the loop, after the important stuff is done and I'm just waiting on a new BG
Matt Pressnall
@logichammer
Jan 17 2016 07:29
I'll do it once an hour...that was plan...so I don't need to change anything on the pump, though correct
Scott Leibrand
@scottleibrand
Jan 17 2016 07:29
ya pump looks fine.
Matt Pressnall
@logichammer
Jan 17 2016 07:29
just need read settings more frequently than once a day
perfect
got and understood...thank you so much!
Scott Leibrand
@scottleibrand
Jan 17 2016 07:30
np
Matt Pressnall
@logichammer
Jan 17 2016 07:30
hey, do you run your loop every minute, two minutes...what time period...because I don't think I can match dexcom's five minutes perfectly so I am running every minute
overkill?
Dana Lewis
@danamlewis
Jan 17 2016 07:32
No. Just do preflight and if it's running, doesn't need to run.
Definitely don't want to do 5 and run the risk of a data point being delayed and mess everything up for another cycle
Matt Pressnall
@logichammer
Jan 17 2016 07:33
Almost like a daemon then?
Dana Lewis
@danamlewis
Jan 17 2016 07:33
So minute with good preflights is what we do
Aaron Michelson
@Aaybob
Jan 17 2016 07:33
yes, ready to set up openaps and dependencies after a break
Dana Lewis
@danamlewis
Jan 17 2016 07:33
Yep @logichammer
Matt Pressnall
@logichammer
Jan 17 2016 07:34
I don't have preflight...I have seen it sprinkled around but didn't implement. I'll look into...I found scotts loop.sh after I built mine but I have almost all of the same stuff in at this point
lockfile, verifying I can talk to pump before doing anything, resetting USB if I can, etc...Loved finding Scott's loop!
Perfect...thanks, Dana!
Scott Leibrand
@scottleibrand
Jan 17 2016 07:35
We actually do a ps check first to make sure another openaps process isn't running.
And if the preflight fails, it sleeps for 120s in case another Pi is trying to talk to the pump.
Matt Pressnall
@logichammer
Jan 17 2016 07:36
before the lock file, badass! I used to have perl module I wrote called Highlander.pm. Would print out "There can only be one" when it found another process running.
Your loop is a daemon then? Sounds like it...
Scott Leibrand
@scottleibrand
Jan 17 2016 07:37
Heh. Mine was more boring: "OpenAPS already running". Removed that as redundant tho.
Matt Pressnall
@logichammer
Jan 17 2016 07:37
I am a suckah cron job dude right now
Scott Leibrand
@scottleibrand
Jan 17 2016 07:37
It might as well be a daemon. :-)
only advantage of this over daemon is I don't have to restart it each time I update something.
Since it runs from scratch every 5m or so.
Matt Pressnall
@logichammer
Jan 17 2016 07:39
Yeah, I'm fine with it from cron...don't have to worry about memory leaks or any sort of persistence issues
it's easy
Scott Leibrand
@scottleibrand
Jan 17 2016 07:39
I also have a cron job to killall -g --older-than 10m openaps'
Matt Pressnall
@logichammer
Jan 17 2016 07:40
Man, there is so much to document
Matt Pressnall
@logichammer
Jan 17 2016 07:40
these are great things to be doing
Scott Leibrand
@scottleibrand
Jan 17 2016 07:40
that's a stripped down read only version of my loop
Matt Pressnall
@logichammer
Jan 17 2016 07:41
Damn, I wish I had stumbled on that my first day with this stuff...I got spaghetti commands everywhere! :)
version 2 of my loop
Dana Lewis
@danamlewis
Jan 17 2016 07:44
That means you're learning :)
And besides, what did you think our code looked like when we started?! ;)
Scott Leibrand
@scottleibrand
Jan 17 2016 07:44
we don't put that script front and center in the docs, because we want people to figure it the logic.
Matt Pressnall
@logichammer
Jan 17 2016 07:44
ha!
No, I get it and I need to crawl to figure it out but it is so heavenly looking
Thomas Emge
@ThomasEmge
Jan 17 2016 07:45
I am now on version 4 of my loop...seems to be a lot more stable with a single cron
Scott Leibrand
@scottleibrand
Jan 17 2016 07:45
Kinda like the 670G? ;-)
Dana Lewis
@danamlewis
Jan 17 2016 07:45
:) never compare your behind the scenes to someone else's posed snapshots ;) (or whatever they say about life and social media)
Scott Leibrand
@scottleibrand
Jan 17 2016 07:46
So easy! So simple! Oh, wait, I can't fine-tune it? Lame! ;-)
Matt Pressnall
@logichammer
Jan 17 2016 07:46
comparison is the thief of happiness, right?
trust me very happy with having it up and running
log file is tailing and watching all this loveliness happen
Scott Leibrand
@scottleibrand
Jan 17 2016 07:47
:-D
Dana Lewis
@danamlewis
Jan 17 2016 07:47
Ya. Just want you to soak the joy and not worry about perfection, it'll never happen :) always room to improve and iterate, even years in!
Scott Leibrand
@scottleibrand
Jan 17 2016 07:49
If any of you newbies would like an opportunity to pay it forward, it seems the "passwordless" section of the setup docs could use some cleanup. Need to make it clear what's optional and provide an easier path forward for someone who doesn't want to bother with ssh keys and just set a reasonable password.
You can clone the docs repo, make your changes, and then submit a pull request to the dev branch of the main docs repo.
Dana Lewis
@danamlewis
Jan 17 2016 07:50
(Same goes for any other parts of the docs that you've spotted needs work)
Just make sure to clone again if you previously cloned the docs and it's been a while (more than a week or so)
Scott Leibrand
@scottleibrand
Jan 17 2016 07:51
I've just noticed @Aaybob and others getting hung up on that part, but there are likely lots of other parts of the docs that need similar help. :-)
Matt Pressnall
@logichammer
Jan 17 2016 07:51
I can take a look...planning on focusing on the loop (pseudo code) and Nightscout upload with basal profiles turned on because that was TOUGH to figure out without any docs.
Scott Leibrand
@scottleibrand
Jan 17 2016 07:51
have you seen the latest updates to dev?
Matt Pressnall
@logichammer
Jan 17 2016 07:51
If I get that done on my trip, I can look into that piece...I don't remember it being tough
no, I need to pull before writing
Scott Leibrand
@scottleibrand
Jan 17 2016 07:51
a few other folks though the same and submitted improvements.
Matt Pressnall
@logichammer
Jan 17 2016 07:51
gotcha
also, Ihave that BGI explanation text and plans to improve it
Leaving Wednesday and will have time in transit to work on it
Dana Lewis
@danamlewis
Jan 17 2016 07:52
Excellent
Scott Leibrand
@scottleibrand
Jan 17 2016 07:52
Make sure your BGI explanation still applies to the new expected delta regime. :-)
BGI is still there, we just modified the way we use it a bit.
Matt Pressnall
@logichammer
Jan 17 2016 07:53
Still work...I am going to dumb it down even more:

"To calculate this deviation, OpenAPS first calculates a term we call “BG Impact” or BGI. BGI is simply the expected effect of the net IOB, calculated by multiplying the current insulin activity times the ISF (see example below). the current insulin activity (first derivative of IOB) * insulin sensitivity. When expressed in units of mg/dL/5m, this represents the degree to which BG “should” be rising or falling, and can be directly compared to the delta between the current and last CGM reading, or an average delta over the last 15m or so. To calculate the deviation, OpenAPS does exactly this comparison, between the 15m average delta in CGM readings and the predicted BGI.

Example: take the scenario of correcting a BG of 200 (where ISF is 1u per 100 mg/dL, DIA is 4 hours, and target BG is 100).
1u insulin is given to bring BG to 100
There are 48 5-minute segments in 4 hours
1u/48 = .021 (This is the current insulin activity, or how much net IOB is 'used' in a 5-minute period)
Thus we expect the BG to drop -2.1 mg/dL every 5 minutes (.021 100 mg/dL), so the BGI is -2.1 mg/dL/5m
Multiplying this by the ISF (.021
100 mg/dL), gives us the BGI of -2.1 mg/dL/5m (the expected BG decrease over 5 minutes)
OpenAPS then applies that deviation as an adjustment to the eventual BG prediction. This is based on the simple assumption that if BG is rising or falling more than expected over the last 15 minutes, that trend is likely to continue over the next 15-30 minutes, and the magnitude of the projected deviation is approximately equal to what was seen over the last 15 minutes. In future OpenAPS implementations it may be possible to come up with better predictive algorithms of this sort, but this simple algorithm has worked quite well over many months of real-life use so far."

Scott Leibrand
@scottleibrand
Jan 17 2016 07:54
Ok, that part is unchanged in the code.
It's just the BGI/2 comparison that is gone.
Matt Pressnall
@logichammer
Jan 17 2016 07:55
Other bits to include, though?
Scott Leibrand
@scottleibrand
Jan 17 2016 07:55
Probably, but would need to read over it on a flight and write up the new stuff.
Sulka Haro
@sulkaharo
Jan 17 2016 07:56
Hey theory: the PC Connect on new MedTronic pumps times out pretty quickly, right? Would it be that there's an RF command to change the pump state so the radio stays open, which has the be enacted when the pump is told to open the RF mode..? I recall someone saying MedTronic hinted that there might be ways with the new pump software.
Scott Leibrand
@scottleibrand
Jan 17 2016 07:56
We tried to find such a command and failed. Could exist though.
Matt Pressnall
@logichammer
Jan 17 2016 07:57
OK...I'm going to pull dev docs tonight and then work on this Wednesday and Sunday of next week and will have a PR out probably the 25th
Scott Leibrand
@scottleibrand
Jan 17 2016 07:57
Cool
@sulkaharo if you found such a command you'd be a hero. :-)
Dana Lewis
@danamlewis
Jan 17 2016 07:58
Would be awesome! @sulkaharo That might have been @bewest hearing hints about the new Connect device? Supposedly read-only..but..who knows?
Not sure anyone who has a Connect has tried sniffing it, or if they have I haven't heard any rumblings yet
Cool @logichammer
Sulka Haro
@sulkaharo
Jan 17 2016 08:06
Or maybe we'll just all switch over to the Ping :)
Is the Vibe sold in EU the same product as Ping in US?
Did they do 2.4 GHz cross the board?
Scott Leibrand
@scottleibrand
Jan 17 2016 08:09
No, vibe is newer.
I'm not sure Ping will be as safe as MDT for openaps. You can't remotely control temp basals on it, only extended boluses.
Sulka Haro
@sulkaharo
Jan 17 2016 08:10
:(
Scott Leibrand
@scottleibrand
Jan 17 2016 08:10
so only way to have full control over infusion rate is to set basal schedule to zero and have a 100% reliable AP or alarm when it fails.
If @mariusae can get the AP reliable enough (order of magnitude more so than infusion sets) that is probably an option, just not as easy to share code etc. safely.
Since openaps/oref0 is so safe by design, it's easier to be confident that someone building their own can't do major harm. Lots of work to get to that point with the Ping.
But they're just getting started, so I am confident they'll get something that works well for at least some people.
(We'll?)
Scott Leibrand
@scottleibrand
Jan 17 2016 08:16
Am hoping the openaps algorithms can be adapted to the Ping, but we probably can't share oref0 code like with HAPP.
Aaron Michelson
@Aaybob
Jan 17 2016 08:31
Hi, : "No space left on device"
ls shows Desktop Downloads openaps.ini Public setuptools-19.4.zip Videos Documents Music Pictures python_games Templates
can I delete all that?
Scott Leibrand
@scottleibrand
Jan 17 2016 08:56
That is your home directory, which doesn't use much space. You'll want to start by doing the expand file system thing I mentioned before.
And then deleting unnecessary packages like I told Dane a couple nights ago.
(If the expand isn't enough)
Matt Pressnall
@logichammer
Jan 17 2016 09:07
Does this sound right that every minute, it is setting a new temp basal with a rate of 0 (so that it can extend the duration of temp basal)? Or would it wait until a temp basal was over to set the same one again and again? My issue is that it keeps overwriting a temp basal of 0 with a temp basal of 0. Want to make sure I am not doing anything wrong and that is the expected behavior.
--------------------------------------------
2016-01-17 01:04:22     suggested.json  a:8:{s:4:"temp";s:8:"absolute";s:2:"bg";i:78;s:4:"tick";i:-2;s:10:"eventualBG";i:76;s:8:"snoozeBG";i:76;s:6:"reason";s:8:"BG 78<80";s:8:"duration";i:30;s:4:"rate";i:0;}
Aaron Michelson
@Aaybob
Jan 17 2016 09:22
the expand filesystem procedure asked me to reboot the network dropped the gui says "no networks found" ... I modified the files /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf as per the docs to try and have networking automatic. So how would I find the original text of those files? I should have just commented lines out.
Matthias
@ceben80
Jan 17 2016 09:57
Unfortunately, I am not familiar with APS and the prerequisites.
Does anybody know if this pi will work for this project?
http://www.exp-tech.de/mainboards/raspberry-pi/raspberry-pi-zero
Ben West
@bewest
Jan 17 2016 09:59
the pi-zero will work, but will be difficult for beginners
there's a nice overview of hardware stuff here https://github.com/openaps/docs/blob/dev/docs/getting-started/hardware.md
Matthias
@ceben80
Jan 17 2016 10:02
wow, thanks for speedy replay
but it's soooooo huge :worried:
LadyViktoria
@LadyViktoria
Jan 17 2016 10:07
maybe intel edison? but i dont know if it works with dexcom cgm
Ben West
@bewest
Jan 17 2016 10:07
pi-zero and intel edison are both attractive options for shrinking the rig size
but they also represent a few crafting challenges, people are doing it, but a lot of it is custom/exploratory/R&D
PieterGit
@PieterGit
Jan 17 2016 10:15
what firmware of the Paradigm 754 is supported for openaps? i got VER 2.8B 1.1 which I assume is to new. I try to get uploading to nightscout to work.
Ben West
@bewest
Jan 17 2016 10:16
the way to test it is to try the "button press" command
there's a tool called mm-press-key.py --serial 123456 --init down should test if the pump will accept commands over RF
it should turn on the light
replace 123456 with your serial number
PieterGit
@PieterGit
Jan 17 2016 10:19

PUMP MODEL: ReadPumpModel:size[64]:data:'754'

down

response: KeypadPush:data:unknown
hexdump:
Ben West
@bewest
Jan 17 2016 10:19
ah, did anything happen on the screen?
light turn on?
PieterGit
@PieterGit
Jan 17 2016 10:20
nothing on the screen, no light, but it complains about no reservoir
Ben West
@bewest
Jan 17 2016 10:20
mm-press-key.py --serial 123456 esc
you can use esc act down or up
or easy
should be able to clear the alarm/turn on light
it will talk to the pump and get history just fine
so that means you can use it to upload history to nightscout
mm-latest.py --serial 123456 should give you a report with lots of stuff from your pump, for example
PieterGit
@PieterGit
Jan 17 2016 10:23
nothing seems to be happening on the screen.
Ben West
@bewest
Jan 17 2016 10:24
yeah, not a good sign, then in terms of being able to temp basal
PieterGit
@PieterGit
Jan 17 2016 10:24
that works. so it's read only and not possible to change any boluses?
Ben West
@bewest
Jan 17 2016 10:24
mm-temp-basals.py --serial 123456 set --duration 30 --rate 0 for 0 temp basal for 30 minutes
hmm, yeah, might be read-only
PieterGit
@PieterGit
Jan 17 2016 10:25
the mm-latest.py gives a traceback as well:

decoded:

{'status': 'error', 'bolusing': False, 'suspended': False}
Traceback (most recent call last):
File "/usr/local/bin/mm-latest.py", line 4, in <module>
import('pkg_resources').run_script('decocare==0.0.21', 'mm-latest.py')
File "build/bdist.linux-armv7l/egg/pkgresources/_init.py", line 726, in run_script
File "build/bdist.linux-armv7l/egg/pkgresources/_init.py", line 1651, in run_script
File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/EGG-INFO/scripts/mm-latest.py";, line 211, in <module>
app.run(None)
File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/helpers/cli.py";, line 114, in run
self.main(args)
File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/EGG-INFO/scripts/mm-latest.py";, line 200, in main
self.report_status(args)
File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/EGG-INFO/scripts/mm-latest.py";, line 130, in report_status
args.status.write(json.dumps(self.status, indent=2))
AttributeError: 'bool' object has no attribute 'write'
Ben West
@bewest
Jan 17 2016 10:26
ah, that's a bug in the code apparently
nothing wrong with pump
well, many of the openaps commands will work
so you can get all the history from pump and enter it into NS automatically
turning in, night all
PieterGit
@PieterGit
Jan 17 2016 11:12
trying to get uploading to nightscout workings. seems to fail at $ openaps upload-recent-treatments
cat: entries.json: No such file or directory
PieterGit
@PieterGit
Jan 17 2016 11:21
can't find where entries.json is generated. i'm trying to get ns-uploader-setup.sh to work, but fail miserably. will try again later today, but need to stop for know. thanks for the support so far. i hope to get this stuff up and running soon.
Sulka Haro
@sulkaharo
Jan 17 2016 12:35
@PieterGit is that the pump history or the glucose data from the CGM?
Scott Leibrand
@scottleibrand
Jan 17 2016 15:19
@PieterGit that error means you're not setting your NIGHTSCOUT_HOST and API_SECRET variables properly in your shell or in cron (wherever you're invoking it).
To check firmware, go into utilities and look for a PC Connect menu. If it's present, your firmware is too new.
@logichammer extending zero temps is expected behavior when it needs a temp less than zero (a zero temp for more than 30m). Once it no longer needs such a low temp, it will let the zero temp run a bit without extending it.
Only zero temps get extended. High and nonzero low temps will run until they are canceled, have <5m left, or a more extreme temp is required.
PieterGit
@PieterGit
Jan 17 2016 17:38
i can confirm the entries.json was caused by missing environment variables NIGHTSCOUT_HOST and API_SECRET. It's caused by the TYPE=${3-entries.json}
ENTRIES=${4-entries.json} from ns-upload script. Unfortuately uploading doesn't work yet.
Kevin Wells
@wkcwells
Jan 17 2016 17:51
My openaps local git repo has been corrupted two nights in a row when running out of or changing battery. Is this a common problem?
Scott Leibrand
@scottleibrand
Jan 17 2016 18:01
Yes. I put oref0-reset-git in my preflight to fix as needed.
Kevin Wells
@wkcwells
Jan 17 2016 18:05
Thanks!
Toby Canning
@TC2013
Jan 17 2016 18:51
@bewest I have been working more on openxshareble on the Edison. I'm getting this message

Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/edison/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/edison/src/openaps/openaps/cli/__init__.py", line 44, in __call__
    self.run(self.args)
  File "/home/edison/src/openaps/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/home/edison/src/openaps/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/home/edison/src/openaps/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/edison/openxshareble/openxshareble/__init__.py", line 89, in __call__
    res = self.ble.run_mainloop_with(run, quit_with_loop=False)
  File "/home/edison/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/provider.py", line 121, in _user_thr                         ead_main
    self._return_code = target()
  File "/home/edison/openxshareble/openxshareble/__init__.py", line 85, in run
    output = self.main(args, app)
  File "/home/edison/src/openaps/openaps/vendors/dexcom.py", line 120, in main
    for item in self.dexcom.iter_records('EGV_DATA'):
AttributeError: 'NoneType' object has no attribute 'iter_records'
Toby Canning
@TC2013
Jan 17 2016 19:13
Did you come across that error when you installed?
Ben West
@bewest
Jan 17 2016 19:36
ah
well
that's the error everyoone but me is getting
Toby Canning
@TC2013
Jan 17 2016 19:36
HA! And I thought perhaps I made it to a new error
Ben West
@bewest
Jan 17 2016 19:36
hehehe
I just bought 4 ble dongles
need to install bluez on one of the rpi
I have an e-ink prototype, a mobile rig
guess time for new ble prototype rig
but maybe we can double check a few things
also, running bluetoothd with bluetoothd --experimental or bluetoothd -E
JaysonEwer
@JaysonEwer
Jan 17 2016 19:52
Greetings, all. I finally realized why my progress slowed quite a bit. :-D I was "ready" to move into phase2, according to the newer documentation here: https://openaps.gitbooks.io/building-an-open-artificial-pancreas-system/content/docs/Build-manual-system/Using-oref0-tools.html, but was referencing the older documentation here: https://groups.google.com/forum/#!topic/openaps-dev/GMBUHYYZInU I thought I had other steps to complete/work through, namely the oref0 virtual devices setup, prior to moving on but finally realized I needed to move on, in order to understand the oref0 virtual device setup. I've made some good progress today using the newer documentation site: https://openaps.gitbooks.io/building-an-open-artificial-pancreas-system/content/docs/Build-manual-system/Using-oref0-tools.html
Dana Lewis
@danamlewis
Jan 17 2016 19:55
Yep. Highly recommend people keep bookmarking https://github.com/openaps/docs so they'll always be looking at the most up to date docs.
(The gitbook links are prettier formatting but sometimes the formatting breaks . they're sourced from GitHub docs repo linked above, so that's the best guarantee of making sure you're seeing the latest)
JaysonEwer
@JaysonEwer
Jan 17 2016 19:56
@danamlewis Yes, i'm sure I was looking at both at one point and then ended up for some reason using the older one again. It's all good. I'm sure I've learned something in the process.
I have one question related to @bewest oref0-mint-max-iob.sh script referenced there. It doesn't seem to be creating the max_iob.json file. Is there something I am missing?
Dana Lewis
@danamlewis
Jan 17 2016 19:58
Just create the file if the script is not doing it
JaysonEwer
@JaysonEwer
Jan 17 2016 19:59
I've created the max_iob.json file manually and have successfully generated my profile.json, but i'm pretty sure its not exactly correct? '''pi@Ewer-Open-APS:~/Documents/openaps $ cat settings/profile.json
{"max_iob":0,"type":"current","dia":4,"current_basal":2,"max_daily_basal":2,"max_basal":5,"min_bg":90,"max_bg":120,"sens":50}'''
Scott Leibrand
@scottleibrand
Jan 17 2016 19:59
You do 5U/hr with an ISF of 50?!
oh nm
JaysonEwer
@JaysonEwer
Jan 17 2016 20:00
Like I said, i'm sure thats not correct. I still need to do some of the recommended testing.
Scott Leibrand
@scottleibrand
Jan 17 2016 20:00
that's your pump max setting, not your max daily
that is only 2, which makes more sense.
JaysonEwer
@JaysonEwer
Jan 17 2016 20:00
I'm not going to go live with these numbers just yet. :-D
yeah
Aaron Michelson
@Aaybob
Jan 17 2016 20:01
test
Dana Lewis
@danamlewis
Jan 17 2016 20:01
What is your Maxiob in your file?
JaysonEwer
@JaysonEwer
Jan 17 2016 20:02
0
But that's what I manually entered.
Dana Lewis
@danamlewis
Jan 17 2016 20:02
If max IoB is 0, it will high temp you if you have negative iob but not beyond that. So think about what you want that to be.
JaysonEwer
@JaysonEwer
Jan 17 2016 20:02
When I run ben's scritp, it puts 2 on the screen, but doesn't create the file, i'm sure I missed something, but the script DID run.
Dragan Maksimovic
@dm61
Jan 17 2016 20:03
Hmm, I am stuck at attempting to upload to Nightscout. In
Dana Lewis
@danamlewis
Jan 17 2016 20:04
With zero, that's basically setting it to threshold suspend mode only. Which is fine. But if you want to high temp for highs, you'll probably want more than 0. Wouldn't want to go much higher than 2u though, and maybe lower than that as you first start testing
JaysonEwer
@JaysonEwer
Jan 17 2016 20:04
'''
pi@Ewer-Open-APS:~/Documents/openaps $ ./oref0-mint-max-iob.sh
Usage:
oref0-mint-max-iob.sh max_iob <max_iob> [max_iob.json]
oref0-mint-max-iob.sh help - this message
Print a perfect max_iob.json.
Examples:
$ oref0-mint-max-iob.sh 2
{
"max_iob": 2
}
$ oref0-mint-max-iob.sh 2 foo.json
max_iob 2 saved in foo.json
bewest@hither:~/src/openaps/oref0$
./oref0-mint-max-iob.sh: line 40: Status: command not found
pi@Ewer-Open-APS:~/Documents/openaps $ ls
basal_profile.json determine-basal.ini last_four_cgms_hours.json openaps.ini pumphistory.json settings
bg_targets.json enact last_four_pump_hours.json oref0.ini pump.ini
calculate-iob.ini get-profile.ini max_iob.json oref0-mint-max-iob.sh pump_settings.json
cgms.ini glucose.json monitor pump-history.json read_status.json
'''
Dana Lewis
@danamlewis
Jan 17 2016 20:04
Yea you can manually create, that's fine. Change the number (try .5) and run again and make sure it shows in the profile that Maxiob matches that change
JaysonEwer
@JaysonEwer
Jan 17 2016 20:05
What am I doing wrong on the formatting thing. :-/ NOOB
Dana Lewis
@danamlewis
Jan 17 2016 20:05
Back ticks, rather than apostrophe
JaysonEwer
@JaysonEwer
Jan 17 2016 20:05
ah, doh!
Dana Lewis
@danamlewis
Jan 17 2016 20:05
Swap back ticks and it'll worj
We all do that one :)
JaysonEwer
@JaysonEwer
Jan 17 2016 20:05
pi@Ewer-Open-APS:~/Documents/openaps $ ./oref0-mint-max-iob.sh Usage: oref0-mint-max-iob.sh max_iob <max_iob> [max_iob.json] oref0-mint-max-iob.sh help - this message Print a perfect max_iob.json. Examples: $ oref0-mint-max-iob.sh 2 { "max_iob": 2 } $ oref0-mint-max-iob.sh 2 foo.json max_iob 2 saved in foo.json bewest@hither:~/src/openaps/oref0$ ./oref0-mint-max-iob.sh: line 40: Status: command not found pi@Ewer-Open-APS:~/Documents/openaps $ ls basal_profile.json determine-basal.ini last_four_cgms_hours.json openaps.ini pumphistory.json settings bg_targets.json enact last_four_pump_hours.json oref0.ini pump.ini calculate-iob.ini get-profile.ini max_iob.json oref0-mint-max-iob.sh pump_settings.json cgms.ini glucose.json monitor pump-history.json read_status.json
Scott Leibrand
@scottleibrand
Jan 17 2016 20:05
If you want to use that mint script, you need to redirect its output to a file.
JaysonEwer
@JaysonEwer
Jan 17 2016 20:05
ah, nice
ok, that makes sense now
thank you, sir
Dana Lewis
@danamlewis
Jan 17 2016 20:06
Single back ticks does a line of code, the three on lines above and below the long code will do the black formatting
JaysonEwer
@JaysonEwer
Jan 17 2016 20:07
It kinda worked @danamlewis , but the formatting didn't line up just right
Dana Lewis
@danamlewis
Jan 17 2016 20:07
this is the three back ticks on a line above and below this text
this is single back tick before and after this txt
But even single back tick is better than none :) no worries
JaysonEwer
@JaysonEwer
Jan 17 2016 20:08
pi@Ewer-Open-APS:~/Documents/openaps $ ./oref0-mint-max-iob.sh 
  Usage:
oref0-mint-max-iob.sh max_iob <max_iob> [max_iob.json]
oref0-mint-max-iob.sh help - this message
Print a perfect max_iob.json.
Examples:
$ oref0-mint-max-iob.sh 2
{
  "max_iob": 2
}
$ oref0-mint-max-iob.sh 2 foo.json
max_iob 2 saved in foo.json
bewest@hither:~/src/openaps/oref0$ 
./oref0-mint-max-iob.sh: line 40: Status: command not found
pi@Ewer-Open-APS:~/Documents/openaps $ ls
basal_profile.json  determine-basal.ini  last_four_cgms_hours.json  openaps.ini            pumphistory.json    settings
bg_targets.json     enact                last_four_pump_hours.json  oref0.ini              pump.ini
calculate-iob.ini   get-profile.ini      max_iob.json               oref0-mint-max-iob.sh  pump_settings.json
cgms.ini            glucose.json         monitor                    pump-history.json      read_status.json
There we go
Dana Lewis
@danamlewis
Jan 17 2016 20:08
There you go!
Leveled up :)
JaysonEwer
@JaysonEwer
Jan 17 2016 20:08
:-D It's the little things. :-D
Dana Lewis
@danamlewis
Jan 17 2016 20:09
Yup!
JaysonEwer
@JaysonEwer
Jan 17 2016 20:09
So, based on the output of the script, I would want to change my 0 to a 2 and in the future, redirect script output using >> to a file as @scottleibrand said, right?
well, actually >> wouldn't be exactly correct
Scott Leibrand
@scottleibrand
Jan 17 2016 20:10
or just edit the silly file. :)
JaysonEwer
@JaysonEwer
Jan 17 2016 20:10
:-D
Dana Lewis
@danamlewis
Jan 17 2016 20:10
Yes
Scott Leibrand
@scottleibrand
Jan 17 2016 20:10
> instead of >>, yeah
JaysonEwer
@JaysonEwer
Jan 17 2016 20:10
@scottleibrand Yep
Dana Lewis
@danamlewis
Jan 17 2016 20:11
Think about the number though. Don't do 2 because it's an example , think through what you want it to be .
Scott Leibrand
@scottleibrand
Jan 17 2016 20:11
for example, what would IOB be if you ran your maximum high-temp for 30m? for 1h?
how much additional insulin would you want the system to give? how will you know about the basal IOB when you decide to bolus manually?
if you're not sure, start low and raise it over time if/as you see it stopping high-temps you think should be allowed
there's a reason we set the default to zero. :)
JaysonEwer
@JaysonEwer
Jan 17 2016 20:13
That's the testing that I definitely NEED TO DO. I'm reading Sugar Surfing and know I need to do some of these critical tests to make sure the numbers are correct.
pi@Ewer-Open-APS:~/Documents/openaps $ openaps report invoke settings/profile.jsonget-profile://text/shell/settings/profile.json
reporting settings/profile.json
pi@Ewer-Open-APS:~/Documents/openaps $ cat settings/profile.json 
{"max_iob":2,"type":"current","dia":4,"current_basal":2,"max_daily_basal":2,"max_basal":5,"min_bg":90,"max_bg":120,"sens":50}
pi@Ewer-Open-APS:~/Documents/openaps $
scottleibrand @scottleibrand wonders if I should actually read Sugar Surfing...
Scott Leibrand
@scottleibrand
Jan 17 2016 20:14
also FWIW, max_basal 5 is pretty high for initial testing
might want to drop that to 3 or so at first
(before you go live with the pump connected to a person)
Dana Lewis
@danamlewis
Jan 17 2016 20:14
Keep in mind though that these numbers are unique to looping , so you can test ISF and carb ratio and whatnot, but some of these you just set low and tweak as you test and explore what's working and not
JaysonEwer
@JaysonEwer
Jan 17 2016 20:14
@scottleibrand I'm enjoying it so far. I just got it, but it seems to be pretty well received in the community.
Scott Leibrand
@scottleibrand
Jan 17 2016 20:15
for ISF, a higher sens is more conservative, and a lower one is more aggressive
for most of the others lower is more conservative
JaysonEwer
@JaysonEwer
Jan 17 2016 20:16
@danamlewis Yes, I think I like that approach, will set lower and adjust as needed. @scottleibrand Yes, I'm tracking with you there WRT ISF.
Dragan Maksimovic
@dm61
Jan 17 2016 20:17
In openaps use ns-upload shell devicestatus.json monitor/upload-status.json, what is devicestatus.json supposed to be?
JaysonEwer
@JaysonEwer
Jan 17 2016 20:18
@dm61, I wanted to get my unloading working early as well. Are you already looping or are you getting the ns-upload working prior to looping? I'm not quite looping yet.
my uploading rather ,not unloading
Scott Leibrand
@scottleibrand
Jan 17 2016 20:18
devicestatus.json is not a local file: it's the API method on the nightscout site
Dragan Maksimovic
@dm61
Jan 17 2016 20:19
I have been looping for a while, but have switched to dev now, and am trying to upload to ns
JaysonEwer
@JaysonEwer
Jan 17 2016 20:19
@dm61, ah, ok, thanks for the info. I really need to get dev going. :-D
Dragan Maksimovic
@dm61
Jan 17 2016 20:19
so, that command should work, assuming I have upload-status.json, which I think I do
you can hit that with a browser to see if it's uploading
Dragan Maksimovic
@dm61
Jan 17 2016 20:20
my ns is on heroku
Scott Leibrand
@scottleibrand
Jan 17 2016 20:20
whatever. :)
also make sure you have the env vars set
NIGHTSCOUT_HOST and API_SECRET
set them in your shell for testing, and in cron for scheduled
Dragan Maksimovic
@dm61
Jan 17 2016 20:21
aha, I've not done that; I have set them in ns-upload.ini however as args
JaysonEwer
@JaysonEwer
Jan 17 2016 20:22
@scottleibrand I've tried setting those variables in my shell, but they get removed rather quickly.
@scottleibrand But I think I got the cart before the horse a bit and need to have the nightscout dev setup first, right?
Dana Lewis
@danamlewis
Jan 17 2016 20:24
@Aaybob Congrats on your first PR :)
JaysonEwer
@JaysonEwer
Jan 17 2016 20:25
@scottleibrand @dm61 Sorry, don't mean to highjack your thread, but I was trying to get the uploading working prior to looping, just to gather status of pump, etc.
Dragan Maksimovic
@dm61
Jan 17 2016 20:26
I get [] when I go to http://xxxxx.herokuapp.com/api/v1/devicestatus.json from a browser. Is that correct?
JaysonEwer
@JaysonEwer
Jan 17 2016 20:27
@dm61 Same here, btw and i'm not using dev yet.
i'm using 0.8.4 though.
Dragan Maksimovic
@dm61
Jan 17 2016 20:27
My ns is 0.9.0-dev
Scott Leibrand
@scottleibrand
Jan 17 2016 20:29
[] means nothing uploaded yet.
That's "empty array"
setting the env vars in your shell will only last as long as that shell is open.
Dragan Maksimovic
@dm61
Jan 17 2016 20:30
Well, I have not uploaded anything yet, since my ns-upload is returning errors; will set the env variables and try again
Scott Leibrand
@scottleibrand
Jan 17 2016 20:30
i'm not familiar with setting them in ns-upload.ini: that may also work
Dragan Maksimovic
@dm61
Jan 17 2016 21:06
no luck. I've set env variables. Here is what my openaps use ns-upload shell devicestatus.json monitor/upload-status.json returns
Traceback (most recent call last):
  File "/usr/local/bin/openaps-use", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/openaps/bin/openaps-use", line 63, in <module>
    app( )
  File "/home/pi/src/openaps/openaps/cli/__init__.py", line 44, in __call__
    self.run(self.args)
  File "/home/pi/src/openaps/bin/openaps-use", line 57, in run
    output = app(args, self)
  File "/home/pi/src/openaps/openaps/uses/__init__.py", line 92, in __call__
    return self.method.selected(args)(args, app)
  File "/home/pi/src/openaps/openaps/uses/__init__.py", line 31, in __call__
    return self.method(args, app)
  File "/home/pi/src/openaps/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/home/pi/src/openaps/openaps/vendors/process.py", line 73, in main
    command.extend(info.get('args').split(' '))
AttributeError: 'NoneType' object has no attribute 'split'
Scott Leibrand
@scottleibrand
Jan 17 2016 21:09
I do ns-upload $NIGHTSCOUT_HOST $API_SECRET treatments.json upload/latest-treatments.json
so try adding $NIGHTSCOUT_HOST $API_SECRET before devicestatus.json
Dragan Maksimovic
@dm61
Jan 17 2016 21:12
I've already tried that, and it did not work, the error was different however. I must have some stupid type somewhere - will recheck everything
type :smile:
typo
Just to make sure I understand: you get treatments.json back from ns? i.e. this is an output of ns-upload?
Scott Leibrand
@scottleibrand
Jan 17 2016 21:17
that's a POST, not a GET
you POST to treatments.json or devicestatus.json
Dragan Maksimovic
@dm61
Jan 17 2016 21:19
ok
is there any simpler ns- command that would allow me to check if I am talking to my ns at all?
JaysonEwer
@JaysonEwer
Jan 17 2016 21:21
I know I need to figure out how to update documentation, but I think I just found a document bug at the following site: https://openaps.gitbooks.io/building-an-open-artificial-pancreas-system/content/docs/Build-manual-system/Using-oref0-tools.html Towards the bottom, in the section labeled, "Adding error checking" It has the following recommended string, "openaps alias add gather '! bash -c "rm monitor/*; openaps monitor-cgm && openaps monitor-pump && openaps get-settings" But when I issue the openaps gather command I get the following error:
```
pi@Ewer-Open-APS:~/Documents/openaps $ openaps gather
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
openaps: 'get-settings' is not an openaps command. See 'openaps --help'.
Ben West
@bewest
Jan 17 2016 21:22
I've finally got ble up on my pi
I get this error:

paired? 0
pairing...
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 607, in msg_reply_handler
    *message.get_args_list()))
  File "/home/pi/src/Adafruit_Python_BluefruitLE/Adafruit_BluefruitLE/bluez_dbus/device.py", line 80, in pair_error
    raise RuntimeError('Exceeded timeout waiting to Pair with device! %s', error)
RuntimeError: ('Exceeded timeout waiting to Pair with device! %s', DBusException(dbus.String(u'Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.'),))
I built with:
./configure --disable-systemd --enable-experimental
make -j 4
sudo make install
but I'm on wheezy still
on second time I get exceeded timeout waiting to disconnect
JaysonEwer
@JaysonEwer
Jan 17 2016 21:23
So, I think the last bit of the recommeded string should read openaps gather-profile, is that what is expected there, rather than openaps get-settings?
Ben West
@bewest
Jan 17 2016 21:24
on third attempt, it loks like it pairs, and works
yup
it worked
nice
wow, I have new powerful mobile rig all of a sudden
JaysonEwer
@JaysonEwer
Jan 17 2016 21:24
@bewest SWEET!
Ben West
@bewest
Jan 17 2016 21:25
@TC2013 , @scottleibrand et al, if you built bluez, please try ./configure --enable-experimental flag
this pi has the ti dongle and ble share
Dragan Maksimovic
@dm61
Jan 17 2016 21:26
@JaysonEwer all depends on how you name your aliases; maybe there is some inconsistency in the docs, however
Ben West
@bewest
Jan 17 2016 21:26
too cool, I can walk around the house now away from the pi
Dragan Maksimovic
@dm61
Jan 17 2016 21:27
@bewest wow!!!
JaysonEwer
@JaysonEwer
Jan 17 2016 21:27
@bewest which bluetooth hardware is it working for? You had purchased a few to test, is that what I read the other day?
Ben West
@bewest
Jan 17 2016 21:28
the iogear one works just fine
I think the other one does too
there's a few glitches/issues to making this work better though
on my system, there's an issue with dbus/session
will need to fix that somehow
JaysonEwer
@JaysonEwer
Jan 17 2016 21:28
@bewest I've got the following, do you happen to know which chipset you're using on the iogear?
```
Bus 001 Device 005: ID 0a5c:21e8 Broadcom Corp. BCM20702A0 Bluetooth 4.0
Bus 001 Device 005: ID 0a5c:21e8 Broadcom Corp. BCM20702A0 Bluetooth 4.0
JaysonEwer
@JaysonEwer
Jan 17 2016 21:34
@dm61, thanks for the input regarding my docs question
Dragan Maksimovic
@dm61
Jan 17 2016 21:47
@JaysonEwer not sure which version of doc you are looking at; the dev has more details, and I think "using oref0 tools" should be fine, see https://github.com/openaps/docs/tree/dev
I've corrected a typo :smile: but no my ns-upload $NIGHTSCOUT_HOST $API_SECRET devicestatus.json monitor/upload-status.json returns Cannot POST //api/v1/devicestatus.json :worried: something is wrong on my ns side, I think
JaysonEwer
@JaysonEwer
Jan 17 2016 21:52
@scottleibrand @danamlewis @bewest, et al. Thank YOU!! THANK YOU!! Thank you!! I just issued my first manual loop alias command and it appears to have worked! I MAY be ready to automate things SOON!!!
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":-3,"glucose":187,"avgdelta":-1.6666666666666665}
{"duration":0,"rate":120,"temp":"percent"}
{"bolusiob":0,"iob":0.22054749366,"activity":0.005443434343434344}
{"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":187,"tick":-3,"eventualBG":175,"snoozeBG":175,"reason":"Eventual BG 175>90 but Delta -3 < Exp. Delta -2.8; no temp to cancel"}
No action required
pi@Ewer-Open-APS:~/Documents/openaps $
Sulka Haro
@sulkaharo
Jan 17 2016 21:54
Gratz!
Just setup a second pi, now running a dual Pi setup. Kid and parent bed rigged. :)
JaysonEwer
@JaysonEwer
Jan 17 2016 21:54
nice
Thanks @sulkaharo
I got myself spun around the axel looking at old docs, but once I started using the correct docs, things came to gether quickly!!
Sulka Haro
@sulkaharo
Jan 17 2016 21:55
:D
JaysonEwer
@JaysonEwer
Jan 17 2016 21:55
I'm very happy!!
Dana Lewis
@danamlewis
Jan 17 2016 21:56
Congrats @JaysonEwer !
And ditto @bewest Heading home and will try this afternoon :)
JaysonEwer
@JaysonEwer
Jan 17 2016 21:57
Thank you, @danamlewis!
Dragan Maksimovic
@dm61
Jan 17 2016 21:57
@JaysonEwer congrats!
Dana Lewis
@danamlewis
Jan 17 2016 21:59
And I hear @logichammer also had a good night :)
So happy for everyone.
Rachel Sandlain
@audiefile
Jan 17 2016 22:00
ditto!
Matt Pressnall
@logichammer
Jan 17 2016 22:00
I did! Thanks...super stoked!

Quick question: I was seeing this last night:
Does this sound right that every minute, it is setting a new temp basal with a rate of 0 (so that it can extend the duration of temp basal)? Or would it wait until a temp basal was over to set the same one again and again? My issue is that it keeps overwriting a temp basal of 0 with a temp basal of 0. Want to make sure I am not doing anything wrong and that is the expected behavior.

Suggested:

array (
  'temp' => 'absolute',
  'bg' => 68,
  'tick' => '+0',
  'eventualBG' => 76,
  'snoozeBG' => 76,
  'reason' => 'BG 68<80',
  'duration' => 30,
  'rate' => 0,
)

profile:
{"max_iob":20,"type":"current","dia":4,"current_basal":0.2,"max_daily_basal":0.25,"max_basal":1,"min_bg":110,"max_bg":120,"sens":100}

JaysonEwer
@JaysonEwer
Jan 17 2016 22:01
@dm61 Thanks for the link to the https://github.com/openaps/docs/tree/dev I'll head over there in few minutes after I finish my dance of joy. :sparkles:
Thanks @audiefile.
Matt Pressnall
@logichammer
Jan 17 2016 22:02
it did the right thing all night so I assume so but I would have thought it would wait until the temp basal was over to reset
Dragan Maksimovic
@dm61
Jan 17 2016 22:03
I've finally managed to upload to ns :smile: it's https, not http (feel pretty stupid - wasted an hour)
Dana Lewis
@danamlewis
Jan 17 2016 22:03
@logichammer If it needs less than a zero temp, it'll keep reissuing another zero temp. That way if it loses connectivity, you've got the zero temp as long as it can set it. Rare that it'll let a temp run 30 min without readjusting. Usually only see that if I go out of range.
Matt Pressnall
@logichammer
Jan 17 2016 22:03
Awesome!!!! Just what I was hoping to hear!
And max_iob from profile.json is pulled from what value on the pump?
Dana Lewis
@danamlewis
Jan 17 2016 22:06
Maxiob you have to set. See above discussion from an hour or so ago. Default is zero for safety (aka threshold suspend mode, but won't high temp you above 0 iob)
*its not on the pump, it's a file you have to build and set yourself.
Matt Pressnall
@logichammer
Jan 17 2016 22:06
that's right...looking at it right now! Thanks, @danamlewis !
Dana Lewis
@danamlewis
Jan 17 2016 22:07
:+1:
Matt Pressnall
@logichammer
Jan 17 2016 22:08
I am seriously so happy with how it went last night...thanks so much to everyone here!
JaysonEwer
@JaysonEwer
Jan 17 2016 22:08
@logichammer Where do you find that array info, if you don't mind me asking?
Matt Pressnall
@logichammer
Jan 17 2016 22:09
that was my suggested.json file from the enact dir
my log file has everything serialized so I can grab it and unserialize it when I need to look at it if that makes sense
damn, I just saw that @scottleibrand already answered my 0 temp basal question and I see the max_basal questions above...need to catch up next time before shotgunning questions. I know this is standard around here but look at this. Seriously! Look at this!
This message was deleted
This message was deleted
Dragan Maksimovic
@dm61
Jan 17 2016 22:14
@logichammer awesome!!
JaysonEwer
@JaysonEwer
Jan 17 2016 22:14
@logichammer FANTASTIC!!
Dana Lewis
@danamlewis
Jan 17 2016 22:14
:)
Matt Pressnall
@logichammer
Jan 17 2016 22:14
Thanks! You guys rule!
Dana Lewis
@danamlewis
Jan 17 2016 22:15
(And if you think you feel good, it feels even better as a PWD waking up with that good of a BG all night. Just so you know. It's totally worth it :))
JaysonEwer
@JaysonEwer
Jan 17 2016 22:15
@logichammer Nice catch on the https! :-) I'm jumping into the ns-upload stuff now.
Matt Pressnall
@logichammer
Jan 17 2016 22:15
This fills me with hope and satisfaction...I want to help other folks get here! Documenation!
Dana Lewis
@danamlewis
Jan 17 2016 22:15
:+1:
JaysonEwer
@JaysonEwer
Jan 17 2016 22:16
@danamlewis AMEN!!This is going to CHANGE EVERYTHING!!
Dana Lewis
@danamlewis
Jan 17 2016 22:16
:) @JaysonEwer
Matt Pressnall
@logichammer
Jan 17 2016 22:16
Jayson, you have your NS set up to take basal profiles and it is a fairly recent build?
JaysonEwer
@JaysonEwer
Jan 17 2016 22:16
@logichammer I have NS 0.8.4, but not on dev yet
i'm going to setup a 2nd site with the dev build soon, would love any top-of-mind lessons learned from you.
Matt Pressnall
@logichammer
Jan 17 2016 22:18
You are set with .8.4 for displaying basal info...I think the dev branch gets you IOB, though, yes?
Rachel Sandlain
@audiefile
Jan 17 2016 22:18
iob is on 8.4, you have to enable it
dev has the openaps plugin pill box
Matt Pressnall
@logichammer
Jan 17 2016 22:19
Once I had those commands I passed your way, it was actually pretty easy. That and getting the order of operations correct
Ahhh...thanks, @audiefile ...I am on .8.3 so I at least want to see IOB so I need to upgrade, too
set basal, pull pump history again, and then the three NS upload commands
Rachel Sandlain
@audiefile
Jan 17 2016 22:20
iob you have to enable and is available without updating (although you certainly can) but note it does not yet take temp basals into account the same way openaps iob does
Matt Pressnall
@logichammer
Jan 17 2016 22:21
@audiefile , can I get the openaps iob off of .8.4 master?
Because I will update for that for sure
Dana Lewis
@danamlewis
Jan 17 2016 22:22
Not yet. On the list for lots of people though
Rachel Sandlain
@audiefile
Jan 17 2016 22:22
openaps iob is not yet in nightscout, on any branch/version as far as i know
you can get 'old fashioned' iob - just boluses for a while
Dana Lewis
@danamlewis
Jan 17 2016 22:22
(We have to rework how Ns calculates iob to take into account temps, which openAPS does.)
Rachel Sandlain
@audiefile
Jan 17 2016 22:23
but you have to enable it, and it depends on accurate care portal entries (now much easier since you can automate treatment upload)
Matt Pressnall
@logichammer
Jan 17 2016 22:24
Gotcha, @JaysonEwer , you know where / how to enable these settings?
Rachel Sandlain
@audiefile
Jan 17 2016 22:24
if you want to set up bolus only iob, step by step directions here: http://www.nightscout.info/wiki/welcome/website-features/funnel-cake-0-8-features#iob
JaysonEwer
@JaysonEwer
Jan 17 2016 22:24
@logichammer, looking now.
Matt Pressnall
@logichammer
Jan 17 2016 22:25
@audiefile , just hooked you up...folks have have made it pretty easy
Rachel Sandlain
@audiefile
Jan 17 2016 22:26
the docs on nightscout.info are excellent! lots of hard work has been put in
Matt Pressnall
@logichammer
Jan 17 2016 22:27
Thanks, @danamlewis...I might have to do what you are doing, @JaysonEwer and run a second site with the dev branch because having IOB show would be awesome.
JaysonEwer
@JaysonEwer
Jan 17 2016 22:27
@logichammer I think I may have enabled those the other day when I enabled the care portal that i've been using for a week or so. I'll log back in there and see if I can get the ns-upload running.
Dana Lewis
@danamlewis
Jan 17 2016 22:27
:+1: For Ns documentation being excellent!
Rachel Sandlain
@audiefile
Jan 17 2016 22:28
:smile:
Matt Pressnall
@logichammer
Jan 17 2016 22:28
So I am getting alerts on my Pebble right now for any basal changes, Dana or anyone else using Pebbles, do you have any way being able to easily see if there is a temp basal running via the pebble (like a watchface or anything crazy). Guessing it all has be be megacustom
Alerts via Push notifications
Rachel Sandlain
@audiefile
Jan 17 2016 22:28
THere is a great one being developed! let me track down a link
Matt Pressnall
@logichammer
Jan 17 2016 22:29
Seriously?! Damn! I was just thinking there would be no way
wow
Dana Lewis
@danamlewis
Jan 17 2016 22:29
:) indeed there is. Pebble.json for the one Scott and I use, or @mddub Has an awesome one with graph visual that @audiefile Is referring to
Matt Pressnall
@logichammer
Jan 17 2016 22:29
this community rules
hell, yes! It's christmas over here
Dana Lewis
@danamlewis
Jan 17 2016 22:29
L
Rachel Sandlain
@audiefile
Jan 17 2016 22:29
I use the active basal setting.
It will display the normally scheduled rate or the temp rate if you have one running and being sent as a treatment to nightscout
normal schedule as per your nightscout treatment profile
Matt Pressnall
@logichammer
Jan 17 2016 22:30
This is incredible! Thanks so much...the Venn diagram of people that would be into this stuff is so small...glad I am in the right group here
thanks audie!
Rachel Sandlain
@audiefile
Jan 17 2016 22:31
note no bg alarms as yet.
Matt Pressnall
@logichammer
Jan 17 2016 22:31
Heck, I can toggle back and forth if needed...so cool
Rachel Sandlain
@audiefile
Jan 17 2016 22:32
but you could use xdrip/nightwatch or even setup pushover for alarms
Matt Pressnall
@logichammer
Jan 17 2016 22:32
true! So many ways to hack that part...I got boogie but thanks so much folks!
Rachel Sandlain
@audiefile
Jan 17 2016 22:32
or IFFFT
Scott Leibrand
@scottleibrand
Jan 17 2016 22:33
To use pebble.json you'll want the Cards for Pebble app.
Matt Pressnall
@logichammer
Jan 17 2016 22:33
My things todo.txt file just keeps getting bigger
I remember you talking about that at the meetup, Scott
Rachel Sandlain
@audiefile
Jan 17 2016 22:34
cards for pebble is nice because it has the 'reason' field
I use the urchin watchface but have a short cut for cards for pebble so I can see why the rate is what it is without going to a browser/ssh
Toby Canning
@TC2013
Jan 17 2016 22:35
@bewest Thanks for confirming that it works on Wheezy. I'm running ubilinix/Jessie on Edison and that update didn't work. I'm going to try the default install of Ubilinix.
Matt Pressnall
@logichammer
Jan 17 2016 22:35
Looking forward to getting int that
Ben West
@bewest
Jan 17 2016 22:36
I think it will work on jessie just fine
my suspicion is that the issue is ./configure --enable-experimental
I think you need that --enable-experimental flag in the configure step
Toby Canning
@TC2013
Jan 17 2016 22:37
I did... I even recompiled again to make sure
Ben West
@bewest
Jan 17 2016 22:37
oh
yeah, you have to make again after recompiling
and make install again
I also inserted this in /etc/dbus-1/system.d/bluetooth.conf
I also needed to run sudo bluetoothd -E & somewhere for manual testing
errr, also...
bluetoothd is not installed by the makefile
so I had to sudo cp ./src/bluetoothd /usr/local/sbin/bin (which is in my PATH already)
I tried my init script but it doesn't work quite yet
JaysonEwer
@JaysonEwer
Jan 17 2016 22:39
@scottleibrand So, i'm hearing I have some of the necessary functionality using NS 0.8.4, but not all that is in the latest dev. I think it was you that recommended setting up a second site using dev. Is there an easy way to determine what features I would pickup by setting up the dev environment?
Ben West
@bewest
Jan 17 2016 22:41
it's a bit hard to parse, generally people help prep a nicer summary when we get close to release, although there are notes in the various pull requests
Scott Leibrand
@scottleibrand
Jan 17 2016 22:42
Nightscout master is useless for openaps. All openaps related features are in dev or will be merged there soon.
So if you want basal display or OpenAPS pill, set up a dev site.
Ben West
@bewest
Jan 17 2016 22:43
nightscout master is great for monitoring loops
guess basal is not in master quite yet
Scott Leibrand
@scottleibrand
Jan 17 2016 22:44
No plans to merge it there afaik either.
Ben West
@bewest
Jan 17 2016 22:44
why not?
Scott Leibrand
@scottleibrand
Jan 17 2016 22:44
Master may become "Nightscout Classic"
Ben West
@bewest
Jan 17 2016 22:44
not sure I've heard a good reason to depart from the usual release cycle
Scott Leibrand
@scottleibrand
Jan 17 2016 22:44
support burden. Ask @jasoncalabrese et. al.
I'm not really involved in that decision.
Rachel Sandlain
@audiefile
Jan 17 2016 22:45
basal is in master but everything else isnt
Scott Leibrand
@scottleibrand
Jan 17 2016 22:45
Ah
not totally useless the.
Ben West
@bewest
Jan 17 2016 22:45
yeah, so it's great for monitoring loops
Scott Leibrand
@scottleibrand
Jan 17 2016 22:46
Just can't see the "why" from the openaps pill
Ben West
@bewest
Jan 17 2016 22:46
monitoring loop doesn't have that anyway
first step in all this should be monitoring
Scott Leibrand
@scottleibrand
Jan 17 2016 22:47
Yeah. next big thing after basal display is being able to see the oref0 reasons in retro mode. That is enabled in dev.
Rachel Sandlain
@audiefile
Jan 17 2016 22:47
not everyone who uses nightscout needs or wants all the bleeding edge stuff. not all users understand when they need to update and when they don't or that features are optional. the 'nightscout classic' and then the 'dev' version seem to better met the needs of the whole bell curve. IMO
JaysonEwer
@JaysonEwer
Jan 17 2016 22:48
Cool, having the openaps pill is worth it for me. :-) That way I can provide visual proof that I've got my loop running. :-D
I've run my loop manually a few times and i'm getting a "openaps-report invoke: error:" but not all the time.
Scott Leibrand
@scottleibrand
Jan 17 2016 22:49
@TC2013 you trying the new BLE options nowish? Wondering when I should give it another go.
@JaysonEwer when you get errors, paste the actual text (the last few lines is usually enough)
the "foo raised bar" stuff is usually what we want.
JaysonEwer
@JaysonEwer
Jan 17 2016 22:52
pi@Ewer-Open-APS:~/Documents/openaps $ openaps retry-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":164,"avgdelta":-2}
{"duration":0,"rate":120,"temp":"percent"}
{"bolusiob":0,"iob":0.03896033493999998,"activity":0.003754545454545455}
{"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":164,"tick":-1,"eventualBG":159,"snoozeBG":159,"reason":"Eventual BG 159>120, no temp, setting 2.1U/hr","duration":30,"rate":2.1}
usage: openaps-report invoke [-h]
                             {basal_profile.json,bg_targets.json,clock.json,enact/suggested.json,glucose.json,last_four_cgm_hours.json,last_four_cgms_hours.json,last_four_pump_hours.json,model.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory.json,monitor/temp_basal.json,pump-history.json,pump_settings.json,pumphistory.json,read_status.json,settings/basal_profile.json,settings/bg_targets.json,settings/insulin_sensitivities.json,settings/profile.json,settings/settings.json}
                             [{basal_profile.json,bg_targets.json,clock.json,enact/suggested.json,glucose.json,last_four_cgm_hours.json,last_four_cgms_hours.json,last_four_pump_hours.json,model.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory.json,monitor/temp_basal.json,pump-history.json,pump_settings.json,pumphistory.json,read_status.json,settings/basal_profile.json,settings/bg_targets.json,settings/insulin_sensitivities.json,settings/profile.json,settings/settings.json} ...]
openaps-report invoke: error: argument report: invalid choice: 'enact/enacted.json' (choose from u'basal_profile.json', u'bg_targets.json', u'clock.json', u'enact/suggested.json', u'glucose.json', u'last_four_cgm_hours.json', u'last_four_cgms_hours.json', u'last_four_pump_hours.json', u'model.json', u'monitor/clock.json', u'monitor/glucose.json', u'monitor/iob.json', u'monitor/pumphistory.json', u'monitor/temp_basal.json', u'pump-history.json', u'pump_settings.json', u'pumphistory.json', u'read_status.json', u'settings/basal_profile.json', u'settings/bg_targets.json', u'settings/insulin_sensitivities.json', u'settings/profile.json', u'settings/settings.json')
No action required
pi@Ewer-Open-APS:~/Documents/openaps $
Scott Leibrand
@scottleibrand
Jan 17 2016 22:52
@bewest better to start over, or should recompiling and reinstalling bluez from source be enough?
JaysonEwer
@JaysonEwer
Jan 17 2016 22:52
Sorry, that was a bit much perhaps.
opps, it didn't take all of it
Toby Canning
@TC2013
Jan 17 2016 22:52
@bewest I think I have everything, but this: sudo cp ./src/bluetoothd /usr/local/sbin/bin
JaysonEwer
@JaysonEwer
Jan 17 2016 22:52
{"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":164,"tick":-1,"eventualBG":159,"snoozeBG":159,"reason":"Eventual BG 159>120, no temp, setting 2.1U/hr","duration":30,"rate":2.1}
usage: openaps-report invoke [-h]
                             {basal_profile.json,bg_targets.json,clock.json,enact/suggested.json,glucose.json,last_four_cgm_hours.json,last_four_cgms_hours.json,last_four_pump_hours.json,model.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory.json,monitor/temp_basal.json,pump-history.json,pump_settings.json,pumphistory.json,read_status.json,settings/basal_profile.json,settings/bg_targets.json,settings/insulin_sensitivities.json,settings/profile.json,settings/settings.json}
                             [{basal_profile.json,bg_targets.json,clock.json,enact/suggested.json,glucose.json,last_four_cgm_hours.json,last_four_cgms_hours.json,last_four_pump_hours.json,model.json,monitor/clock.json,monitor/glucose.json,monitor/iob.json,monitor/pumphistory.json,monitor/temp_basal.json,pump-history.json,pump_settings.json,pumphistory.json,read_status.json,settings/basal_profile.json,settings/bg_targets.json,settings/insulin_sensitivities.json,settings/profile.json,settings/settings.json} ...]
openaps-report invoke: error: argument report: invalid choice: 'enact/enacted.json' (choose from u'basal_profile.json', u'bg_targets.json', u'clock.json', u'enact/suggested.json', u'glucose.json', u'last_four_cgm_hours.json', u'last_four_cgms_hours.json', u'last_four_pump_hours.json', u'model.json', u'monitor/clock.json', u'monitor/glucose.json', u'monitor/iob.json', u'monitor/pumphistory.json', u'monitor/temp_basal.json', u'pump-history.json', u'pump_settings.json', u'pumphistory.json', u'read_status.json', u'settings/basal_profile.json', u'settings/bg_targets.json', u'settings/insulin_sensitivities.json', u'settings/profile.json', u'settings/settings.json')
No action required
pi@Ewer-Open-APS:~/Documents/openaps $
Toby Canning
@TC2013
Jan 17 2016 22:53
I ran a locate on bluetoothd and it is in several folders... Also, how do I know which path to copy it to?
Scott Leibrand
@scottleibrand
Jan 17 2016 22:53
@JaysonEwer you haven't set up your enact alias yet?
JaysonEwer
@JaysonEwer
Jan 17 2016 22:53
@scottleibrand I thought I had, let me double check that.
Scott Leibrand
@scottleibrand
Jan 17 2016 22:54
Or maybe it's the enact report.
That one is left as an exercise for the reader in the docs.
JaysonEwer
@JaysonEwer
Jan 17 2016 22:54
ah, perhaps that's the problem.
Here are my aliases:
pi@Ewer-Open-APS:~/Documents/openaps $ openaps alias show
last_four_hours report invoke last_four_pump_hours.json last_four_cgms_hours.json
gather-profile report invoke settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json settings/profile.json
monitor-pump report invoke monitor/clock.json monitor/temp_basal.json monitor/pumphistory.json monitor/iob.json
monitor-cgm report invoke monitor/glucose.json
gather ! bash -c "rm monitor/*; openaps monitor-cgm && openaps monitor-pump && openaps gather-profile"
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"
preflight ! bash -c "rm -f model.json && openaps report invoke model.json && test -n $(json -f model.json) && echo \"PREFLIGHT OK\" || ( mm-stick warmup fail \"NO PUMP MODEL RESPONDED\" || mm-stick fail \"NO MEDTRONIC CARELINK STICK AVAILABLE\")"
loop ! bash -c "openaps monitor-cgm 2>/dev/null && ( openaps preflight && openaps gather && openaps enact) || echo No CGM data."
retry-loop ! bash -c "until( ! mm-stick warmup || openaps loop); do sleep 5; done"
pi@Ewer-Open-APS:~/Documents/openaps $
Scott Leibrand
@scottleibrand
Jan 17 2016 22:55
Designed to thwart people from blind copypasta
JaysonEwer
@JaysonEwer
Jan 17 2016 22:55
:-D
Scott Leibrand
@scottleibrand
Jan 17 2016 22:55
Check your reports for enacted.json
JaysonEwer
@JaysonEwer
Jan 17 2016 22:55
checking...
Ben West
@bewest
Jan 17 2016 23:02
yeah, reconfiguring, recompiling, re-install should be fine
JaysonEwer
@JaysonEwer
Jan 17 2016 23:02
@scottleibrand It's there.
pi@Ewer-Open-APS:~/Documents/openaps $ openaps report invoke enact/suggested.json
determine-basal://text/shell/enact/suggested.json
{"delta":-1,"glucose":159,"avgdelta":-1.6666666666666665}
{"duration":0,"rate":120,"temp":"percent"}
{"bolusiob":0,"iob":0.018389416335000065,"activity":0.0033722222222222226}
{"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
pi@Ewer-Open-APS:~/Documents/openaps $
Ben West
@bewest
Jan 17 2016 23:03
I copy it to /usr/local/sbin/
Scott Leibrand
@scottleibrand
Jan 17 2016 23:03
that's not enact.json
that's suggested.json
JaysonEwer
@JaysonEwer
Jan 17 2016 23:03
ah
Scott Leibrand
@scottleibrand
Jan 17 2016 23:03
it generates suggestions, but doesn't enact them
Ben West
@bewest
Jan 17 2016 23:03
@TC2013 on my machine:
pi@raspberrypi ~/Downloads/bluez-5.37 $ ls src/bluetoothd
src/bluetoothd
JaysonEwer
@JaysonEwer
Jan 17 2016 23:03
gotit, let me check that piece, thanks
Ben West
@bewest
Jan 17 2016 23:04
that cp command earlier, sudo cp ./src/bluetoothd /usr/local/sbin/ puts it in the /usr/local/sbin subdir
Aaron Michelson
@Aaybob
Jan 17 2016 23:06
pi@raspberrypi:~/pancreas $ git push origin master
Username for 'https://github.com': Aaybob
Password for 'https://Aaybob@github.com':
To https://github.com/Aaybob/First-commit.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/Aaybob/First-commit.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Any suggestions?
Toby Canning
@TC2013
Jan 17 2016 23:12
when I perform locate bluetoothd It shows several locations for it:
/usr/lib/bluetooth/bluetoothd
/usr/local/bin/bluetoothd
/usr/local/libexec/bluetooth/bluetoothd
/usr/local/share/man/man8/bluetoothd.8
/usr/sbin/bluetoothd
Scott Leibrand
@scottleibrand
Jan 17 2016 23:13
@Aaybob: you pasted your answer: You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again.
Toby Canning
@TC2013
Jan 17 2016 23:13
Will any of those do?
Trying now ;)
JaysonEwer
@JaysonEwer
Jan 17 2016 23:14
@scottleibrand When I issued the loop alias this time it did not error out on me and I've seen it run cleanly before as well. Do I need to manually generate the enact/enact.json report, or will it automatically be generated based on the other data?
determine-basal://text/shell/enact/suggested.json
{"delta":-2,"glucose":154,"avgdelta":-1.6666666666666665}
{"duration":0,"rate":120,"temp":"percent"}
{"bolusiob":0,"iob":0.004514622639999999,"activity":0.0029515151515151525}
{"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":154,"tick":-2,"eventualBG":151,"snoozeBG":151,"reason":"Eventual BG 151>90 but Delta -2 < Exp. Delta -1.7; no temp to cancel"}
No action required
pi@Ewer-Open-APS:~/Documents/openaps $
Scott Leibrand
@scottleibrand
Jan 17 2016 23:15
to test it, you need it to recommend an action
set a slightly high or low temp (manually) and make it cancel it
Toby Canning
@TC2013
Jan 17 2016 23:15
Its gotta be close!
Ben West
@bewest
Jan 17 2016 23:15
oh
hmmm
JaysonEwer
@JaysonEwer
Jan 17 2016 23:16
@scottleibrand Ok, testing that now.
Toby Canning
@TC2013
Jan 17 2016 23:16
I just picked one of the bluethoothd files and tried (sudo cp /usr/sbin/bluetoothd /usr/local/sbin/)
I will try other that are on the system
Ben West
@bewest
Jan 17 2016 23:17
maybe
use this one
/usr/local/bin/bluetoothd
err
dangi
Ben West
@bewest
Jan 17 2016 23:17
/usr/local/libexec/bluetooth/bluetoothd
Scott Leibrand
@scottleibrand
Jan 17 2016 23:17
just do that, with the experimental flag on configure?
Toby Canning
@TC2013
Jan 17 2016 23:17
okay!
Ben West
@bewest
Jan 17 2016 23:18
yeah, should work
scottleibrand @scottleibrand is trying that now
Ben West
@bewest
Jan 17 2016 23:18
apparently the makefile does install the binary at /usr/local/libexec/bluetooth/bluetoothd
the cp command manually installs it at /usr/local/sbin/bluetoothd by hand
on jessie, I believe you are using systemd
which is a recent change
so I think the configure command will be ./configure --enable-experimental
Scott Leibrand
@scottleibrand
Jan 17 2016 23:20
  File "/home/pi/src/openxshareble/openxshareble/app.py", line 79, in prolog
    self.remote.connect()  # Will time out after 60 seconds, specify timeout_sec parameter
  File "/home/pi/src/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
Ben West
@bewest
Jan 17 2016 23:20
that means bluetoothd is not running
Scott Leibrand
@scottleibrand
Jan 17 2016 23:21
k. maybe I need --disable-systemd as well as --enable-experimental?
scottleibrand @scottleibrand tries starting it by hand
Ben West
@bewest
Jan 17 2016 23:21
hmm?
I think for jessie
JaysonEwer
@JaysonEwer
Jan 17 2016 23:21

@scottleibrand It saw my temp basal that I set on the pump.

determine-basal://text/shell/enact/suggested.json
{"delta":-2,"glucose":152,"avgdelta":-1.6666666666666665}
{"duration":30,"rate":120,"temp":"percent"}
{"bolusiob":0,"iob":0.0013402330150000807,"activity":0.0027681818181818176}
{"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":152,"tick":-2,"eventualBG":149,"snoozeBG":149,"reason":"Eventual BG 149>90 but Delta -2 < Exp. Delta -1.6; cancel","duration":0,"rate":0}

But then also gave me the invoke error again.

openaps-report invoke: error: argument report: invalid choice: 'enact/enacted.json'

I see it plane as day there where if errored, but I"m not sure what i'm missing.

Scott Leibrand
@scottleibrand
Jan 17 2016 23:22
@JaysonEwer you still haven't configured an enact/enacted.json report
you may have named it something else
like just enacted.json?
Ben West
@bewest
Jan 17 2016 23:22
you should do: ./configure --enable-experimental; make -j 4; sudo make install ; sudo ./src/bluetoothd -E & to get an environment where you can test ble
on jessie, it's using systemd
Scott Leibrand
@scottleibrand
Jan 17 2016 23:22
what does -j 4 do ?
Ben West
@bewest
Jan 17 2016 23:22
-j 4 uses 4 cpus to compile at the same time
should speed things a bit
Scott Leibrand
@scottleibrand
Jan 17 2016 23:23
D-Bus setup failed: Name already in use
Ben West
@bewest
Jan 17 2016 23:23
that means bluetoothd is already running somewhere
Scott Leibrand
@scottleibrand
Jan 17 2016 23:23
I have it in rc.local per the docs
Ben West
@bewest
Jan 17 2016 23:23
we'll have to stop/kill the one that's already running
Toby Canning
@TC2013
Jan 17 2016 23:23
Yes, I added /usr/local/sbin/bluetoothd --experimental & to there
Scott Leibrand
@scottleibrand
Jan 17 2016 23:23
k
dbus.exceptions.DBusException: org.bluez.Error.NotReady: Resource Not Ready
Ben West
@bewest
Jan 17 2016 23:25
that's good
sudo hciconfig hci0 up
I also added this http://dpaste.com/2AJ48CT
Toby Canning
@TC2013
Jan 17 2016 23:26
Yes, that fixed permissions!
Ben West
@bewest
Jan 17 2016 23:26
to this file: /etc/dbus-1/system.d/bluetooth.conf
Scott Leibrand
@scottleibrand
Jan 17 2016 23:26
RuntimeError: ('Exceeded timeout waiting to Pair with device! %s', DBusException(dbus.String(u'Authentication Canceled'),))
Ben West
@bewest
Jan 17 2016 23:27
that's good
try it again
Scott Leibrand
@scottleibrand
Jan 17 2016 23:27
already updated bluetooth.conf
Ben West
@bewest
Jan 17 2016 23:27
your share.ini has your serial = SM12345678?
Toby Canning
@TC2013
Jan 17 2016 23:27
yes
I know, meant for S
Scott Leibrand
@scottleibrand
Jan 17 2016 23:28
DEXCOM <openxshareble.ble.readdata.Device object at 0x75d6ae10>
[
  {
    "trend_arrow": "FLAT",
    "system_time": "2016-01-17T22:24:30",
    "display_time": "2016-01-17T15:24:29",
    "glucose": 107
  },
yay!
Ben West
@bewest
Jan 17 2016 23:28
there we go :-)
Toby Canning
@TC2013
Jan 17 2016 23:28
Wow!
Scott Leibrand
@scottleibrand
Jan 17 2016 23:28
it was that stupid experimental flag on configure. :)
that's the only thing I changed
Ben West
@bewest
Jan 17 2016 23:28
yup
Scott Leibrand
@scottleibrand
Jan 17 2016 23:28
unless it was bluetooth.conf, but I don't think so
Toby Canning
@TC2013
Jan 17 2016 23:28
You added it, or left it off this time?
Ben West
@bewest
Jan 17 2016 23:28
it's required
--disable-systemd is required for less/older than jessie
--enable-experimental is required in all cases
Scott Leibrand
@scottleibrand
Jan 17 2016 23:29
I did https://github.com/adafruit/Adafruit_Python_BluefruitLE#linux--raspberry-pi-requirements with --enable-experimental (left off --disable-systemd)
I doubt the bluetooth.conf changes mattered in my case
it wasn't complaining about permissions for me
Ben West
@bewest
Jan 17 2016 23:29
the big new thing in jessie is a big switch in how processes get started, the "init" system
it's so big it affects everything, including logging and many other things
that's one reason devs like me haven't switched yet... there's not much on stackexchange/github yet because it's basically the "new" default
might be worth using the meta package to switch back to older style
Toby Canning
@TC2013
Jan 17 2016 23:31
To uninstall this bluez configuration, can I just delete the directory and re-run with the updated instructions?
Ben West
@bewest
Jan 17 2016 23:32
no
use use /usr/local/libexec/bluetooth/bluetoothd
so, sudo /usr/local/libexec/bluetooth/bluetoothd -E &
you can run it by hand to test
updated with our experimental flag
bewest/Adafruit_Python_BluefruitLE#2
Ben West
@bewest
Jan 17 2016 23:34
did you add the sudo cp?
take that out, I think
Scott Leibrand
@scottleibrand
Jan 17 2016 23:34
it's already there
Ben West
@bewest
Jan 17 2016 23:34
ah ok
it is installed, just in a weird place not in most people's PATH
thanks systemd
Scott Leibrand
@scottleibrand
Jan 17 2016 23:34
I did exactly what is now documented (in that PR) and it works
Ben West
@bewest
Jan 17 2016 23:35
yeah it's fine, that puts it somewhere on your path
I think almost any >= 5.19 version will work
I'm using 5.37 now
have used 4 or 5 versions now, they all seem fine
Jason Calabrese
@jasoncalabrese
Jan 17 2016 23:48
@audiefile, at some point I'd like to get everything in dev to master, but getting that done takes a lot of time, so I'm not going to be able to do it till I get a few other things done first. If someone else would like to take on being the release manager I'll try to help out
also wondering about 1 new branch that would be somewhere in between dev and master
Ben West
@bewest
Jan 17 2016 23:52
yeah, stage things somehow
we have lot of work that is done, so we can pick things for release now
Jason Calabrese
@jasoncalabrese
Jan 17 2016 23:53
feels like we're building something new, but using an old name
JaysonEwer
@JaysonEwer
Jan 17 2016 23:53
What is the best way to determine what version of oref I'm running?
Toby Canning
@TC2013
Jan 17 2016 23:54
go into that directory and type git status
I think ;)
Let me know if that works
Rachel Sandlain
@audiefile
Jan 17 2016 23:56
I personally like the idea of a branch in between master and dev. More stable/veted than dev, with the edge case features like openaps plugin. Allows master to stay more middle of the road for the average ns user.
JaysonEwer
@JaysonEwer
Jan 17 2016 23:56
@TC2013 That didn't exactly work. :-)
Toby Canning
@TC2013
Jan 17 2016 23:58
Mine shows this
edison@Edison2:~/src/oref0$ git status
On branch dev
Your branch is up-to-date with 'origin/dev'.
nothing to commit, working directory clean