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

27th
Sep 2015
this is the code that generates the python dict objects, which then get converted to json
so openaps could have another use that reformats things, or decocare could format things differently
decocare tried to match the carelink csv output names mostly
eugh, typo in the comment.
Ben West
@bewest
Sep 27 2015 00:06
me likey
I would put the curl stuff in it's own script
Chris Oattes
@cjo20
Sep 27 2015 00:06
that could be a seperate PR
Ben West
@bewest
Sep 27 2015 00:34
@scottleibrand did you perhaps commit to master by accident?
Scott Leibrand
@scottleibrand
Sep 27 2015 00:35
I did have to hot fix one bug. What's the conflict?
Ben West
@bewest
Sep 27 2015 00:45
ok, maybe it'll merge back into dev
have to keep branches up to date or you introduce conflicts
ah, conflict is in loop.sh
Scott Leibrand
@scottleibrand
Sep 27 2015 00:46
Pretty sure I made the same change in both places but they merge conflicted cause they looked different.
(They had diverged in that part of the code)
Ben West
@bewest
Sep 27 2015 00:49
git doesn't work that way, I accepted all changes from master into dev
actually, I accepted master's version
without any changes from dev
oy
Ben West
@bewest
Sep 27 2015 00:58
@cjo20 hopefully you're asleep, but here's my take: openaps/openaps-js#33
Chris Oattes
@cjo20
Sep 27 2015 01:00
no, I'm not, but I should be :P
looks reasonable. Need to find a way of stopping it uploading the same data over and over when there is an overlap
Ben West
@bewest
Sep 27 2015 01:09
the api should prevent duplicates
Chris Oattes
@cjo20
Sep 27 2015 01:21
oh, cool
John Males
@johnmales
Sep 27 2015 01:53
Git is doing my head in. So if I want to try out openaps/openaps-js#33, is it best do do a git clone --branch "wip/bewest/separate-concerns" https://github.com/openaps/openaps-js.git?
Chris Oattes
@cjo20
Sep 27 2015 01:59
do you already have a copy of the openaps-js repo on your machine?
John Males
@johnmales
Sep 27 2015 01:59
Yes
Chris Oattes
@cjo20
Sep 27 2015 02:02
you might just be able to do git checkout wip/bewest/seperate-concerns
John Males
@johnmales
Sep 27 2015 02:04
i see will try that
John Males
@johnmales
Sep 27 2015 02:17
If you are still awake :)
pi@raspberrypi ~/openaps-js $ git fetch
remote: Counting objects: 320, done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 320 (delta 170), reused 143 (delta 143), pack-reused 132
Receiving objects: 100% (320/320), 60.65 KiB | 34 KiB/s, done.
Resolving deltas: 100% (218/218), completed with 13 local objects.
From https://github.com/openaps/openaps-js
   e3186c7..b1fb5b7  master     -> origin/master
 * [new branch]      dev        -> origin/dev
   801257b..6e8be31  new-loop   -> origin/new-loop
 * [new branch]      wip/bewest/separate-concerns -> origin/wip/bewest/separate-concerns
pi@raspberrypi ~/openaps-js $ git checkout "wip/bewest/seperate-concerns"
error: pathspec 'wip/bewest/seperate-concerns' did not match any file(s) known to git.
pi@raspberrypi ~/openaps-js $ git checkout wip/bewest/seperate-concerns
error: pathspec 'wip/bewest/seperate-concerns' did not match any file(s) known to git.
Ben West
@bewest
Sep 27 2015 02:52
no quotes are needed
git checkout wip/bewest/separate-concerns
also mind the typo ;-)
you can probably do git checkout wip/bewest[tab tab]
eg press the tab key
@scottleibrand just stubbed out a little tool to conserve some typing
Chris Oattes
@cjo20
Sep 27 2015 02:56

trying to get this working before Igo to bed; I've got a script that runs :

date 2>&1 >> /home/pi/log.txt
cd /home/pi/cjoAPS
openaps report invoke last_hour_glucose.json 2>&1 >> /home/pi/log.txt
/home/pi/dev/openaps-js/bin/ns-upload-glucose.sh last_hour_glucose.json 2>&1 >> /home/pi/log.txt

When I run it from the command line, it runs ok, from crontab it seems to skip the openaps command. Any idea why?

Scott Leibrand
@scottleibrand
Sep 27 2015 02:56
@bewest at a wedding today, but thanks: will look later
Ben West
@bewest
Sep 27 2015 02:58
nice
tldr: register diyps tool once, openaps use diyps shell foo === diyps-foo === diyps foo
Chris Oattes
@cjo20
Sep 27 2015 03:05
I cna't get openaps to run in cron :/

