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

8th
Sep 2015
Nathan Racklyeft
@loudnate
Sep 08 2015 00:00
awesome, thank you in advance for the new fixtures and test cases :)
Oskar Pearson
@oskarpearson
Sep 08 2015 00:01
:thumbsup:
Oskar Pearson
@oskarpearson
Sep 08 2015 00:10

So I'm still in the early days of things, and there's a lot of reading for me to still do on the site. But I'm interested in what people would say the next thing I should be doing is.

My current status is that I've got things mostly up-and-running, based on largely @loudnate's repos. I don't have any of the openaps-js stuff running yet.

So far, looking at the prediction graphs against the actual graphs are quite interesting. It seems like some factor or set of factors being fed into the prediction might be incorrect. EG: let's say sugars are a bit high. Entering sugar into the pump says "take X units of insulin". The predict graph then shows sugars dropping down slowly over time.

Instead, what happens is that sugars drop a lot quicker than the prediction is expecting.

Scott Leibrand
@scottleibrand
Sep 08 2015 00:15
Is your DIA too long?
Chris Hannemann
@channemann
Sep 08 2015 00:15
@oskarpearson are you comparing your actual BG drop to a predicted one?
Oskar Pearson
@oskarpearson
Sep 08 2015 00:16
It's actually my wife that's diabetic :) But yes - I'm comparing the actual drop against the predicted one.
Is the dia set in software anywhere? Or is it read from the pump?
Chris Hannemann
@channemann
Sep 08 2015 00:17
Both
Scott Leibrand
@scottleibrand
Sep 08 2015 00:17
@oskarpearson do you have a test pump? If so I would hook it up with live BG data and let it run.
Oskar Pearson
@oskarpearson
Sep 08 2015 00:17
From what I can tell the pump gets it right
Chris Hannemann
@channemann
Sep 08 2015 00:17
DIA is set on the pump, but that's not where the software gets it from
Scott Leibrand
@scottleibrand
Sep 08 2015 00:18
if you use openaps-js it reads DIA from pump
Chris Hannemann
@channemann
Sep 08 2015 00:18
You set it in openaps-predict
(if you're using that)
Scott Leibrand
@scottleibrand
Sep 08 2015 00:18
and everything else except max_iob
Chris Hannemann
@channemann
Sep 08 2015 00:19
$ openaps use predict glucose -h
usage: openaps-use predict glucose [-h] [--settings [SETTINGS]]
                                   [--insulin-action-curve [{3,4,5,6}]]
                                   [--insulin-sensitivities INSULIN_SENSITIVITIES]
                                   [--carb-ratios CARB_RATIOS]
                                   [--basal-dosing-end [BASAL_DOSING_END]]
                                   normalized-history normalized-glucose
Oskar Pearson
@oskarpearson
Sep 08 2015 00:19
We do have a test pump. The actual setup is: a 722 (UK) with CGMs sensor. That's the old pump. She then has a new 540g (I think it is.. or 530g) that is actually supplying her insulin. So she's carrying both around at the moment, so that the 722 can read the sensor
Scott Leibrand
@scottleibrand
Sep 08 2015 00:20
So when she's stationary, you can have openaps-js (or your own loop.js) send temps to the 722.
Oskar Pearson
@oskarpearson
Sep 08 2015 00:21
Would DIA be the same as insulin-action-curve?
Nathan Racklyeft
@loudnate
Sep 08 2015 00:21
--settings [SETTINGS]
                        JSON-encoded pump settings file, optional if --idur is
                        set
  --insulin-action-curve [{3,4,5,6}], --idur [{3,4,5,6}]
                        Insulin action curve, optional if --settings is set
Scott Leibrand
@scottleibrand
Sep 08 2015 00:21
Ya.
Nathan Racklyeft
@loudnate
Sep 08 2015 00:22
You really shouldn't set --insulin-action-curve manually using that command, pass it your settings report instead.
it's in there for manual analysis
Chris Hannemann
@channemann
Sep 08 2015 00:22
My bad; ignore my previous comments
Oskar Pearson
@oskarpearson
Sep 08 2015 00:24

I was wondering if I should focus on getting openaps-js up and running next. Am I correct in my understanding that it's got a better prediction algorithm behind it? I'm worried about some of the lack of test data etc though. If it's best to proceed with openaps-js, I've some questions about appropriate openaps.ini settings for the openaps-js stuff.

Alternatively, I can try and tune the factors on openaps-predict for now while openaps-js stabilises.. and try help that process along

Scott Leibrand
@scottleibrand
Sep 08 2015 00:26
I haven't used openaps-predict yet. Do we have anyone using it for daily live looping yet?
Oskar Pearson
@oskarpearson
Sep 08 2015 00:26
read_settings.json (grabbed from the pump) currently shows insulin_action_curve as 4. Does that seem reasonable for Novarapid?
Chris Hannemann
@channemann
Sep 08 2015 00:26
I do
curve is more based on your wife's biology
Scott Leibrand
@scottleibrand
Sep 08 2015 00:27
agreed we need more eyes and test cases for openaps-js, but it is in daily use by 3 people now with excellent results.
Chris Hannemann
@channemann
Sep 08 2015 00:27
Could be 3, could be 6
I use mine 24/7, and it's solidly correct
Scott Leibrand
@scottleibrand
Sep 08 2015 00:27
@channemann good to hear.
Chris Hannemann
@channemann
Sep 08 2015 00:27
Nate as well
Oskar Pearson
@oskarpearson
Sep 08 2015 00:27
Ok - I'll focus on getting openaps-js up and running then.
Scott Leibrand
@scottleibrand
Sep 08 2015 00:28
How do you deal with meal boluses?
Oskar Pearson
@oskarpearson
Sep 08 2015 00:28
:shipit:
Chris Hannemann
@channemann
Sep 08 2015 00:28
Let 'em fly
Don't do anything special
Scott Leibrand
@scottleibrand
Sep 08 2015 00:28
does the loop know about carbs?
Chris Hannemann
@channemann
Sep 08 2015 00:28
Yep
Prediction is based on IOB and COB
Scott Leibrand
@scottleibrand
Sep 08 2015 00:29
so you have to use bolus wizard I assume.
Chris Hannemann
@channemann
Sep 08 2015 00:29
That and/or the meal markers
Which are x23 only
But either works
Scott Leibrand
@scottleibrand
Sep 08 2015 00:29
openaps-js doesn't require carb entry: you can just easy-bolus.
It does "bolus snooze" instead.
Chris Hannemann
@channemann
Sep 08 2015 00:30
Indeed
and then goes to the 1/2 basal temping, or at least I know that was discussed
Scott Leibrand
@scottleibrand
Sep 08 2015 00:30
Sounds like your algorithm is a lot like our previous DIYPS closed loop, which also worked quite well for us.
Chris Hannemann
@channemann
Sep 08 2015 00:31
May be, haven't compared exactly
I understand the benefits of both approaches
They work overnight in the same way, which is the most beneficial time
Scott Leibrand
@scottleibrand
Sep 08 2015 00:31
Ideally we could use carbs when available and bolus snooze if not.
Yep.
Chris Hannemann
@channemann
Sep 08 2015 00:32
Yeah, you could certainly do that combo
I definitely watch the system carefully to see if it's fighting me; often, when I think I catch it doing something I wouldn't, I end up being the wrong one
Scott Leibrand
@scottleibrand
Sep 08 2015 00:33
How do you set carb absorption rate?
Chris Hannemann
@channemann
Sep 08 2015 00:33
Stupid robots, thinking they're so smart
Dana Lewis
@danamlewis
Sep 08 2015 00:33
@channemann That would be 5 with you and @loudnate, who would be 6?
Chris Hannemann
@channemann
Sep 08 2015 00:34
6?
Scott Leibrand
@scottleibrand
Sep 08 2015 00:34
heh
Dana Lewis
@danamlewis
Sep 08 2015 00:34
"Could be 3 could be 6"
Chris Hannemann
@channemann
Sep 08 2015 00:35
Oh, sorry; that was for DIA
Dana Lewis
@danamlewis
Sep 08 2015 00:35
Just wondering who else you were counting
Ahhhh gotcha
(Hoping to get status updates from everyone per my email last night in case we are higher than that)
Scott Leibrand
@scottleibrand
Sep 08 2015 00:37
So is anyone else looping regularly yet that we know of?
Dana Lewis
@danamlewis
Sep 08 2015 00:37
Btw, remind me, do you have baseline data stored?
Scott Leibrand
@scottleibrand
Sep 08 2015 00:37
i have Dana Ali Nate Chris and Elliott.
Chris Hannemann
@channemann
Sep 08 2015 00:38
I have daily averages and times-in-target going back to March, when I got my dex
Scott Leibrand
@scottleibrand
Sep 08 2015 00:38
nice.
Dana Lewis
@danamlewis
Sep 08 2015 00:38
Cool
Chris Hannemann
@channemann
Sep 08 2015 00:38
But I don't have all the raw CSVs, unfortunately
Dana Lewis
@danamlewis
Sep 08 2015 00:39
When did you start looping?
Chris Hannemann
@channemann
Sep 08 2015 00:39
August 19
Dana Lewis
@danamlewis
Sep 08 2015 00:40
Cool so you have some space between cgm and looP start, makes for better data analysis as a group
Oskar Pearson
@oskarpearson
Sep 08 2015 00:40
About fix-stick. I've seen a couple mentions of this command: "echo 1or0 > /sys/devices/platform/bcm2708_usb/buspower" - eg in http://bl.ocks.org/bewest/raw/d5f0fc68c0b9ac49c146/#/set-up-fix-stick and in the code. Is it just my pi that doesn't have that? My bus power file (kernel 4.1.6-v7+ - latest raspbian) is best found with "echo 1or0 > /sys/devices/platform/soc/*.usb/buspower"
Chris Hannemann
@channemann
Sep 08 2015 00:40
Yeah, and some pretty obvious immediate improvement; we'll see if it lasts
That's the real test
Dana Lewis
@danamlewis
Sep 08 2015 00:41
Immediate improvement over even cgm improvements?
Chris Hannemann
@channemann
Sep 08 2015 00:41
Indeed
Dana Lewis
@danamlewis
Sep 08 2015 00:41
Yea see some of my DIYPS data, I wasn't expecting to be able to sustain as much, even before we started thinking loop
Chris Hannemann
@channemann
Sep 08 2015 00:41
As far as those two metrics go
We'll see about A1c; I had my blood pulled on the 18th, so it'll be a clean break
Dana Lewis
@danamlewis
Sep 08 2015 00:42
Oh nice
Chris Hannemann
@channemann
Sep 08 2015 00:43
Yeah, it was coincidental
OK, gotta run; good luck, @oskarpearson !
Oskar Pearson
@oskarpearson
Sep 08 2015 00:44
Thanks @channemann! I'll be here and let you know how it goes over the next few days
If someone has a moment... I'm just looking through the openaps-js reports, and the inputs they expect. Would someone mind letting me know what openaps.ini should contain to generate these?
  • current_basal_profile.json
  • currenttemp.json
  • requestedtemp.json
  • isf.json
Scott Leibrand
@scottleibrand
Sep 08 2015 00:47
Each of those corresponds to the similarly named openaps use command.
Find it, then openaps report add to add it, or copy paste another stanza from openaps.ini
also see openaps-example
it has an openaps.ini with most of them.
(Walking to dinner or I'd copy paste.)
Oskar Pearson
@oskarpearson
Sep 08 2015 00:49
THAT'S where I'd seen them :) Thanks. Enjoy dinner
Nathan Racklyeft
@loudnate
Sep 08 2015 00:54
@scottleibrand :point_up: September 7, 2015 5:33 PM openaps-predict uses the carb ratio schedule report https://github.com/loudnate/openaps-predict#examples
Scott Leibrand
@scottleibrand
Sep 08 2015 00:57
@loudnate I was asking about carb absorption rate, not carb ratio.
30g/hr or whatever.
No one has that in their pump, nor really knows it without doing a test on themselves or looking at lots of data.
Nathan Racklyeft
@loudnate
Sep 08 2015 00:58
oh right. It's assumed to be 180min for now.
Scott Leibrand
@scottleibrand
Sep 08 2015 00:58
That was of the reason we wanted to keep COB out of openaps-js.
Eww
constant 180m independent of meal size?
Nathan Racklyeft
@loudnate
Sep 08 2015 00:59
yeah, makes sense.
Scott Leibrand
@scottleibrand
Sep 08 2015 00:59
that is empirically incorrect in my experience. It's a function of number of carbs.
But there's a lot of variability between patients it seems.
For some people glycemic index matters a lot.
But, any estimate is better than ignoring it.
Nathan Racklyeft
@loudnate
Sep 08 2015 01:00
Yeah, entering carb data isn't going to happen unless it's really easy.
Scott Leibrand
@scottleibrand
Sep 08 2015 01:01
And if you do the rest of the openaps reference design algorithm, should be safe as well.
Yeah.
Nathan Racklyeft
@loudnate
Sep 08 2015 01:01
I haven't seen that algorithm?
Scott Leibrand
@scottleibrand
Sep 08 2015 01:01
Stuff like canceling high temps when falling.
The stuff on openaps.org
Nathan Racklyeft
@loudnate
Sep 08 2015 01:02
ah I don't do that based on rate.
Scott Leibrand
@scottleibrand
Sep 08 2015 01:03
sorry, can you explain?
Ali Mazaheri
@amazaheri
Sep 08 2015 01:06
as for A1C we got to 6.5 down .4 from 3 months ago. Last August when diagnosed it was 11. I am hoping to go 24/7 as soon as i get my hand on RileyLink and fully test the openAPS on Intel Compute stick and Scott's bridge + G5 😊
Oskar Pearson
@oskarpearson
Sep 08 2015 01:08
I've ordered rileylink boards for building myself a couple here, with the UK transmitter frequency. Keen to see how it works.
I've also got a few edisons. I'm keen to make this whole thing as portable as possible
Scott Leibrand
@scottleibrand
Sep 08 2015 01:09
Looking forward to that. :-)
Dana Lewis
@danamlewis
Sep 08 2015 01:10
Wondering if anyone else is seeing ~1 battery needed per day when running 24/7. Not sure if it's because # of Pis or because I went from mostly nighttime use to 24/7. (Also looking forward to rileylink or android for portability?
Pump battery normally was 1/month; with overnight lio
Ali Mazaheri
@amazaheri
Sep 08 2015 01:10
me
Dana Lewis
@danamlewis
Sep 08 2015 01:11
*with overnight loop was 1/week or so. Now almost 1/day
Ali Mazaheri
@amazaheri
Sep 08 2015 01:11
for sure one 🔋 per day even eith half day being used and the other in suspend mode
got rechargeable Sony see how it works
Nathan Racklyeft
@loudnate
Sep 08 2015 01:12
I adjust dose purely on the prediction line
Dana Lewis
@danamlewis
Sep 08 2015 01:12
Good to know @amazaheri . Going to try some different battery types to see if that helps
Ali Mazaheri
@amazaheri
Sep 08 2015 01:13
i heard good things about Sony i let u know in a day or so
Scott Leibrand
@scottleibrand
Sep 08 2015 01:13
So if you're falling more than expected but predicted to end up high, you keep high-temping?
Ali Mazaheri
@amazaheri
Sep 08 2015 01:13
energizer sucked
Scott Leibrand
@scottleibrand
Sep 08 2015 01:13
We've seen plenty of cases where doing that would result in a bad low. :-(
Nathan Racklyeft
@loudnate
Sep 08 2015 01:18
I haven't experienced that myself, but adding glucose trend into the prediction line is something @channemann is planning to do.
Scott Leibrand
@scottleibrand
Sep 08 2015 01:22
cool
Chris Hannemann
@channemann
Sep 08 2015 04:55
@danamlewis I started tracking my battery usage at https://gist.github.com/channemann/0a81661b78703fcb8da6
So running roughly 24/7-ish, something like 4 - 5 days on one of those Amazon AAAs
Trying the Energizer per suggestions here now; still at four bars after 3 days
Dana Lewis
@danamlewis
Sep 08 2015 04:56
Oh interesting. Thanks for sharing
Chris Hannemann
@channemann
Sep 08 2015 04:56
No problem; I like keeping random stats like that :-)
Dana Lewis
@danamlewis
Sep 08 2015 04:57
Was going to try lithium next now I'm convinced :)
Chris Hannemann
@channemann
Sep 08 2015 04:57
At this pace, definitely
I believe I read someone talking about rapid voltage drops with the lithium at EOL, so we'll see if that comes up
diabeticgonewild
@diabeticgonewild
Sep 08 2015 08:28
FML leaving on vacation and packing at the last minute. I'm an idiot cause I am seriously tachycardic right now too. Physical therapy told me to wear a heart rate monitor and just standing up my heart rate goes up to 170. Just standing up!
I'm doing a last minute laundry load too! Way to go Monica!
I'm lying down for a few minutes to let my body rest a little bit. HR is still like 109 which is bad.
Driving to Florida
timomer
@timomer
Sep 08 2015 08:39
quick OpenAPS var question: max_basal = max value a basal can be. max_daily_basal = Total basal in 24 hours? Does not appear to be used like that in determine_basal
For example: maxSafeBasal = Math.min(profile_data.max_basal, 3 * profile_data.max_daily_basal, 4 * profile_data.current_basal);
timomer
@timomer
Sep 08 2015 08:45
3 * profile_data.max_daily_basal if that was my Max Day Basal - it would be a very high number - no?
Scott Leibrand
@scottleibrand
Sep 08 2015 09:19
@timomer max_daily_basal is the maximum basal rate (in U/hr) over the course of the whole day.
Your peak scheduled basal rate.
It's an alternate way to ensure we don't set max_basal too high.
timomer
@timomer
Sep 08 2015 09:21
thanks @scottleibrand, could you give me an example with your max_basal and max_daily_basal
So profile_data.max_daily_basal would be the hour with the highest basal rate for the day?
Scott Leibrand
@scottleibrand
Sep 08 2015 09:28
{"max_iob":1.5,"dia":3,"type":"current","current_basal":1.3,"max_daily_basal":1.3,"max_basal":3,"max_bg":120,"min_bg":110,"carbratio":10,"sens":40}
correct
timomer
@timomer
Sep 08 2015 09:30
cool, thanks - do you get max_daily_basal from the pump or calculate it yourself?
Scott Leibrand
@scottleibrand
Sep 08 2015 09:30
Calculate it with a max function in get_profile.js
timomer
@timomer
Sep 08 2015 09:31
right, got it - thanks. Going over the vars to be sure I fully understand them all
im close to completing an Android app that gives an offline access to openAPS, so it will suggest every X mins a Temp Basal where the user can manually accept and apply
timomer
@timomer
Sep 08 2015 09:33
been running it for a few days now, while its a pain to be notified every 15mins, it useful to see what openAPS suggests
Scott Leibrand
@scottleibrand
Sep 08 2015 09:33
Cool.
How hard would it be to plug determine_basal.js into that?
So we can share a single codebase for the core algorithm?
timomer
@timomer
Sep 08 2015 09:34
the app will work in offline and online mode - online will in the end send the commands to the pump, while offline just notifies
its already there :)
Scott Leibrand
@scottleibrand
Sep 08 2015 09:34
by reference or ported?
timomer
@timomer
Sep 08 2015 09:34
i have ported openAPS over
Scott Leibrand
@scottleibrand
Sep 08 2015 09:35
i want to only have to maintain it in one place.
timomer
@timomer
Sep 08 2015 09:35
ported - to native android java
Scott Leibrand
@scottleibrand
Sep 08 2015 09:35
So make it actually run the JavaScript.
timomer
@timomer
Sep 08 2015 09:35
yeah agree - im not sure how that will be done, im sure poss
for me rewriting to android helped learn the code and Android dev
Scott Leibrand
@scottleibrand
Sep 08 2015 09:35
Very cool anyway. Looking forward to trying it. :-)
timomer
@timomer
Sep 08 2015 09:36
also im capturing treatments, profile and stats direct on the phone - so had to adjust the openAPS code a little
not sure how much fun it would be to debug Java via android studio!?
will share soon, prob complete this weekend
Scott Leibrand
@scottleibrand
Sep 08 2015 09:40
Cool. Good luck: sleepy time for me. :-)
Lori
@LoriLori
Sep 08 2015 12:52
just an idea how to reuse code base in JS
        V8 runtime = V8.createV8Runtime();

        runtime.executeVoidScript("glucose_data = "+readFile("openaps-example-master\\glucose.json")+";");
        runtime.executeVoidScript("iob_data = "+readFile("openaps-example-master\\iob.json")+";");
        runtime.executeVoidScript("isf_data = "+readFile("openaps-example-master\\isf_data.json")+";");

        String script = readFile("openaps-js-master\\bin\\bgpredict.js");
        Object ret =  runtime.executeScript(script);
        System.out.println(ret);

        runtime.release();
