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

14th
Aug 2015
Darrell Wright
@beached
Aug 14 2015 00:41
run an ntp server on your phone :)
Nathan Racklyeft
@loudnate
Aug 14 2015 00:50
Haha I sort of like Scott's idea of using the DexCom transmitter as a time source.
Ali Mazaheri
@amazaheri
Aug 14 2015 00:50
its like futuristic!
Nathan Racklyeft
@loudnate
Aug 14 2015 00:50
Did anybody listen to the DexCom investor call this week?
Ali Mazaheri
@amazaheri
Aug 14 2015 00:51
with Google?
Ben West
@bewest
Aug 14 2015 00:51
ah.. missed it
Nathan Racklyeft
@loudnate
Aug 14 2015 00:51
Re: Google deal
Ben West
@bewest
Aug 14 2015 00:51
did see the google deal all over
Ali Mazaheri
@amazaheri
Aug 14 2015 00:51
well
they paid them
Nathan Racklyeft
@loudnate
Aug 14 2015 00:51
I was just curious. The call needed flash player so
Ben West
@bewest
Aug 14 2015 00:51
yeah, google's getting money
Ali Mazaheri
@amazaheri
Aug 14 2015 00:51
and nothing is out
Ben West
@bewest
Aug 14 2015 00:51
I saw that
Ali Mazaheri
@amazaheri
Aug 14 2015 00:51
hahaha
Ben West
@bewest
Aug 14 2015 00:51
great deal
Ali Mazaheri
@amazaheri
Aug 14 2015 00:52
I like to have a sensor in a band aid form
not requiring calibration
and lasts 2 to 3 weeks
Ben West
@bewest
Aug 14 2015 00:52
they need to understand the wearable/ambient use case better
dexcom, I mean
Ali Mazaheri
@amazaheri
Aug 14 2015 00:52
:)
Ben West
@bewest
Aug 14 2015 00:52
they produce glucose readings
Nathan Racklyeft
@loudnate
Aug 14 2015 00:52
Like the EU Libre or whatever
Ben West
@bewest
Aug 14 2015 00:52
but they don't quite understand how people consume/use them
Ali Mazaheri
@amazaheri
Aug 14 2015 00:52
I like Libre
only if it could give real time access vs me asking it
and if @loudnate and @bewest can hack libre
Nathan Racklyeft
@loudnate
Aug 14 2015 00:53
The engineers I spoke with were aware it was easy to spoof the share client, seemed fine with it.
I asked for a public API and they said "just use that"
Ali Mazaheri
@amazaheri
Aug 14 2015 00:53
:)
be patient, some good stuff will come soon
thats all I can say now :)
on API
Nathan Racklyeft
@loudnate
Aug 14 2015 00:54
Well then!
Ali Mazaheri
@amazaheri
Aug 14 2015 00:54
they are working with us
as we speak
Ben West
@bewest
Aug 14 2015 00:54
I want to bridge mqtt with them
ditch http
Nathan Racklyeft
@loudnate
Aug 14 2015 00:54
I'd like offline access thoug
mqtt?
Ali Mazaheri
@amazaheri
Aug 14 2015 00:55
and trust me I am very vocal from the users side
Ben West
@bewest
Aug 14 2015 00:55
hehehe
yeah, I've been using mqtt since november
the nightscout.net has a free mqtt server for anyone to use
Ali Mazaheri
@amazaheri
Aug 14 2015 00:55
@bewest the mqtt king
Nathan Racklyeft
@loudnate
Aug 14 2015 00:56
Excellent. Now that every mobile OS has a centralized health DB, I'd like the share app to dump there in real-time
Ben West
@bewest
Aug 14 2015 00:57
they want to keep people off the sensor, loudnate
their plan is to wrap it all up, ideally in http to their server
dunno, we'll see
I've made the distinction to them about ability to debug locally, and being able to use that to verify, trust, recommend
Rachel Sandlain
@audiefile
Aug 14 2015 03:25
Strange issue I'm hoping to get some help with. I had a working instance of openaps but it now won't work - commands error with Index out of range. I can list the devices and that's it. Not sure how it happened. I've tried updating and shutting down the pi without improvement. I don't know what else to try
Ben West
@bewest
Aug 14 2015 04:06
what version?
there's a dev branch of decocare which is probably useful to you
all commands, like read_clock?
Rachel Sandlain
@audiefile
Aug 14 2015 04:12
every command i've tried with the exception of openaps device show
opens use pump -h fails
Ben West
@bewest
Aug 14 2015 04:12
oh
can you paste the error?
hmmm
sounds like your openaps.ini maybe has something that is confusing openaps
Rachel Sandlain
@audiefile
Aug 14 2015 04:13
how would that have happened though?
Traceback (most recent call last):
File "/usr/local/bin/openaps-use", line 5, in <module>
pkg_resources.run_script('openaps==0.0.4', 'openaps-use')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/EGG-INFO/scripts/openaps-use";, line 63, in <module>
app( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/openaps/cli/init.py", line 40, in call
self.configure_parser(self.parser)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/EGG-INFO/scripts/openaps-use";, line 40, in configure_parser
self.configure_devices( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/EGG-INFO/scripts/openaps-use";, line 44, in configure_devices
self.commands.configure_commands(self.parser)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/openaps/cli/commandmapapp.py";, line 40, in configure_commands
self.makeSubcommand(ctx)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/openaps/cli/commandmapapp.py";, line 51, in makeSubcommand
parser = app.configure_subparser(self.subparsers)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/openaps/cli/subcommand.py";, line 41, in configure_subparser
self.setup_application( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/openaps/uses/init.py", line 90, in setup_application
self.method.configure_commands(self.parser)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/openaps/cli/commandmapapp.py";, line 40, in configure_commands
self.makeSubcommand(ctx)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/openaps/cli/commandmapapp.py";, line 51, in makeSubcommand
parser = app.configure_subparser(self.subparsers)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/openaps/cli/subcommand.py";, line 41, in configure_subparser
self.setup_application( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/openaps/uses/init.py", line 27, in setup_application
super(DeviceUsageTask, self).setup_application( )
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/openaps/cli/subcommand.py";, line 19, in setup_application
getattr(self.method, 'configure_app', self._no_op_setup)(self, self.parser)
File "/usr/local/lib/python2.7/dist-packages/openaps-0.0.4-py2.7.egg/openaps/vendors/process.py";, line 47, in configure_app
parser.add_argument(opt)
File "/usr/lib/python2.7/argparse.py", line 1260, in add_argument
if not args or len(args) == 1 and args[0][0] not in chars:
IndexError: string index out of range
Ben West
@bewest
Aug 14 2015 04:13
not sure, if you put it on github (maybe in private or public repo) I can take a look
there's some rough corners around openaps still
my bet is you ran into one of those sharp corners
Rachel Sandlain
@audiefile
Aug 14 2015 04:15
it just seems to have magically happened which is frustrating to me, especially since it's still super new and therefore hard for me to troubleshoot
Ben West
@bewest
Aug 14 2015 04:16
my guess is openaps-js got renamed
or some device got renamed
you can create a repo on github and put the whole thing there
then I can look at the history and see what happened
or you can put your openaps.ini in gist and I might be able to guess what's what
Rachel Sandlain
@audiefile
Aug 14 2015 04:17
the .ini or openaps-js?
Ben West
@bewest
Aug 14 2015 04:17
the .ini is what controls how openaps behaves
so if you added a new vendor or device which might confuse openaps, there's a particularly rough corner where it any one device fails in it's config loading, the whole thing dies
you can probably debug the problem by taking stuff out of openaps.ini
the devices in particular, it will try to load all the devices found on basically every command
Rachel Sandlain
@audiefile
Aug 14 2015 04:21
that was it!
Ben West
@bewest
Aug 14 2015 04:21
which one?
Rachel Sandlain
@audiefile
Aug 14 2015 04:21
there was a device I don't remember creating so I deleted it
Ben West
@bewest
Aug 14 2015 04:21
ah :-)
also... for extra pro/advanced tip
you can edit and inspect that file using git config -f openaps.ini ...
Rachel Sandlain
@audiefile
Aug 14 2015 04:22
this is why I write myself notes on what I do...
Ben West
@bewest
Aug 14 2015 04:22
so if it ever goes bonkers again
and you want to inspect that file the same way openaps does
git config -f openaps.ini --get-all device will list all the devices
and there's other options for deleting/changing
it's a secondary way to manually inspect/edit if you don't want to edit the actual file
Rachel Sandlain
@audiefile
Aug 14 2015 04:24
awesome!
Ben West
@bewest
Aug 14 2015 04:24
in git log, I bet there's the device add command somewhere in the history
Rachel Sandlain
@audiefile
Aug 14 2015 04:25
yup. as soon as I saw it, it clicked
I started adding a new device but didn't have it working yet. Then "real life" got in the way and I forgot about it by the time I could come back
Ben West
@bewest
Aug 14 2015 04:27
:-)
hmmm I got the git config thing to work at one point
it'll list everything with -l
timomer
@timomer
Aug 14 2015 12:03
he all, can anyone tell me what "profile.getSensitivity(time)" produces in cob.js?
Is this your insulin sensitivity at time suggested, or carb sensitivity? (if such a thing exists!?)
im 99% sure this is Insulin sensitivity, if so how does "getSensitivity" know what item to pull in from the JSON, is getSensitivity a function? I cannot find it
Scott Leibrand
@scottleibrand
Aug 14 2015 14:36
what is cob.js?
I don't remember that file: if it's in my code, it might be an aborted attempt at doing something that never worked.
I'm not very good at cleaning up old orphaned code. :-(
ok, I think I got the fake-hwclock stuff figured out. I have a new clockset.sh that checks whether NTP is successfully sync'd, and if not, sets the time to the more recent of the pump time and the CGM time (in the Pi's configured timezone), provided that at least one of those times is in the future.
Ali Mazaheri
@amazaheri
Aug 14 2015 14:41
I think he is reffering to c-r-m code not ours :smile: you are better than me for sure hehe
with your work I am thinking about loading this on something with a LED, are we hading for a all in one box :) Imagine that!
Scott Leibrand
@scottleibrand
Aug 14 2015 14:52
even in cgm-remote-monitor, cob.js sounds like some aborted thing I might have created. :)
yeah, @danamlewis would love something with LEDs. :-)
Ali Mazaheri
@amazaheri
Aug 14 2015 14:53
I am almost done with Intel Compute Stick and openaps runs reliably
I have some thoughts will brainstorm when u guys are back
Scott Leibrand
@scottleibrand
Aug 14 2015 14:55
cool
timomer
@timomer
Aug 14 2015 15:17
hey, yep cob.js is from cgm-remote-monitor,
I assume this is what is being use to calculate COB
Scott Leibrand
@scottleibrand
Aug 14 2015 15:18
don't assume that. :)
timomer
@timomer
Aug 14 2015 15:18
cob.js is in plugins folder
Scott Leibrand
@scottleibrand
Aug 14 2015 15:18
unless you see an actual reference to cob.js somewhere
timomer
@timomer
Aug 14 2015 15:18
ah man
:)
Scott Leibrand
@scottleibrand
Aug 14 2015 15:19
it might be, or it might not, but there's enough orphaned stuff you can't just assume
timomer
@timomer
Aug 14 2015 15:20
not sure what the deal is with github, but the search never finds any code snippets for me
Scott Leibrand
@scottleibrand
Aug 14 2015 15:21
Clone it and search locally?
or use chrome dev tools to actually trace the code execution.
timomer
@timomer
Aug 14 2015 15:21
" chrome dev tools" - should check that out
Scott Leibrand
@scottleibrand
Aug 14 2015 15:22
It's built right in. :-)
timomer
@timomer
Aug 14 2015 15:22
same as firebug for ff?
Jason Calabrese
@jasoncalabrese
Aug 14 2015 15:25
cob.js is a plugin that was ported from the old iob-cob
timomer
@timomer
Aug 14 2015 15:26
cool
@jasoncalabrese are you able to answer this? "profile.getSensitivity(time)", I believe this is Insulin sensitivity, if so how does "getSensitivity" know what item to pull in from the JSON, is getSensitivity a function? I cannot find it
Jason Calabrese
@jasoncalabrese
Aug 14 2015 15:30
the dev version supports time bases values for all the profile fields, so you could have a different sens for different parts of the day
timomer
@timomer
Aug 14 2015 15:31
cool, but how does getSensitivity work? I can see you give it a Date Var - is getSensitivity a function somewhere?
Jason Calabrese
@jasoncalabrese
Aug 14 2015 15:31
Right now the profile needs to added to mongo, but there's a PR from @MilosKozak to add a profile editor
that in profilefunctions.js
timomer
@timomer
Aug 14 2015 15:33
great, thanks! I need to find a tool to help me search this repo - that should of been an easy find
github search seems a little random
Jason Calabrese
@jasoncalabrese
Aug 14 2015 15:38
the naming there isn't great, but there was an other file named profile.js that handle the mongo storage for profiles
I'm sure it will change
timomer
@timomer
Aug 14 2015 16:23
just loaded up NS Dev, does it support the purple "three hour prediction trend"?
Jason Calabrese
@jasoncalabrese
Aug 14 2015 16:29
the purple diyps forecast hasn't been ported over to dev yet
I was going to do that, but with everyone on openaps not using cob I don't know if it still makes sense
timomer
@timomer
Aug 14 2015 16:33
sure no prob, wanted to be sure I had it all configured ok
I will be loading COB data, but not sure if I will be using it in the openasp suggestions
Chris Hannemann
@channemann
Aug 14 2015 16:33
I believe @loudnate is using COB with openaps, but he isn't using NS at the moment
Nathan Racklyeft
@loudnate
Aug 14 2015 16:34
Yep
timomer
@timomer
Aug 14 2015 16:34
just started running NS code through the debugger in FF and Chrome, feel like a fool for not doing this sooner
@loudnate are you using COB for info only or in bolus calculations?
Chris Hannemann
@channemann
Aug 14 2015 16:58
@timomer he is (for basal), but using a forked version of @kenstack's GlucoDyn
timomer
@timomer
Aug 14 2015 17:26
thanks, do you know if its based on the NS Dev code? (cob.js)
Chris Hannemann
@channemann
Aug 14 2015 17:29
No, it's not
Take a look at his prediction stuff here: https://github.com/loudnate/openaps-predict
timomer
@timomer
Aug 14 2015 17:40
cool thanks
kenstack
@kenstack
Aug 14 2015 17:41
@channemann I think @loudnate did a great job integrating glucodyn. Just remember it only predicts based on carbs and iob - there is no influence of current Bg movement/velocity - Im doing some work on general predictors right now actually - we may be able to combine / add some info to a glucodyn like prediction
Chris Hannemann
@channemann
Aug 14 2015 17:43
@kenstack correct, @loudnate and I talked about integrating some current / near-term movement into the code but have yet to put it in. I've been looking into the AR(2) stuff as well as some other options, so I'd be interested in discussing further the methods you're considering
kenstack
@kenstack
Aug 14 2015 17:45
maybe this weekend we can discuss - Im playing with some predictors in mathematica right now - Im not an expert but I think simpler may be better - even doing a polynomial regression ove rthe last 6-10 points and using it to predict 15-30 min out may be OK - again Im far from a stats guy
Chris Hannemann
@channemann
Aug 14 2015 17:46
That's closer to my world (mechanical engineer, not a software guy), so I'm happy to help
kenstack
@kenstack
Aug 14 2015 17:47
meche too :)
Chris Hannemann
@channemann
Aug 14 2015 17:47
Unfortunately, I'm gone this weekend—typing this on an Amtrak train headed to Portland
kenstack
@kenstack
Aug 14 2015 17:47
no worries when you have time
Chris Hannemann
@channemann
Aug 14 2015 17:47
For sure.
Are you Bay Area, btw?
kenstack
@kenstack
Aug 14 2015 17:47
no - ann arbor
Ben West
@bewest
Aug 14 2015 17:48
@channemann are you bay area?
oh portland for now
Chris Hannemann
@channemann
Aug 14 2015 17:48
Yeah, about 5 minutes away from Nate in Berkeley
Ben West
@bewest
Aug 14 2015 17:48
what
Chris Hannemann
@channemann
Aug 14 2015 17:48
same endo, in fact; that's how we were introduced
Ben West
@bewest
Aug 14 2015 17:48
ok we should hang out soon
Chris Hannemann
@channemann
Aug 14 2015 17:48
yeah, for sure @bewest
you're in the city, right?
Ben West
@bewest
Aug 14 2015 17:48
yeah, sf
Chris Hannemann
@channemann
Aug 14 2015 17:49
awesome
well I'm gonna have some more free time now to actually work on this—just went part-time at my real job to free up time to get myself live
Jason Calabrese
@jasoncalabrese
Aug 14 2015 17:51
I went part time at my real job a year ago, but haven't told them yet
Chris Hannemann
@channemann
Aug 14 2015 17:51
bravo
Ben West
@bewest
Aug 14 2015 17:52
been lookin for ways to make this sustainable....
Chris Hannemann
@channemann
Aug 14 2015 17:52
I figured you'd be looking for a job at Google soon, Ben
Ben West
@bewest
Aug 14 2015 17:52
support a team doing this full time and growing :-)
yes, I'm stepping up my conversations with the google recruiters as well
Chris Hannemann
@channemann
Aug 14 2015 17:53
awesome to hear
jwedding
@jwedding
Aug 14 2015 17:53
This message was deleted
+1
Chris Hannemann
@channemann
Aug 14 2015 17:53
this would be a reasonable temporary source of funding, but don't think going off-label would make them very happy: https://diabetesresearchconnection.org/
Ben West
@bewest
Aug 14 2015 17:54
our stuff is no longer off label...
Jason Calabrese
@jasoncalabrese
Aug 14 2015 17:54
need to find a way to do this independently, so many restrictions for any of these companies
Ben West
@bewest
Aug 14 2015 17:54
secondary display is legit
Chris Hannemann
@channemann
Aug 14 2015 17:54
Oh, I meant AP, not NS
But that's a good point; could you look to do a leap with NS justifying it as early-stage research?
Ben West
@bewest
Aug 14 2015 17:55
yeah, as prototype
it's prototype at internet of things for medical devices
many more things to follow, integrate
Chris Hannemann
@channemann
Aug 14 2015 17:56
worth making it freemium to bring in some funds, perhaps with a kickstarter or such up-front? Or is that totally against the mission?
Ben West
@bewest
Aug 14 2015 17:59
yeah
those all all the things I'm looking at
need help to run kickstarter
I've login.nightscout.net
been working with braintree on doing subsrcriptions
github/twitter style
so there's a freemium layer
but fair pressure/pull to upgrade
I can provide sim cards that work worldwide at lower prices, too
so I can provide end-to-end polished kit, just works
no DIY
the premium will subsidize the DIY efforts, but this will not be DIY....
lots of APIs, but no mongo
but gain mqtt for realtime, easy site config, etc, etc
and we keep getting more open source
just need help managing the media camapaigns
Chris Hannemann
@channemann
Aug 14 2015 18:02
I'm guessing there is a big pull for that already
judging by the FB chatter and such
and the target audience
Ben West
@bewest
Aug 14 2015 18:03
lot of opinions around, that's for sure
jwedding
@jwedding
Aug 14 2015 18:03
That's a nice way to put it. g
Chris Hannemann
@channemann
Aug 14 2015 18:03
yeah, never a shortage there; I'm just as guilty
Ben West
@bewest
Aug 14 2015 18:03
the "free"/DIY aspect often obscures cost from view
so different groups have dfferent views of where cost went
lot of people tend to forget what the cost was or how it was subsidized
Chris Hannemann
@channemann
Aug 14 2015 18:04
and cost != resource expenditure in many peoples' minds
so if a dollar amount isn't tied to it, it's free!
Ben West
@bewest
Aug 14 2015 18:05
right... so here we are where the freemium layers we were using are drying up...
one would think precisely because it was too expensive to give away...
but there's still demand for it to be "free"
Chris Hannemann
@channemann
Aug 14 2015 18:05
Although the market has already demonstrated a willingness to pay something
People purchase uploader rigs
Ben West
@bewest
Aug 14 2015 18:06
exactly...
and cell plans
poorly fitting cell plans
poorly integrated eveything... DIY
Chris Hannemann
@channemann
Aug 14 2015 18:06
pretty well-explained and supported, though, so kudos on that
Ben West
@bewest
Aug 14 2015 18:06
verizon plans are $540/year
the security story for hosting vs diy is also very different
DIY only has to secure one person at a time
the onus/responsibility is much lighter
Chris Hannemann
@channemann
Aug 14 2015 18:08
Do you think you could find a way to reduce the cell cost and use the delta to fund the rest?
Ben West
@bewest
Aug 14 2015 18:08
so it's possible to debug with strangers
yeah, that's why I focused so hard on mqtt
with mqtt, my cell plans are the cheapest
and they work worldwide
I have a horrible bulk-carrier deal
it's $0.70/MB
but I can charge eg $0.73/MB, use mqtt and still be cheaper than Ting
only with mqtt/protobuff
but if cgm users will pay for that, I can fund the open source effort
and continue augmenting it with pumps and more and more stuff
met with FDA 3 times, so I'm familiar with the regulatory side as well
with hosting, onus of security is to protect ALL the tenants
so you just can't share details to debug with people
you can publish the open source code
but you can't share operational details with people when hosting
fortunately, the API is robust enough to fully debug issues
Chris Hannemann
@channemann
Aug 14 2015 18:18
I see your point, it really becomes a whole 'nother beast
Ben West
@bewest
Aug 14 2015 18:18
with hosting, it either works or doesn't
you give up contorl
Chris Hannemann
@channemann
Aug 14 2015 18:18
What about emulating Glooko? Don't know much about them, but it seems like a parallel track
Ben West
@bewest
Aug 14 2015 18:19
yeah, that's similar to what we're doing
we used DIY to validate
that's what a group of us needs to transition if we are to continue supporting NS
it's the only way that will work, some kind of for-profit with a product that is publishing open source as a way of doing business
lot of open source for-profits
just not in medical.... yet....
everyone in medical refuses to look outside medical to see how technology wors
very narrow view inside the diabetes communities
Chris Hannemann
@channemann
Aug 14 2015 18:20
Doesn't have to be for-profit necessarily
jwedding
@jwedding
Aug 14 2015 18:20
This is where we get into the opinion. I believe it can work with an NPR model.
Ben West
@bewest
Aug 14 2015 18:20
I've never seen it work
jwedding
@jwedding
Aug 14 2015 18:20
Where the larger community funds the project (and the ops folks behind it) for the greater good.
Ben West
@bewest
Aug 14 2015 18:21
I've done 3 non-profits in the last 2 years
I've seen lots of for-profits succeed
in fact the question the non-profits get asked at every meeting
"why are you non-profit? why not for-profit?"
non-profit brings with it ton of unwanted, unhelpful obligations, including putting yourself at charity
eg you have to beg for existence in the market
Chris Hannemann
@channemann
Aug 14 2015 18:22
Non-profit doesn't mean non-revenue-generating
Ben West
@bewest
Aug 14 2015 18:22
the time valued way for proving your existence is the transparent contract involving money
Chris Hannemann
@channemann
Aug 14 2015 18:23
Oh, I certainly don't disagree that users should generally pay for the service
Ben West
@bewest
Aug 14 2015 18:23
in practice, people are so conservative, and the obligations are so high, I haven't seen many non-profits choose to attempt generating revenue
they mostly beg for existence
Chris Hannemann
@channemann
Aug 14 2015 18:23
With perhaps some free tier if it makes sense
Ben West
@bewest
Aug 14 2015 18:23
and barely scratch by
again, in open source there are lots of for-profits, a lot of them are affiliated with non-profits
none of the non-profits attempt to generate revenue
instead the for-profits are closely aligned
linux foundation/yocto etc
docker et al was never non-profit
it's strictly for-profit and taking off like wildfire
everyone loves it
and there's no concern about non-free use either
or wordpress
wordpress is for-profit
jwedding
@jwedding
Aug 14 2015 18:25
I'd still say sell the phone plan, give the service.
Ben West
@bewest
Aug 14 2015 18:25
the phone-plan is a service
you charge for the service, subsidize goods
Jason Calabrese
@jasoncalabrese
Aug 14 2015 18:25
should move this over to https://gitter.im/nightscout/hosting
Ben West
@bewest
Aug 14 2015 18:25
with enough subsdidy, you can subdize freemium
heh
timomer
@timomer
Aug 14 2015 18:48
hey, little off topic - have been tracking the code for COB on the Dev branch
Have entered a treatment fine few hours ago
trying to enter one now and I get 404 Not Found for the post
confusing the hell out of me
fyi - this is a self hosted server, any suggestions to debug welcome
"Cannot POST /api/v1/treatments/" is the response
Jason Calabrese
@jasoncalabrese
Aug 14 2015 18:50
getting a 404 doing the post to the api?
timomer
@timomer
Aug 14 2015 18:50
it what firebug is reporting when i try to post via the web
just entering a normal NS Treatment
Jason Calabrese
@jasoncalabrese
Aug 14 2015 18:50
make sure you have the api secret set and careportal enabled
timomer
@timomer
Aug 14 2015 18:51
odd, as it was working fine only an hour ago, made no changes
Jason Calabrese
@jasoncalabrese
Aug 14 2015 18:51
strange
see anything in the server logs?
timomer
@timomer
Aug 14 2015 18:51
my,ev looks cool
nothing odd, let me double check
Ben West
@bewest
Aug 14 2015 18:52
leave out trailing slash
sans trailing slash?
/treatments/ !== /treatments
timomer
@timomer
Aug 14 2015 18:52
Firebug shows me this as the Post: enteredBy=&eventType=Meal+Bolus&glucose=&glucoseType=Finger&carbs=10&insulin=1&preBolus=0&notes=&units
=mmol&eventTime=Fri+Aug+14+2015+19%3A40%3A00+GMT%2B0100+(GMT+Standard+Time)
not seeing anything helpful in the logs other than "POST /api/v1/treatments/ HTTP/1.1" 404 321
Ben West
@bewest
Aug 14 2015 19:04
oy
timomer
@timomer
Aug 14 2015 19:04
seen this on site load, poss related? "WebSocket connection to 'ws://<>.co.uk/socket.io/?EIO=3&transport=websocket&sid=ev8GtB41gxM1_jlYAAAI' failed: Error during WebSocket handshake: Unexpected response code: 400"
Ben West
@bewest
Aug 14 2015 19:04
should make that iso
it should then use transport=polling on second attempt
that should be unrelated, although there is a server setting if you're using nginx/apache that can make that go away
timomer
@timomer
Aug 14 2015 19:06
yeah, im grasping at straws
Ben West
@bewest
Aug 14 2015 19:07
what do you have in ENABLE environment variable?
it will issue 404 if the api is not mounted/enabled
Nathan Racklyeft
@loudnate
Aug 14 2015 19:11
@bewest I can answer any google questions you have
We should definitely get together. I'm in North Beach during weekdays
Ben West
@bewest
Aug 14 2015 19:12
you work there? you know tyler rhodes works there too?
timomer
@timomer
Aug 14 2015 19:17
ENABLE=careportal,rawbg,iob,cob
Ben West
@bewest
Aug 14 2015 19:17
hmm
usually I use spaces instead of comma, but should work
do you also have API_SECRET=myveryongsecretlongerthan12chars?
timomer
@timomer
Aug 14 2015 19:19
yep
im going to turn off the plugins
boo, no joy, even with a fresh install from GitHub
just dont understand why it let me enter one treatment then went kaboom
Jason Calabrese
@jasoncalabrese
Aug 14 2015 19:23
needs to be spaces
that could be the issue
timomer
@timomer
Aug 14 2015 19:24
ENABLE=careportal
Jason Calabrese
@jasoncalabrese
Aug 14 2015 19:24
not sure how it worked once
timomer
@timomer
Aug 14 2015 19:24
turned everything else off
something very funky is going on
Jason Calabrese
@jasoncalabrese
Aug 14 2015 19:24
ENABLE="careportal rawbg iob cob"
timomer
@timomer
Aug 14 2015 19:26
commas where ok, as I was using the plugins only a few hours ago
in that format I get env: rawbg: No such file or directory
fyi this is running on my own server
and mongo db
Ben West
@bewest
Aug 14 2015 19:27
did you use quotes?
timomer
@timomer
Aug 14 2015 19:27
r
Jason Calabrese
@jasoncalabrese
Aug 14 2015 19:27
there are 2 different types of checks that need to be cleaned up
Ben West
@bewest
Aug 14 2015 19:27
that sounds like you ran ENABLE=careportal rawbg iob cob
which would produce an error
"command rawbg ot found"
timomer
@timomer
Aug 14 2015 19:27
ENABLE="careportal rawbg iob cob"
direct from my.env :)
anyway, not even ENABLE=careportal is working
same 404 on post of treatment
Ben West
@bewest
Aug 14 2015 19:28
ah, if you switched branches
you might need to npm install
timomer
@timomer
Aug 14 2015 19:29
sorry, ENABLE=careportal is working, but I get a POST 404 when entering a treatment
Ben West
@bewest
Aug 14 2015 19:29
then run with ENABLE="careportal" and API_SECRET defined
timomer
@timomer
Aug 14 2015 19:29
have deleted and reinstalled the site twice
may purge the db
Ben West
@bewest
Aug 14 2015 19:29
if you are sourcing like this: env $(cat my.env) node server.js
and my.env has spaces in the values it won't work
you can run like this instead (. my.env; node server.js)
it's a thing with shell handling/lexing
timomer
@timomer
Aug 14 2015 19:33
the site loads fine with careportal or any other plugins requested
im running it as a service with Upstart - investigating possible issues in that area now...
Ben West
@bewest
Aug 14 2015 19:35
if I were you
I'd create /etc/default/nightscout
and define your export API_SECRET=mylongthing, export mongo= in there
then in upstart, you source that file
timomer
@timomer
Aug 14 2015 19:43
even starting from the command line same prob, im going to nuke the db and do a completely fresh install
Ben West
@bewest
Aug 14 2015 19:46
I don't think the db affects the server's rest api
in terms of being able to post
timomer
@timomer
Aug 14 2015 19:46
wow wow wow, it worked, hang on...
got it
just added some extra letters to my API_SECRET
Ben West
@bewest
Aug 14 2015 19:49
yeah, has to be longer than 12 characters
timomer
@timomer
Aug 14 2015 19:49
it was already > 12
and been working for 6 months
Ben West
@bewest
Aug 14 2015 19:49
hmm
timomer
@timomer
Aug 14 2015 19:49
something really odd happened
entered one treatment, did some debugging in FF, watched two episodes of Silicon Valley, boom - stopped working
Ben West
@bewest
Aug 14 2015 19:51
what happens when you GET /api/v1/treatments?
timomer
@timomer
Aug 14 2015 19:51
well there goes my evening stepping over the cob code, thanks for your help
GET worked fine
could see the JSON string of all vales
values*
Ben West
@bewest
Aug 14 2015 19:51
this suggests something about the format is not right
timomer
@timomer
Aug 14 2015 19:52
format of what?
Ben West
@bewest
Aug 14 2015 19:52
I think we require a type, a dateString (whichh should be date.toISOString( )`)
the treatment, not 100% sure
you'll want whatever the date object is to be the iso 8601 representation
timomer
@timomer
Aug 14 2015 19:53
just did this post: "enteredBy=&eventType=BG+Check&glucose=&glucoseType=Finger&carbs=10&insulin=10&preBolus=0&notes=&units
=mmol"
that was OK
here is the post that 404: "enteredBy=&eventType=Meal+Bolus&glucose=&glucoseType=Finger&carbs=10&insulin=1&preBolus=0&notes=&units
=mmol&eventTime=Fri+Aug+14+2015+19%3A40%3A00+GMT%2B0100+(GMT+Standard+Time)"
Ben West
@bewest
Aug 14 2015 19:54
right
looks like that will crash
eventTime needs to be output of eg new Date( ).getTime( )
timomer
@timomer
Aug 14 2015 19:55
just entered a treatment with a different time than now:
enteredBy=&eventType=BG+Check&glucose=&glucoseType=Finger&carbs=10&insulin=10&preBolus=0&notes=&units
=mmol&eventTime=Fri+Aug+14+2015+20%3A50%3A00+GMT%2B0100+(GMT+Standard+Time)
that worked ok
Ben West
@bewest
Aug 14 2015 19:55
the code is calling new Date(obj.eventTime) on teh server
with that payload this is what we expect:
> s = decodeURIComponent('Fri+Aug+14+2015+20%3A50%3A00+GMT%2B0100+(GMT+Standard+Time')
'Fri+Aug+14+2015+20:50:00+GMT+0100+(GMT+Standard+Time'
> new Date(s)
Invalid Date
>
oops sorry
Jason Calabrese
@jasoncalabrese
Aug 14 2015 19:57
just need to send it as iso, and the rest should work
Ben West
@bewest
Aug 14 2015 19:57
iso only works with Date.parse
not new Date
timomer
@timomer
Aug 14 2015 19:58
why would this start to work after changing my API_SECRET?
Ben West
@bewest
Aug 14 2015 19:58
for iso to work it has to be: new Date(Date.parse(isostring))
Nathan Racklyeft
@loudnate
Aug 14 2015 19:58
I worked there from 2010-2013
Jason Calabrese
@jasoncalabrese
Aug 14 2015 19:58
I've seen it work with new Date()
Ben West
@bewest
Aug 14 2015 19:58
my guess is you are looking at an off by one error caused by an error in the system caused by an error processing this payload
timomer
@timomer
Aug 14 2015 20:00
for the fun of it i have changed my API_SECRET back to what it was - all fine now
Ben West
@bewest
Aug 14 2015 20:02
hmm
that payload actually does parse ok due to js legacy
bewest@hither:~/src/docker-mosquitto$ node
> require('querystring')
{ unescapeBuffer: [Function],
  unescape: [Function],
  escape: [Function],
  encode: [Function],
  stringify: [Function],
  decode: [Function],
  parse: [Function] }
> s = querystring.parse("v=" + 'Fri+Aug+14+2015+20%3A50%3A00+GMT%2B0100+(GMT+Standard+Time)').v
'Fri Aug 14 2015 20:50:00 GMT+0100 (GMT Standard Time)'
> new Date(s)
Fri Aug 14 2015 12:50:00 GMT-0700 (PDT)
>
timomer
@timomer
Aug 14 2015 20:03
cannot recreate the POST 404
thanks for your assistance guys, if it pops up again ill get more POST examples
Ben West
@bewest
Aug 14 2015 20:04
yeah, good luck
timomer
@timomer
Aug 14 2015 20:09
right its back: here is the POST: enteredBy=&eventType=BG+Check&glucose=&glucoseType=Finger&carbs=5&insulin=5&preBolus=0&notes=&units=
mmol
it happened after I enabled rawbg iob cob
going back to just ENABLE=careportal fixed it
odd, as it did not fix it last time I tired until i changed the API_SECRET
timomer
@timomer
Aug 14 2015 20:14
yep, 100% due to me enabling rawbg iob cob
all plugins load and work fine, but for some reason careportal is affected when they are all active
if no one else can recreate the issue, ill say this is just an oddity for me
fyi - I am using dev
Jason Calabrese
@jasoncalabrese
Aug 14 2015 21:29
Need to fix the enable parsing, to only accept space I'll create an issue
nightscout/cgm-remote-monitor#790
kenstack
@kenstack
Aug 14 2015 23:21
@bewest @channemann so first pass at an ar2 fit with my data - no log conversion just straight up, with fit with data from the last week or so…. results matches Lane’s almost exactly. Same dynamics - huge underprediction. I think its from the fact that the datasets are biased to the mean, which in reality is true but not what we want… Could also be from the fact that as a first test I used just an AR2 which is likely too simplistic (but easy to compute).
going to do 2 things next - try some better predictors (may be a pain to impliment but lets eliminate that point) and then create some new data sets that just focus on times where he was going high or low. Right now Im guessing the majoiry of the data is “in a happy place”, ie not crashing - but for alarms… what do we want? Tradeoff of alarm fatigue versus missing lows until too late...
Ben West
@bewest
Aug 14 2015 23:32
lane used virtual patients
he says the process of selection they try to select the most extremes
Chris Hannemann
@channemann
Aug 14 2015 23:34
What is the motivation for using virtual patients in lieu of historical data? Broader population applicability?
Ben West
@bewest
Aug 14 2015 23:36
hipaa
Chris Hannemann
@channemann
Aug 14 2015 23:36
Right, that
Ben West
@bewest
Aug 14 2015 23:36
it's based on historical data, I think they use some process to virtualize historical traces
yeah, and to get it more broadly applied, they try to stress test using the worst possible cases
but if you do that across 10k people, I think you would wind up with a mean of 140
glucose goes up, gets treated and comes down, but the mean would be elevated
kenstack
@kenstack
Aug 14 2015 23:39
I think it was part of a broader study - the params used in nightscout I think are his kids data
Ben West
@bewest
Aug 14 2015 23:39
yeah, that's true
he advocated for tuning the params if you know what you're doing
Chris Hannemann
@channemann
Aug 14 2015 23:39
So for running my own regression tests, I'll be using my historical data
Bingo
Ben West
@bewest
Aug 14 2015 23:39
the small exercise I ran showed that adjusting can indeed subtly tune the behavior
kenstack
@kenstack
Aug 14 2015 23:40
I grabbed a couple of different weeks - the params of course changed but the results didnt by a significant amount
I think we could tune the params of course - the question again is what is the goal - is it to catch the extremes or be generally accurate and potentially alarm late
Chris Hannemann
@channemann
Aug 14 2015 23:41
If the functional form is solid, it should be possible to add auto-tuning during a initialization or configuration phase
I would opt for the former, Ken, and then adjust the alarm logic as you see fit
kenstack
@kenstack
Aug 14 2015 23:42
yes - actually we could easily write a script to grab a months worth of data or something and calculate a persons params - lets figure out what we want first… im still debating...
Chris Hannemann
@channemann
Aug 14 2015 23:42
Separate the bias from the prediction
So be generally accurate, but understand the potential error range and simply adjust the alarm point