*/5 * * * * (cd /home/pi/cjoAPS/ && ./run_upload.sh)

run_upload.sh:

date 2>&1 >> /home/pi/log.txt
openaps report invoke last_hour_glucose.json 2>&1 >> /home/pi/log.txt
/home/pi/dev/openaps-js/bin/ns-upload-glucose.sh last_hour_glucose.json 2>&1 >> /home/pi/log.txt

works fine manually invoking it from the command line, no output appears from the openaps line when cron runs it

the date and ns-upload-glucose.sh output appears in the log.txt when cron runs it
Ben West
@bewest
Sep 27 2015 03:14
set PATH
cron is a weird environment
stuff from cron runs with blank environment
so basically nothing in PATH
Chris Oattes
@cjo20
Sep 27 2015 03:16
yeah, was just adding it as you said that :P
that looks like it might be better
Chris Oattes
@cjo20
Sep 27 2015 03:26
seems like it works https://nsportal.azurewebsites.net/ got my pi set up by my bed, reading CGM data from the pump I'm not connected to
sleeptime, night
Scott Leibrand
@scottleibrand
Sep 27 2015 03:32
Is it controlling that pump too?
Jason Calabrese
@jasoncalabrese
Sep 27 2015 03:42
2015-09-26 20.27.41-1.jpg
just needed to change to absolute
John Males
@johnmales
Sep 27 2015 03:44
@bewest your git checkout worked, of course - thanks to you and @cjo20
Jason Calabrese
@jasoncalabrese
Sep 27 2015 03:55
can you get a current version of node on the pi?
Ben West
@bewest
Sep 27 2015 03:55
yeah
easy peasy
I discovered the ironically named nodejs-legacy package does the right thing
there's several that are similar
Sulka Haro
@sulkaharo
Sep 27 2015 05:15
I should put more time into OpenAPS too. I think I might have had % based temp basal on the last time I tried. Is there a better document to work with the Pi implementation now?
And by better I mean more comprehensive
Dana Lewis
@danamlewis
Sep 27 2015 05:16
Much much better. Take a look at openAPS/docs or the associated gitbook @sulkaharo
Sulka Haro
@sulkaharo
Sep 27 2015 05:27
Yay. I'll give it a whirl. We don't have a super old pump (people seem to give their old stuff back to the endos given the model where the gov pays for the equipment) but last I tried at least the button commands worked on our older pump. :)
How much does an old pump go for these days in US? :)
Dana Lewis
@danamlewis
Sep 27 2015 05:28
250ish last time I heard some one buy one, if you can't talk someone into sharing their old one
Sulka Haro
@sulkaharo
Sep 27 2015 05:28
Oh and one last question - anyone using the setup with an Enlite? Does the current implementation pull the CGM data from Nightscout so I can use any CGM?
Ben West
@bewest
Sep 27 2015 05:28
few hundred
decocare can pull cgm from enlite
@cjo20 has his pulling cgm from medtronic, and posting cgm data to NS
mine pulls cgm data from NS
dana's pulls cgm data from dexcom share
Sulka Haro
@sulkaharo
Sep 27 2015 05:29
The current Enlite is pretty crap but we got told the newer implementation where they improved the under-the-skin portion is coming to Veo as well.
Ben West
@bewest
Sep 27 2015 05:29
nice
Scott Leibrand
@scottleibrand
Sep 27 2015 05:30
Or from USB-attached Dexcom if present.
Ben West
@bewest
Sep 27 2015 05:30
I'd be more interested in getting a nice 554
from europe
with temp basal support
Scott Leibrand
@scottleibrand
Sep 27 2015 05:30
We only use Share if there's no Dex plugged in.
Sulka Haro
@sulkaharo
Sep 27 2015 05:30
Don't have experience on the new Enlite, but the nurse we talked to says in their experience is way more reliable than the old version.
They were also a bit confused about us saying we don't want a 640G. :)
"But it's better!" "Yah, doesn't do Nighscout."
Sulka Haro
@sulkaharo
Sep 27 2015 05:36
@bewest does someone have 554 working? The pumps we have are 554s, one with firmware version 2.6A, one with 2.8B
@danamlewis the docs loom much amazinger than last I looked. time to experiment :)
Ben West
@bewest
Sep 27 2015 05:39
I've bolused a 554, yes
it was european, I have no idea what the version string was
Dana Lewis
@danamlewis
Sep 27 2015 05:39
@sulkaharo Excellent. Always a work in progress, but @channemann & others have been hard at work and this latests series seem to be helping the newest round of people starting, and will look forward to your feedback as well.
Sulka Haro
@sulkaharo
Sep 27 2015 05:48
:thumbsup:
Jason Calabrese
@jasoncalabrese
Sep 27 2015 06:09
[device "ns-glucose"]
fields =
cmd = bash -c
vendor = openaps.vendors.process
args = 'curl -s "http://ns-dev2.cbrese.com/api/v1/entries.json?type=sgv&count=2" | json -e "this.glucose = this.sgv" '
pi@raspberrypi ~/my-openaps $ openaps use ns-glucose shell
"[\n  {\n    \"_id\": \"56078784e46f07d74705ba8c\",\n    \"unfiltered\": 126352,\n    \"filtered\": 122864,\n    \"direction\": \"Flat\",\n    \"device\": \"dexcom\",\n    \"rssi\": 188,\n    \"sgv\": 114,\n    \"dateString\": \"Sat Sep 26 23:05:23 PDT 2015\",\n    \"type\": \"sgv\",\n    \"date\": 1443333923000,\n    \"noise\": 1,\n    \"glucose\": 114\n  },\n  {\n    \"_id\": \"5607865be46f07d74705ba8b\",\n    \"unfiltered\": 122816,\n    \"filtered\": 126208,\n    \"direction\": \"Flat\",\n    \"device\": \"dexcom\",\n    \"rssi\": 188,\n    \"sgv\": 109,\n    \"dateString\": \"Sat Sep 26 23:00:23 PDT 2015\",\n    \"type\": \"sgv\",\n    \"date\": 1443333623000,\n    \"noise\": 1,\n    \"glucose\": 109\n  }\n]\n"
not sure where that extra escaping is coming from
Ben West
@bewest
Sep 27 2015 06:10
ah
openaps use --format text
openaps toolkit is written in python
so by default doing "text" output for raw python objects gets you the repr type stuff
which is close to json, but not quite strict json
Jason Calabrese
@jasoncalabrese
Sep 27 2015 06:11
nice
pi@raspberrypi ~/my-openaps $ openaps use --format text ns-glucose shell
[
  {
    "_id": "56078785cf0f117c65699633",
    "unfiltered": 126352,
    "filtered": 122864,
    "direction": "Flat",
    "device": "dexcom",
    "rssi": 188,
    "sgv": 114,
    "dateString": "Sat Sep 26 23:05:23 PDT 2015",
    "type": "sgv",
    "date": 1443333923000,
    "noise": 1,
    "glucose": 114
  },
  {
    "_id": "5607865ccf0f117c65699632",
    "unfiltered": 122816,
    "filtered": 126208,
    "direction": "Flat",
    "device": "dexcom",
    "rssi": 188,
    "sgv": 109,
    "dateString": "Sat Sep 26 23:00:23 PDT 2015",
    "type": "sgv",
    "date": 1443333623000,
    "noise": 1,
    "glucose": 109
  }
]
Ben West
@bewest
Sep 27 2015 06:11
so default is JSON output
external tools which use json by default should use the text format :-)
nice
John Males
@johnmales
Sep 27 2015 06:33
@bewest in your shell script could you explain what this is doing? Sorry for the basic questions.
ENTRIES=${1-entries.json}
NIGHTSCOUT_HOST=${NIGHTSCOUT_HOST-localhost:1337}
Scott Leibrand
@scottleibrand
Sep 27 2015 06:35
Those are defaults. $1 is the first command line argument, $NIGHTSCOUT_HOST is an env variable
John Males
@johnmales
Sep 27 2015 06:36
So you can specify your own filename for ENTRIES, otherwise entries.json is the default?
Let me rephrase that - the first command line argument will be taken as the value for ENTRIES, otherwise it defaults to entries.json
Jason Calabrese
@jasoncalabrese
Sep 27 2015 06:40
trying to add a report to get the ns data $ openaps report add glucose.json.new text ns-glucose shell
gives the error AttributeError: 'Namespace' object has no attribute ''
Ben West
@bewest
Sep 27 2015 06:48
@johnmales that's a bashism
the first one says "assign argv 1 to ENTRIES with a default of entries.json if it's undefined
the second one says "assign NIGHTSCOUT_HOST to value of NIGHTSCOUT_HOST, if it's not yet defined, use localhost:1337 as the default
and it's no problem, I'm happy to elaborate
Jason Calabrese
@jasoncalabrese
Sep 27 2015 06:57
any ideas why I can't add that report?
guess the .new is getting added in loop.sh
John Males
@johnmales
Sep 27 2015 07:07
This is an education if nothing else - json, shell scripts, git, python - thanks @bewest :)
Also is the correct format of NIGHTSCOUT_HOST like this:
NIGHTSCOUT_HOST=foo.azurewebsites.net - with no https:// etc?
Ben West
@bewest
Sep 27 2015 07:25
with https
it uses curl under the hood
it won't follow the redirect azure will give, so you need https://
John Males
@johnmales
Sep 27 2015 07:56
Should this generate the correct hashed secret?
cat "<secret-key>" | sha1sum
Ben West
@bewest
Sep 27 2015 08:07
almost
echo -n "<secret>" | sha1sum should do it
cgm-remote-monitor prints the hashed key after starting
John Males
@johnmales
Sep 27 2015 08:30
if cgm-remote-monitor is running on azure how would I see that? I'm beginning to think it would be easier to have this running locally on a linux box or vm
Chris Oattes
@cjo20
Sep 27 2015 11:59
@scottleibrand no, it was just reporting CGM values to NS
Chris Oattes
@cjo20
Sep 27 2015 12:08
@sulkaharo I can suspend basal on my 554 v2.6A, I can't on my 554 v3.1E
I know it isn't bolusing, but that might give you an idea of what you'd be able to bolus with