it prints {"bg":220,"iob":"4.20","eventualBG":216}
Lori
@LoriLori
Sep 08 2015 14:07
it can print
LOG IOB: 0.00, Bolus IOB: 0.00
LOG Avg. Delta: 1.0, BGI: 0.0
LOG 15m deviation: 3
LOG BG: 220+1 -> 223-223 (Unadjusted: 220-220)
LOG eventualBG 223 target_bg 115.5 profile_data.sens 10 insulinReq 10.75
LOG requestedTemp {"temp":"absolute","bg":220,"tick":"+1","eventualBG":223,"snoozeBG":223,"duration":30,"rate":3.6,"reason":"temp 0<3.6U/hr"}
diabeticgonewild
@diabeticgonewild
Sep 08 2015 15:12
Near Iota, Louisiana. I hate Louisiana, plus it's a long state to drive through. I brought 2 raspberry pis plus batteries and a laptop so we will see if I do anything or not with OpenAPS.
I think I could live in any state except Louisiana even though I am a west coast person.
I feel opium in a buzz too. Fun!
But kind of limited in terms of where or where I can't live cause I have 2 rare diseases and one is very rare. I have to live in major U.S. city with good reputation for medical care. Sucks
diabeticgonewild
@diabeticgonewild
Sep 08 2015 15:24
Yeah about to drive Atchafalaya causeway or whatever it's called. It's over a bunch of swamps and the cops patrol it heavily cause if there is a wreck on it it takes like 4 hours to clear.
diabeticgonewild
@diabeticgonewild
Sep 08 2015 15:45
See on the swamp for the next 14 miles or so http://i.imgur.com/8Of97Ox.jpg
diabeticgonewild
@diabeticgonewild
Sep 08 2015 15:53
More pics. Kind of pretty but still hate Louisiana. http://imgur.com/a/4Ec8b
Rachel Sandlain
@audiefile
Sep 08 2015 17:39
@danamlewis It's kinda hard to answer where I am. I'm running openAPS most of the time. Still working out some things like a good way too keep myself in range. I also have a bunch of ideas of things to tweak or improve - logging, looking back at data, improved notifications (If connected to internet I have it send pushover notifications).
@danamlewis I also see terrible battery life in the pump. I haven't been keeping track but it feels like a battery a week
Scott Leibrand
@scottleibrand
Sep 08 2015 17:41
@audiefile sounds like you might be #6 then. :-) which loop.sh are you using?
Dana Lewis
@danamlewis
Sep 08 2015 17:53
Woo @audiefile Awesome!
Rachel Sandlain
@audiefile
Sep 08 2015 18:05
@scottleibrand my own. the one in openaps-js seemed to rely on commands that the 712 doesn't have. I do use determine-basal
Scott Leibrand
@scottleibrand
Sep 08 2015 18:29
k
do you remember which commands are unsupported?
Rachel Sandlain
@audiefile
Sep 08 2015 19:29
settings, status, and the read_basal_x although you can read_temp_basal
Scott Leibrand
@scottleibrand
Sep 08 2015 19:47
bummer. reading settings and basal schedules is an important part of openaps-js' loop.sh.
the 515 reads all those fine, fwiw
I suppose it would be easy enough to add a command-line option to loop.sh to read those from a json file instead of from the pump
if we do that, you might find that https://github.com/openaps/openaps-js/blob/new-loop/bin/loop.sh does a much better job of dealing with being at the edge of the carelink range
since it has decent retry logic instead of requiring everything to work perfectly the first time like my earlier simpler loop.sh's did
Ali Mazaheri
@amazaheri
Sep 08 2015 20:32
@audiefile issues are related to this openaps/openaps#22 I like the new loop.sh!
Lori
@LoriLori
Sep 08 2015 20:33
minimeds deliver temp in 0.05 U ?
I was curious about
if (netBasalRate < 0) { tempBolusSize = -0.05; }
            else { tempBolusSize = 0.05; }
Dana Lewis
@danamlewis
Sep 08 2015 20:41
Yup
Lori
@LoriLori
Sep 08 2015 20:42
thx
Ali Mazaheri
@amazaheri
Sep 08 2015 20:46
we can still read basal profiles for x12
Ben West
@bewest
Sep 08 2015 20:48
re re-using code, jason and I have been using a tool call browserify
the idea is you use js's module, with the require syntax to import functions
browserify can package them up for re-use in browser, and we're already doing that in NS
so by transitioning all your code to more isolated js modules, and using require you'll make your code more re-usable
Lori
@LoriLori
Sep 08 2015 20:50
@bewest should it be about thing above, it is about re use of JS code on Android
Ben West
@bewest
Sep 08 2015 20:50
right, you mean by creating WebView?
and then you inject stuff into WebView and run your js
works with browserify
that's a technique I see a lot
Lori
@LoriLori
Sep 08 2015 20:51
no, it is engine V8 (what node uses)
Ben West
@bewest
Sep 08 2015 20:51
ah, I see, that's kind of interesting
why not just straight up node4A or py4a or whatever
simplicity?
Lori
@LoriLori
Sep 08 2015 20:52
can't find node4A
Ben West
@bewest
Sep 08 2015 20:55
I made it up, lemme find proper link
hmm, I see a bunch of things
but creating a simple WebView and injecting massive script and some data into it seems simple, too
chrome plugin uses same build technique... prep bunch of js, shove it into "plugin" which basically runs in WebView
would make for looser coupling, as well, perhaps?
Lori
@LoriLori
Sep 08 2015 21:00
kind of lost in English here :(
last sentence I don't understand
Ali Mazaheri
@amazaheri
Sep 08 2015 21:04
i am still running with 512, and getprofile.js is coded to get all it needs from pump. key is to get the json reports from x22 running commands not available on x12 and fill the blanks and remove them from loop. i already shared the needed json files earlier here and will post it to openaps-js as pr for anyone else running the older pumps 😊
Ben West
@bewest
Sep 08 2015 21:12
might think about changing the "munge" language to fit more with the cooking metaphor
you often slice/dice some veggies or something on the side, in a special area, for prep, later
so prepare, suggest, slice, bake, zap, debone, mince, stew, mingle, validate, check, clean, rinse, sanitize, wash, scrub might be good to consider, especially as we start to consider phases, prepping in different places/subdirs
might drain latest device data into pool, take it to the sink to wash/clean it, take it to cutting board to cube/mince/sort/prep it
Ben West
@bewest
Sep 08 2015 21:18
put it in forms/bowls whatever to mix it, bake/prepare recommendations in different place/oven, finally serve it/send it out into world
lots of intermediate steps, all part of recipe, composed of uses
Ali Mazaheri
@amazaheri
Sep 08 2015 21:18
😊 getting hungry Ben 🙉
Dana Lewis
@danamlewis
Sep 08 2015 21:18
"scrub" or "prepare" or "sanitize" make more sense to me than munge...
Ben West
@bewest
Sep 08 2015 21:18
right
also going to be a fair amount of validate/check uses cases
lot of recipes will have similar logic to make sure various things are within range, it's safe to move to next step
so if a phase fails, the rest of steps know what to do: cleanup/abort/reset whatever
@amazaheri did you get a ti debugger? I got a goodfet which I'm using
but not sure the windows tool for the ble112 or whatever will recognize the goodfet
Ali Mazaheri
@amazaheri
Sep 08 2015 21:24
i can order it, i suggest bring goodfet to OC if we cant make it work for Windows at least we can hook it up to RasPi for now.
Ben West
@bewest
Sep 08 2015 21:29
yeah
well, it's flashed/working already I believe
so that's just needed for update to ble part
Rachel Sandlain
@audiefile
Sep 08 2015 22:18
I get attribute errors when I try the read basal commands. I am up and running though (at least a modified system) thanks in part to the sample docs you shared @amazaheri I edited them by hand. I didn't try removing the commands from the loop though
Ali Mazaheri
@amazaheri
Sep 08 2015 23:54
awesome glad i could help, Oliver did the same and used the samples.