Chris Oattes
@cjo20
Sep 27 2015 12:17
@bewest according to man json, json -e is deprecated and json -E should be used instead (-e can potentially be 10x slower than -E)
Chris Oattes
@cjo20
Sep 27 2015 12:59
@bewest I've also got some code that manages to upload bolus/boluswizard events to NS, but I'll wait until you've merged your branch and then modify it to fit there
Sulka Haro
@sulkaharo
Sep 27 2015 13:23
@cjo20 bolus wizard event uploads -> YES PLEASE
Chris Oattes
@cjo20
Sep 27 2015 13:23
I've only got carbs/insulin at the moment, not meter BGs
but that's only because of decocare not dealing with mmol/l properly
blob
@sulkaharo do you have openaps set up?
Chris Oattes
@cjo20
Sep 27 2015 13:30
if you want to try it out, https://gist.github.com/cjo20/4c0a21927fdfcfae83c1 it takes the output of iter_pump_hours
Sulka Haro
@sulkaharo
Sep 27 2015 13:30
Not yet, about to. I do have a couple Pis waiting for this.
We're on mmol/l, can help fix
Nightscout backed allows treatment records that are in mg/dl, with the units marked down
will auto-convert to mmol on need
Chris Oattes
@cjo20
Sep 27 2015 13:32
I'm on mmol/l too :) I don't know the decocare codebase yet though, so I suspect it'll need some help from bewest. The problem is this:
    "_type": "BolusWizard",
    "bg": 46,
    "bg_target_high": 65,
    "_description": "BolusWizard 2015-09-27T13:26:53 head[2], body[15] op[0x5b]",
    "timestamp": "2015-09-27T13:26:53",
    "_body": "0390005a122d00000c000000000c41",
    "_head": "5b2e",
    "unabsorbed_insulin_total": 0.0,
    "correction_estimate": 0.0,
    "_date": "b55a0d1b0f",
    "bolus_estimate": 0.3,
    "bg_target_low": 45,
    "carb_ratio": 14.4,
    "food_estimate": 0.3,
    "carb_input": 3,
    "sensitivity": 18
Sulka Haro
@sulkaharo
Sep 27 2015 13:32
What's the decocare mmol issue? Parsing broken?
Chris Oattes
@cjo20
Sep 27 2015 13:32
bg was 4.6, not 46. Sensitivity is 1.8, not 18
same with the targets
Sulka Haro
@sulkaharo
Sep 27 2015 13:33
1.8? Hot diggity, our kid is closer to 18 than 1.8 :)
Chris Oattes
@cjo20
Sep 27 2015 13:33
heh
the carb_ratio is wrong too. Not sure how it ends up at 14.4
0.3u for 3g carbs ends up at 1u:10g. The ratio in the pump is set to 1u:9g, so 14.4 is a bit of a mystery to me
Chris Oattes
@cjo20
Sep 27 2015 16:07
quiet in here today
Ali Mazaheri
@amazaheri
Sep 27 2015 16:31
everyone sleeping
:)
had a failed sensor this morning so blind for a while :)
Chris Oattes
@cjo20
Sep 27 2015 18:49
rpi running on battery pack :D
Ben West
@bewest
Sep 27 2015 18:50
oh...
ran out of insulin
well before that happened and sensor went to ??? it was working
heh
Ali Mazaheri
@amazaheri
Sep 27 2015 18:50
got ... by ??? this morning
Capture92615.PNG
Ali Mazaheri
@amazaheri
Sep 27 2015 18:52
:+1:
Chris Oattes
@cjo20
Sep 27 2015 18:52
got an endo appointment tomorrow, so might try hooking it up to my iphone personal hotspot and see if I can get it to keep updating the site while I'm walking around
Chris Oattes
@cjo20
Sep 27 2015 18:58
@bewest I also discovered that the _tell field in pump data seems to result in duplicate entries being uploaded. You may need to add json -E "delete this._tell" to the upload scripts
Scott Leibrand
@scottleibrand
Sep 27 2015 18:59
Nice.
(The mobile Pi.)
Ben West
@bewest
Sep 27 2015 19:57
ok, well openaps did a nice job last night
went to bed at 159 post prandial
brought me down to 110's 120's for long as it could
till sensor went to ??? and reservoir emptied
Ali Mazaheri
@amazaheri
Sep 27 2015 19:57
nice
Dana Lewis
@danamlewis
Sep 27 2015 20:00
Woot! Ben, I want to make you n=8, but if your sensor is ??? All the time, I am not sure if that counts or not :). #pleasechangesensor
(But that's awesome, and I'm holding 8 for you ;))
Scott Leibrand
@scottleibrand
Sep 27 2015 20:02
:+1:
Ben West
@bewest
Sep 27 2015 20:11
it's been trying to work during the day, issue there is basal is wrong nowish
Ben West
@bewest
Sep 27 2015 21:05
four boards stacked together
Ali Mazaheri
@amazaheri
Sep 27 2015 21:18
tease alert
Ben West
@bewest
Sep 27 2015 21:18
hmm, wrong channel
Ali Mazaheri
@amazaheri
Sep 27 2015 21:18
lol
Ben West
@bewest
Sep 27 2015 21:19
but here's the pics: http://imgur.com/a/U9AcA
that h8 is same chip in lego mindstorms ;-)
Dana Lewis
@danamlewis
Sep 27 2015 21:22
Wow!
Jason Calabrese
@jasoncalabrese
Sep 27 2015 21:23
does it still work?
Ben West
@bewest
Sep 27 2015 21:24
no, it had a fatal A21 error
was stuck in reboot loop, although setting year prior to 2006 seemed to help
at one point it did reboot after disassembling
but it's long lost that ability
someone detached that capictor
aerogel
John Males
@johnmales
Sep 27 2015 22:05
Its a pump centrefold
Rachel Sandlain
@audiefile
Sep 27 2015 22:07
Is there a trick to offline mode? It doesn't seem to work consistently for me. It should be automatic if the pi isn't on wifi correct?
Scott Leibrand
@scottleibrand
Sep 27 2015 22:13
Yeah. What is it doing / not doing?
Rachel Sandlain
@audiefile
Sep 27 2015 22:17
It doesn't automatically switch to offline mode. I think it's checking for connectivity somehow and getting a false positive but I'm not sure what/how. When I've noticed before I would turn on the hotspot on my phone and remove any file in /tmp/ with openaps and online in the file name but that doesn't always seem to work.
Lori
@LoriLori
Sep 27 2015 22:25
@bewest H8 seems like firmware can't be read :( that would be fun to read it
John Males
@johnmales
Sep 27 2015 22:25
@bewest so I managed to upload the data via your script to my nightscout web app on azure - the log says the data uploaded successfully, but it doesn't show up in the web app. Not sure how to troubleshoot this.
Ben West
@bewest
Sep 27 2015 22:25
look at the api
/api/v1/entries.json
Chris Oattes
@cjo20
Sep 27 2015 22:26
@johnmales did it appear in the mongo database?
Ben West
@bewest
Sep 27 2015 22:27
easiest way is to look at api, /api/v1/entries.json
Scott Leibrand
@scottleibrand
Sep 27 2015 22:28
@audiefile which version of loop.sh? Maybe easiest to just paste the upload function.
and how are you determining it's not doing offline mode properly? What is it setting, or not?
Rachel Sandlain
@audiefile
Sep 27 2015 22:29
master and it's not setting the scheduled rate as a temp
John Males
@johnmales
Sep 27 2015 22:30
@cj020 good question I will check. @bewest so the site is https://gljev.azurewebsites.net so https://gljev.azurewebsites.net/api/v1/entries.json now shows the more recent entries from overnight using the android uploader. I will check again when home from work
Scott Leibrand
@scottleibrand
Sep 27 2015 22:30
I have lots of updates to the upload logic in dev.
Ben West
@bewest
Sep 27 2015 22:30
to loop? thought you were moving that to your repo
Scott Leibrand
@scottleibrand
Sep 27 2015 22:30
Is there another temp already set?
Yeah, but I haven't touched my repo yet since we decided that. Should have time this evening to start looking at your stuff too.
Ben West
@bewest
Sep 27 2015 22:32
yeah, just updated/tested it
seems to work for me
diyps is now it's own wrapper/tool
Rachel Sandlain
@audiefile
Sep 27 2015 22:33
I'll have to take another look at the dev branch then.
Ben West
@bewest
Sep 27 2015 22:33
so you can register diyps as single device
Rachel Sandlain
@audiefile
Sep 27 2015 22:34
Sorry I've been out of the loop here (pun happy accident). What does diyps as a device do?
Ben West
@bewest
Sep 27 2015 22:34
then use diyps shell foobar, where foobar is one of help calculate-iob, pebble, determine-basal ...
it execs diyps-foobar if it exists
I renamed the scripts to diyps-determine-iob, etc
so calling diyps determine-basal calls diyps-determine-basal
it'll save quite a bit of typing.
can register "suite of diyps" tools once this way
this way we can eliminate all the hardcoded filenames from the scripts
Ben West
@bewest
Sep 27 2015 22:39
this was actually the intended behavior for openaps, there was a bug we haven't exercised till now
but now, the --require flag is only needed when you want openaps to create an error if the required arguments are not provided
$ openaps use --format text diyps  shell calculate-iob monitor/pump-history.json 02.diyps/profile.json monitor/clock.json 
{"iob":1.852896166435555,"activity":0.013334994388327723,"bolusiob":1.71548123904}
bewest@hither:~/Documents/foo$
Dana Lewis
@danamlewis
Sep 27 2015 22:42
@bewest Not sure DIYPS is an appropriate name for that suite of tools.
It's confusing
Ben West
@bewest
Sep 27 2015 22:44
really? why not? seems like these are the diyps algorithms
Scott Leibrand
@scottleibrand
Sep 27 2015 22:44
Nope
DIYPS uses carbs.
They're based on the same logic as DIYPS closed loop, but didn't inherit any code, and most of the algorithm is different now.
We've been improving openaps-js quite a bit while keeping DIYPS as just a meal bolus recommendation engine and extra set of smart alarms.
Ben West
@bewest
Sep 27 2015 22:46
right, but it's still diyps
Scott Leibrand
@scottleibrand
Sep 27 2015 22:46
DIYPS closed loop got retired quite awhile ago, so DIYPS and openaps-js are quite distinct now.
Siblings probably.
Or maybe nephew or something. :-)
maybe even parent/child. But definitely not the same thing any longer.
Jason Calabrese
@jasoncalabrese
Sep 27 2015 22:47
seems like the tool chain and the algorithms should distinct names
calling it all openaps doesn't seem right
Scott Leibrand
@scottleibrand
Sep 27 2015 22:48
Remember openaps was originally a reference design that included the algorithms.
Not sure how we should distinguish them, if at all.
Ben West
@bewest
Sep 27 2015 22:49
maybe should rename openaps to gnaaps or something instead then
Scott Leibrand
@scottleibrand
Sep 27 2015 22:49
Heh
Ben West
@bewest
Sep 27 2015 22:50
there's already rampant confusion
scottleibrand @scottleibrand waits for suggestions from people not quite so close to the individual trees
Dana Lewis
@danamlewis
Sep 27 2015 22:51
:) we won't resolve now, but let's think about it and talk over in a couple days
If needed I can open an issue to track dialogue?
Scott Leibrand
@scottleibrand
Sep 27 2015 22:52
Seems like something more suited for a FB or email thread.
Dana Lewis
@danamlewis
Sep 27 2015 22:53
Thinking to state the issue and then can email/distribute more broadly. Would be a good way to get folks more used to github too
Chris Oattes
@cjo20
Sep 27 2015 22:53
I'd suggest keeping openaps as the name of the framework and then giving each implementation a (different) name
Rachel Sandlain
@audiefile
Sep 27 2015 22:54
My initial two cents are that a name like gnaaps seems more confusing. The design philosophy and tools are tightly coupled so should have the same or at least similar name. maybe openaps-tools?
Scott Leibrand
@scottleibrand
Sep 27 2015 22:54
Lots of projects use names like openaps-core
My main concern is that anything with the openaps name be consistent with the original reference design. I'm fine with lots of plugins and different possible implementations, but I think anything calling itself openaps should follow all the safety principles and design constraints we laid out originally.
Ben West
@bewest
Sep 27 2015 22:58
right... I think we may be having a difference there
openaps is toolkit to make devices more accessible
Scott Leibrand
@scottleibrand
Sep 27 2015 22:58
I know several openaps implementations have much simpler dosing algorithms that don't do that, and I think that makes them less safe.
Ben West
@bewest
Sep 27 2015 22:59
diyps, or diyp2, or mobile-diyps or something like that is one way to express a system like the reference design
but openaps itself is agnostic
Scott Leibrand
@scottleibrand
Sep 27 2015 22:59
An artificial pancreas system tries to do what the pancreas does naturally.
Anyway, we should probably save this for a verbal discussion. And I am sweaty and need a shower after my run. :-)
Rachel Sandlain
@audiefile
Sep 27 2015 23:14
Is there something that needs to be installed/enabled for fix-dead-carelink.sh to work? I don't seem to have the files/commands used
Ben West
@bewest
Sep 27 2015 23:14
what do you want it to do?
it actually just resets wifi
has nothing to do with carelink stick
Rachel Sandlain
@audiefile
Sep 27 2015 23:18
When switching to the dev branch I noticed loop try to call that script since the carelink was throwing errors (happening a lot lately). It can't find the directory referenced. I was wondering if there was something I had to install/enable and hadn't
Scott Leibrand
@scottleibrand
Sep 27 2015 23:19
Sometimes the Carelink USB gets into a state where nothing will work on it. We discovered that power-cycling all USB was the most effective way to fix that without a reboot. I think Ben helped determine the commands we used, but it's been awhile.
Someone else contributed to that effort too, but I can't remember who.
Ben West
@bewest
Sep 27 2015 23:20
I'm writing a new tool no
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:20
It was like a week before your wedding I think...
Ben West
@bewest
Sep 27 2015 23:20
now
Scott Leibrand
@scottleibrand
Sep 27 2015 23:20
Lemme look at that code too, one sec
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:22
I got myself sick. I went to the gym and I was feeling well but I gradually got sicker. I spent too much time in the water and I got cold and I went into the sauna and spent too much time in there and I wasn't paying attention to my body and I realized I had to leave when my resting heart rate on my watch got up to 181 beats per minute and I started feeling sick. I don't feel well right now :( .
Ben West
@bewest
Sep 27 2015 23:23
that has nothing to do with carelink stick though
that only affects wifi
Rachel Sandlain
@audiefile
Sep 27 2015 23:24
Either way that doesn't exist on my pi. there isn't a bcm2708_usb in paltform
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:24
:point_up: July 18, 2015 5:51 AM See that
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:32
@bewest it's a power maintainence thing. The WiFi takes too much power and prevents the CareLink stick from operating properly if I recall correctly.
Somebody discovered that.
Ben West
@bewest
Sep 27 2015 23:33
ok, but then it's affecting wifi
it has nothing to do with carelink
if you don't use that particular wifi card it does nothing/broken
it only affects that one kind of card
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:33
WiFi leeches power to the point where CareLink is not powered enough.
Ben West
@bewest
Sep 27 2015 23:33
right, but it's affecting wifi for one kind of card/module
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:33
due to lack of current, mostly
Is it the Ralink WiFi dongles that work well with the Pis?
You can also update the firmware of the Pi by putting in sudo apt-get install rpi-update ....The repo is here. https://github.com/Hexxeh/rpi-update
I don't know if that would help.
Scott Leibrand
@scottleibrand
Sep 27 2015 23:37
I'm not sure the wifi power thing is what I saw.
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:37
If my memory is jogged correctly from reading it awhile back, months ago...
Rachel Sandlain
@audiefile
Sep 27 2015 23:38
apparently I'm up-to-date but thanks for the suggestion
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:38
@scottleibrand see: :point_up: July 30, 2015 5:34 PM Also, IDK what this is but it modifies bcm2708 https://github.com/notro/rpi-firmware
Scott Leibrand
@scottleibrand
Sep 27 2015 23:38
It's interesting that you're seeing the Carelink scan test fail, but aren't able to fix it the same way.
Can't follow that July link in the mobile Gitter app.
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:39
Wow that's crappy. Let me reiterate what infoneo said:
@scottleibrand old RPI B has "low power" usb ports. Maybe it is cause. My carelink used to hangup. After bridging power line to usb ports carelink works fine
Yeah doing sudo apt-get install rpi-update will modify bcm2708_usb ...see: https://github.com/Hexxeh/rpi-update for more details
This is the most updated mirror of the repo, with bcm2708_usb being modified about 10 days ago (listed in the files section) https://github.com/Hexxeh/rpi-firmware
Rachel Sandlain
@audiefile
Sep 27 2015 23:43
I tried updating. I'm up to date. That directory still doesn't exist.
Ben West
@bewest
Sep 27 2015 23:44
it's not going to
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:44
?
Ben West
@bewest
Sep 27 2015 23:44
it won't have any effect for you
you aren't using that wifi device, right?
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:44
What WiFi device? The Ralink chipsets?
Rachel Sandlain
@audiefile
Sep 27 2015 23:44
I don't think so. I'm not sure what device is being referenced.
I take it that's not a general usb power cycle command like I thought?
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:45
The Edimax is a Ralink chipset.
Ralink chipsets work right out-of-the-box (well kind of) with Raspberry Pis
Are you using a Raspberry Pi (not version 2, B+)? Also, what won't update?
Rachel Sandlain
@audiefile
Sep 27 2015 23:48
rpi2 model b and an admix wifi dongle
Ben West
@bewest
Sep 27 2015 23:48
right, sense that script only affects a specific wifi dongle
and it's not the one you're using
the script will do nothing for you
it only affects that specific wifi dongle
Rachel Sandlain
@audiefile
Sep 27 2015 23:48
See I thought it was a general thing not specific
Ben West
@bewest
Sep 27 2015 23:49
right, I think everyone did, I'm trying to be as clear as possible now
Rachel Sandlain
@audiefile
Sep 27 2015 23:49
That explains a lot
Ben West
@bewest
Sep 27 2015 23:49
it has nothing to do with carelink
and nothing to do with usb
it's pretty specific to resetting a specific usb wifi dongle
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:49
It logically has to be a power issue
I mean, at least it could be
Ben West
@bewest
Sep 27 2015 23:49
best bet if you are within grabbing difference is to unplug it and replug it in
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:50
Ben West
@bewest
Sep 27 2015 23:50
there are many reasons it can fail having nothing to do with power
most likely issue is bug in decocare, honestly
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:51
How frequently does this happen for you guys?
Rachel Sandlain
@audiefile
Sep 27 2015 23:51
Ok. I was hoping for a magic bullet. Plugging and unplugging is what I've been doing when I notice it
Ben West
@bewest
Sep 27 2015 23:52
yeah, working on several tools now
Rachel Sandlain
@audiefile
Sep 27 2015 23:52
:+1:
Ben West
@bewest
Sep 27 2015 23:52
I think it has to do with partial transmissions when you are close but not close enough and not far enough to fail
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:53
Sounds like a power issue. Remember I worked in Geek Squad for almost 3 years too.
Dana Lewis
@danamlewis
Sep 27 2015 23:53
@bewest like read but not write?
Scott Leibrand
@scottleibrand
Sep 27 2015 23:53
Ok, so maybe the reason that fix-carelink works for me then is that it actually is a wifi power issue? Dunno, just know it fixes it. :-)
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:53
Power management on the Edimax is enabled by default. Check this interesting post out. http://raspberrypi.stackexchange.com/questions/27288/edimax-ew-7811un-frequently-drops-ssh-connection
(And the following posts and links).
Keep in mind this was posted this year
FWIW, I am bookmarking. Good knowledge to have re: Edimax
Rachel Sandlain
@audiefile
Sep 27 2015 23:54
It happens when I'm wearing the whole set up in a running belt. So the pump and the carelink aren't moving in relation to each other. And within inches of each other. Sometimes literally touching
Ben West
@bewest
Sep 27 2015 23:55
ah
Scott Leibrand
@scottleibrand
Sep 27 2015 23:55
the issue I saw was a 100% failure, to the point where I could check for it with https://github.com/openaps/openaps-js/blob/master/bin/loop.sh#L35
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:55
Still sounds like a power issue.
Scott Leibrand
@scottleibrand
Sep 27 2015 23:55
nothing to do with pump comms at all
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:56
Yeah, so unlikely to be a decocare issue
Rachel Sandlain
@audiefile
Sep 27 2015 23:56
@scottleibrand from googling the usb ports and lan ports seem to be connected so it seems like they are related and it resets everything.
Scott Leibrand
@scottleibrand
Sep 27 2015 23:56
and if @audiefile has that script trying to run, she's seeing her Carelink in the same state.
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:56
So, somewhere in here, there likely (but not guaranteed) may be a fix in this post that I linked above: http://raspberrypi.stackexchange.com/questions/27288/edimax-ew-7811un-frequently-drops-ssh-connection
Ben West
@bewest
Sep 27 2015 23:57
@audiefile there are two things worth investingating
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:57
I will look into it tonight some. Feeling a little bit better...
Ben West
@bewest
Sep 27 2015 23:57
1.) resetting usb stack, negotiating sysfs to find the exact node and resetting just that one node
2.) using udev to re-trigger event as if it was unplugged/plugged in
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:57
Plus, if you are running an access point you don't want to use power management. Makes no sense.
Ben West
@bewest
Sep 27 2015 23:57
3.) hybrid approach using both techniques
diabeticgonewild
@diabeticgonewild
Sep 27 2015 23:58
How about preventing the error in the first place by dealing with power management?
And then falling on those steps @bewest ?