These are chat archives for nightscout/beta

14th
Mar 2015
jwedding
@jwedding
Mar 14 2015 02:02 UTC
I moved here now.
Scott Hanselman
@shanselman
Mar 14 2015 02:06 UTC
It's running as a background web job in azure now
blob
Been going for 40 min
Ok, gotta eat. But I will be back soon. Thanks @bewest for your pairing! Blog post tonight. Yay!
Ben West
@bewest
Mar 14 2015 02:08 UTC
:-)
Ben West
@bewest
Mar 14 2015 02:09 UTC
what someone from MS know about people wanting to call APIs public or not?
hahaha, very cool
nice easy win for end of week
Scott Hanselman
@shanselman
Mar 14 2015 02:10 UTC
LOL I call ALL THE APIs
Jason Calabrese
@jasoncalabrese
Mar 14 2015 02:11 UTC
that could be good for some people, there are limitations, no raw, no camping mode, etc, but at least you get the data
Ben West
@bewest
Mar 14 2015 02:43 UTC
yeah, for people who 'Share is perfect but missing personal data ownership or missing the pebble or whatever
Jason Calabrese
@jasoncalabrese
Mar 14 2015 02:43 UTC
oh yeah, the pebble
Ben West
@bewest
Mar 14 2015 02:43 UTC
yeah, we can beat dexcom to the wrist again
just wrote some more comments and updated docs a bit more
jwedding
@jwedding
Mar 14 2015 02:44 UTC
Confession: I was floored with the simplicity of setting up our Share today. But it freaking KILLED me everytime I looked at my wrist and had nothing.
And Carson was in love with just carrying the G4 instead of the tackle box that is her full NS rig.
Ben West
@bewest
Mar 14 2015 02:46 UTC
you can probably set this up tonight
Lori
@LoriLori
Mar 14 2015 02:50 UTC
nice test of D company intentions :smile:
Jason Calabrese
@jasoncalabrese
Mar 14 2015 02:57 UTC
Wes deleted his post in the FB group?
jwedding
@jwedding
Mar 14 2015 03:03 UTC
Yes, I made a comment to him via PM and he thought I meant to take it down. :\
He deleted it without a word.
It was already going down the, "When can I have this?" road. I threw out, "You're kiling me smalls."
Jason Calabrese
@jasoncalabrese
Mar 14 2015 03:06 UTC
would be a nice bonus feature with enchilada
jwedding
@jwedding
Mar 14 2015 03:07 UTC
@bewest is being kind and walking me through it. We have a Share going already, just fighting Azure about scheduled jobs now.
Jason Calabrese
@jasoncalabrese
Mar 14 2015 03:08 UTC
we could just use the module in nightscout
add an enable option
etc
Ben West
@bewest
Mar 14 2015 03:21 UTC
yeah, if you put it in the right directory in azure, it just runs
@shanselman @jwedding almost got it going, not sure how you got it to do the npm install bit
jwedding
@jwedding
Mar 14 2015 03:22 UTC
@shanselman @bewest and I were trying to deploy this to mine as another test case, but it's failing on npm install I think (he thinks.) I'll be around for a bit, DM or text if you want to test on another site?
Scott Hanselman
@shanselman
Mar 14 2015 03:54 UTC
Ping
Do the npm install yourself locally and then zip the whole folder. Npm for this doesn't run in the cloud. Need help @jwedding?
Flow is this. Put the package.json in a folder. Npm install. Zip folder.
Ben West
@bewest
Mar 14 2015 03:55 UTC
after some more reading I see that it's a feature on the roadmap
Scott Hanselman
@shanselman
Mar 14 2015 03:55 UTC
You can do this @bewest and give him the zip
Ben West
@bewest
Mar 14 2015 03:55 UTC
I sent him another zip
Scott Hanselman
@shanselman
Mar 14 2015 03:56 UTC
Then go to Azure portal. To web jobs. Add one, upload zip. Set schedule. Setup env. Done.
Ben West
@bewest
Mar 14 2015 03:56 UTC
I had him do env first
should be good to go :)
Scott Hanselman
@shanselman
Mar 14 2015 03:56 UTC
Ah. Sure. That's better.
Last thing to do. Change it to reuse session Id. Login in expired sessions.
Also change to continuous over schedule.
Ben West
@bewest
Mar 14 2015 03:57 UTC
yeah, it's kind of nagging at me
it's just complicated enough I feel like bringing in more modules and stuff
Scott Hanselman
@shanselman
Mar 14 2015 03:58 UTC
Last thing.
What's nagging?
Ben West
@bewest
Mar 14 2015 03:58 UTC
the last thing ;-)
Scott Hanselman
@shanselman
Mar 14 2015 03:58 UTC
Suggestion. @lorelail suggested a Chron for node. Might be easier, assuming it works on windows
Also NOTE this will take free people over their data plan
So folks who want this will need to scrape together the $7
Ben West
@bewest
Mar 14 2015 03:59 UTC
hehehe
on bright side, they won't complain about it crashing
Scott Hanselman
@shanselman
Mar 14 2015 03:59 UTC
So I would not recommend this for free sites. Actually, I don't even know if free sites support web jobs, which would get you back to integrating it directly
Ben West
@bewest
Mar 14 2015 04:00 UTC
ah
hmm
Scott Hanselman
@shanselman
Mar 14 2015 04:00 UTC
Given that we are talking about running a 24 hour service in the background, I'll be at a simple one, it would definitely need to be in always on the shared site
Jason Calabrese
@jasoncalabrese
Mar 14 2015 04:01 UTC
Shouldn't use much if it's integrated
Scott Hanselman
@shanselman
Mar 14 2015 04:02 UTC
Data? 200 bytes every 5 min, out going
Jason Calabrese
@jasoncalabrese
Mar 14 2015 04:02 UTC
Not any more than a uploader
Ben West
@bewest
Mar 14 2015 04:02 UTC
right, that's what he meant by integrated
I think by integrated he meant "integrate ble with android"
Scott Hanselman
@shanselman
Mar 14 2015 04:02 UTC
But its in azure. So it's 24 megs
Ben West
@bewest
Mar 14 2015 04:02 UTC
as opposed to incurring bytes on your network I/O every 5 min in azure
Scott Hanselman
@shanselman
Mar 14 2015 04:02 UTC
No there's two products here
Jason Calabrese
@jasoncalabrese
Mar 14 2015 04:02 UTC
polling from inside NS
Ben West
@bewest
Mar 14 2015 04:02 UTC
ah
Scott Hanselman
@shanselman
Mar 14 2015 04:03 UTC
One is NS for Dexcom share and one is Dexcom share for BLE Android
I don't understand Jason
Jason Calabrese
@jasoncalabrese
Mar 14 2015 04:03 UTC
You would only have the get, not the post
Scott Hanselman
@shanselman
Mar 14 2015 04:03 UTC
That's a totally valid point. But the post is local, so it doesn't count anyway
Ben West
@bewest
Mar 14 2015 04:03 UTC
we're talking about different things ;-)
Scott Hanselman
@shanselman
Mar 14 2015 04:04 UTC
Jason is pointing out that it's integrated, you can go straight to mongo. I'm saying that doesn't matter because it's a local post
It's a loopback
The only question I believe, is this running in the background thread somewhere in node? Notice not good at that.
Sorry. Speech recognition failing
Node is iffy at background "threads"
Thoughts?
Jason Calabrese
@jasoncalabrese
Mar 14 2015 04:07 UTC
Guess you could have something else doing a status check
Ping a endpoint
Ben West
@bewest
Mar 14 2015 04:08 UTC
node doesn't really do threads, not sure I get that concern
Jason Calabrese
@jasoncalabrese
Mar 14 2015 04:08 UTC
Like the pebble
Ben West
@bewest
Mar 14 2015 04:08 UTC
was just going to use forever.js along with setInterval
Jason Calabrese
@jasoncalabrese
Mar 14 2015 04:08 UTC
Would heroku stop the instance?
Ben West
@bewest
Mar 14 2015 04:09 UTC
no, this would keep it alive, I think
not sure heroku does this
ah, I mean, yeah, setInterval could g o in the server
Scott Hanselman
@shanselman
Mar 14 2015 04:20 UTC
In azure on a free site this will use the CPU allotment
and it'll get paused
Ben West
@bewest
Mar 14 2015 04:20 UTC
aha
Scott Hanselman
@shanselman
Mar 14 2015 04:20 UTC
the beauty of the webjob is it's its own node instance
so rather than "threads" you get a 'side car' website
Ben West
@bewest
Mar 14 2015 04:20 UTC
that quota
Scott Hanselman
@shanselman
Mar 14 2015 04:21 UTC
broken record it's free
Ben West
@bewest
Mar 14 2015 04:21 UTC
hehe
Scott Hanselman
@shanselman
Mar 14 2015 04:22 UTC
web jobs were interoduced to solve this problem http://www.hanselman.com/blog/IntroducingWindowsAzureWebJobs.aspx
no web framework handles true background tasks. If this was a VM, we'd make it a chron
so this brings chron to websites. Any language, also. Bash, Python, node, wahtever
so, @bewest reading on this. It needs to be continuous. Otherwise the scheduler could kick in $ http://azure.microsoft.com/en-us/pricing/details/scheduler/
Ben West
@bewest
Mar 14 2015 04:24 UTC
yeah
Scott Hanselman
@shanselman
Mar 14 2015 04:37 UTC
still going strong
Jason Calabrese
@jasoncalabrese
Mar 14 2015 04:58 UTC
The pebble could hit the share api directly
Scott Hanselman
@shanselman
Mar 14 2015 05:04 UTC
LIkely not, the pebble has a maximum payload size of 120bytes
the way we have it now is more elegant
Jason Calabrese
@jasoncalabrese
Mar 14 2015 05:06 UTC
Not in the pebble js, just the message to the pebble
With that there is no server setup, just enter Dex id/PW
jwedding
@jwedding
Mar 14 2015 05:12 UTC
Sorry, had to drop away.
You guys freaking rock. https://weddingscout.azurewebsites.net/
Ben West
@bewest
Mar 14 2015 05:13 UTC
ok
jwedding
@jwedding
Mar 14 2015 05:13 UTC
That's live from her Share setup.
Ben West
@bewest
Mar 14 2015 05:13 UTC
there's our answer
that guid is likely for the "share" app
and is same for everyone
:-D
hehe
jwedding
@jwedding
Mar 14 2015 05:14 UTC
Need to move my site from my freebie to the paid one from Ali.
We think the continuous is better than every five? Logs showing some interesting output.
Scott Hanselman
@shanselman
Mar 14 2015 05:17 UTC
Awesome. Move to Shared
We'll want to change the job to continious
but INSIDE the job make it go ever 4-5 minutes
so it will still poll, but Azure won't be the scheduler (saves money)
Oh, one other thing
@jwedding did you see the webjobs dashboard?
jwedding
@jwedding
Mar 14 2015 05:18 UTC
Yes, that's where I have them.
Scott Hanselman
@shanselman
Mar 14 2015 05:19 UTC
Cool, and you see the debug output there? Just showing a useful thing
Ben West
@bewest
Mar 14 2015 05:19 UTC
it's part of the scm site
jwedding
@jwedding
Mar 14 2015 05:19 UTC
I do.
Scott Hanselman
@shanselman
Mar 14 2015 05:19 UTC
Cool
Congrats!
jwedding
@jwedding
Mar 14 2015 05:19 UTC
I can't make too much sense of it, but I see it.
Scott Hanselman
@shanselman
Mar 14 2015 05:19 UTC
So the downer is we lose raw
but the good part is it works
so for iphone people it's easier
jwedding
@jwedding
Mar 14 2015 05:19 UTC
I know just enough to be dangerous.
Scott Hanselman
@shanselman
Mar 14 2015 05:19 UTC
for android, it offers nothing
jwedding
@jwedding
Mar 14 2015 05:19 UTC
Correct.
Stephen's direct read of the BT stream would still be ideal for the Android side, or anyone wanting Raw.
Scott Hanselman
@shanselman
Mar 14 2015 05:20 UTC
Exactly
BUT
does the BT stream include raw? That hasn't been proven yet right?
jwedding
@jwedding
Mar 14 2015 05:20 UTC
So, why not run it on the schedule? Purely a cost issue?
I don't know if we know what the BT output stream contains yet.
Scott Hanselman
@shanselman
Mar 14 2015 05:21 UTC
If you run it on a scheduler it'll cost another $5=10 a month for the cron I thnk
jwedding
@jwedding
Mar 14 2015 05:21 UTC
Gotcha.
Scott Hanselman
@shanselman
Mar 14 2015 05:22 UTC
"As of March 2014, websites in Free mode can time out after 20 minutes if there are no requests to the scm (deployment) site and the website's portal is not open in Azure. Requests to the actual site will not reset this.
Reason number 99 to not run free
"Code for a continuous job needs to be written to run in an endless loop.
Continuous jobs run continuously only when the site is up."
"For continuous tasks, it is recommended that you enable Always On on the Configure page for your website. The Always On feature, available in Basic and Standard mode, prevents websites from being unloaded, even if they have been idle for some time. If your website is always loaded, your continuously running task may run more reliably."
jwedding
@jwedding
Mar 14 2015 05:23 UTC
Time to make sure I'm on PAYG.
Scott Hanselman
@shanselman
Mar 14 2015 05:23 UTC
I run basic, so they are saying that if a Shared site "falls alseep" the job could stop
so, don't NOT hit your site. Keep it up by using it
no problem there
jwedding
@jwedding
Mar 14 2015 05:24 UTC
Wonder if the Pebble call is considered a use?
Seems like it would be?
Scott Hanselman
@shanselman
Mar 14 2015 05:24 UTC
it's a GET
yes
and it's from the phone
so it'll be a ping
you can also setup pingdom or whatever to keep it up
by poking it
jwedding
@jwedding
Mar 14 2015 05:24 UTC
Right. I'll just call tomorrow and make sure I have my mainline site moved over to the Pass account.
Scott Hanselman
@shanselman
Mar 14 2015 05:25 UTC
@jwedding your site just updated
AMAZING
Ya, thinking about this continuous is est
best
yes, high, but that's from her Share. Thank you very much, @shanselman & @bewest
Scott Hanselman
@shanselman
Mar 14 2015 05:27 UTC
yay!
writing a blog post now
jwedding
@jwedding
Mar 14 2015 05:29 UTC
I think we could definitely get this to the Labs portion of .info tomorrow, but I'm concerned about Dex adjusting their GUIDS or filtering in some way to stop it from working
Scott Hanselman
@shanselman
Mar 14 2015 05:29 UTC
I say we wait a week and watch
jwedding
@jwedding
Mar 14 2015 05:30 UTC
Seems reasonable.
Scott Hanselman
@shanselman
Mar 14 2015 05:30 UTC
let's get 4-5 folks running it and see if it is cool
no one will read my blog (it's for techies)
plus, we DO need continuous before I'm comforable
jwedding
@jwedding
Mar 14 2015 05:31 UTC
Easy enough to swap the jobs as you guys update the json. Anyway, well late here. I'm off. Thanks again, Scott. Really nice.
Scott Hanselman
@shanselman
Mar 14 2015 05:31 UTC
pleasure
I'm thrilled
I hated carrying my android rig around
jwedding
@jwedding
Mar 14 2015 05:31 UTC
So did my 11 yo daughter.
Ben West
@bewest
Mar 14 2015 05:37 UTC
jgot it
didn't need more modules
@shanselman updated to run continually :-)
I think it works
still waiting to see how it works with 5 minute duty cycle
but seems to work every 2.5 seconds :-)
have no idea if it works
Ben West
@bewest
Mar 14 2015 05:44 UTC
seems to work, will be interesting if it works when token expires
Ben West
@bewest
Mar 14 2015 05:50 UTC
ok, at this point, on their end it's going to be very hard to tell the difference between this and a normal app
Jason Calabrese
@jasoncalabrese
Mar 14 2015 05:52 UTC
they have the ip, could see it's azure, heroku, etc
Ben West
@bewest
Mar 14 2015 05:54 UTC
I suspect they are hosting in azure
themselves ;-)
Scott Hanselman
@shanselman
Mar 14 2015 06:09 UTC
ya don't do it continuously
it'll jsut run foever
add a sleep or something at the end
it'll die then azure will start it again
@bewest needs to add session support to prevent logging in over and over again
oh
wait
@bewest you did it already?
@bewest how often is it calling it now? Every 5?
Ben West
@bewest
Mar 14 2015 06:14 UTC
that's a neat little program
yeah, this version just runs forever
re-uses the same session key
by default it's every 5 minutes
Jason Calabrese
@jasoncalabrese
Mar 14 2015 06:51 UTC
great post @shanselman
Sulka Haro
@sulkaharo
Mar 14 2015 09:53 UTC
Hey who's authored the raw conversion code for the visualisation? would be great to get that going for Medtronic, would love to understand what the calibration data needs to represent exactly
Jason Calabrese
@jasoncalabrese
Mar 14 2015 14:33 UTC
That code is based on Adrian's paper, I think the current version is via John / Scott
jwedding
@jwedding
Mar 14 2015 14:37 UTC
Interesting, something stopped in Azure that it quit pulling, then I logged in to check on it, and it kicked back in. I think you and I talked about something like this, @shanselman with PAYG/Free accounts timing out? I'll move the whole thing to my paid site today if I can and watch it from there.
Sulka Haro
@sulkaharo
Mar 14 2015 14:42 UTC
I moved our hosting to Heroku. Much better management UI and switching the deployment between branches is dead simple, which is cool for testing.
jwedding
@jwedding
Mar 14 2015 15:14 UTC
Well, Scott's stuff is taking advantage of the Azure webjobs, so we'd have to see if there's equivalency on that.
And we are def'y missing the arrow pieces somehow. When I scan the output log, I see the Trend value, but it doesn't seem like it's being placed correctly into Mongo.
jwedding
@jwedding
Mar 14 2015 15:19 UTC
Also not sure if it's on us or Dex's output, but I'm not seeing the Calibration event.
Lori
@LoriLori
Mar 14 2015 16:02 UTC
trend needs fix json.put("direction", record.getTrend().friendlyTrendName()) but it sends just number , calibration is not part of share2 data, or you see it in follower app?
jwedding
@jwedding
Mar 14 2015 17:48 UTC
No, it's not in the Follower app. Hard to tell so far what exactly is being sent from the Share2 app to their Cloud. There is def'y a timeout happening. If I don't touch my Azure console, the job goes dead.
the nightscout-sidecar.zip file should work, but I haven't tested it
ah, no
Jason Calabrese
@jasoncalabrese
Mar 14 2015 20:37 UTC
I see it
Ben West
@bewest
Mar 14 2015 20:37 UTC
nifty
what can you see?
must be working on shared ownership in github
with icognito I see nothing
there's a few keys in there
wercker can automatically publish to google play :-)
Jon Cluck
@cluckj
Mar 14 2015 20:38 UTC
sweet
Ben West
@bewest
Mar 14 2015 20:38 UTC
been kicking the tires
you can even cache bits of previous builds
you can also cache/prepare the build machines themselves
so on another repo I loaded up a big build machine with tons of requirements
lot of latex related stuff
and bingo, it builds docs like a champ
cuts 30 minutes from build time, using the pre-installed tools
Jason Calabrese
@jasoncalabrese
Mar 14 2015 20:42 UTC
so many great tools
Screen Shot 2015-03-14 at 1.43.23 PM.png
thats what I see in incognito
Ben West
@bewest
Mar 14 2015 20:44 UTC
so what I did is wire it up
azure requires a funky zip file
for "sidecar" to work
so what I do in the build step is prepare that special zip file
move it into wercker's output directory
then in the deploy phase, I use two deploy steps, create-release, and upload-file-to-release
so the effect is everytime a tag is pushed, the prepared zip file is uploaded to the release page
that's nifty
travis had similar stuff
but little harder to get everything wired up
this thing has nice way to edit/protect secure variables
and re-use steps and boxes
in the other repo, I use it to compile bunch of docs:
so idea is, given bunch of markdown files (eg for system architecture, hazards analysis, etc...)
this thing compiles nice little website with pdf, epub, etc
jwedding
@jwedding
Mar 14 2015 21:38 UTC
Sidecar 0.0.3 throwing an error at deployment, @bewest.
Hang on, may have grabbed the wrong zip. Puling the named Sidecar.zip file now.
OK, seems like that was it. I grabbed the top one on @bewest's page instead of the release .zip. Looks groovy now. Now if I can just get the damn G4 to quit ???ing.
Ben West
@bewest
Mar 14 2015 21:43 UTC
wait for it...
about to make this even easier
someone just posted it on FB
cool, new build should be avilable shortly
the new one matches the readme behavior
basically made everything optional except for DEXCOM creds
so it's down to 2 required env variables now
and they can be the connection string, custom type
jwedding
@jwedding
Mar 14 2015 21:56 UTC
Yeah, I'm trying to keep the FB expectations low until we can verify the timeout issues I've been seeing. Seems that if I don't touch Azure for an hour or so, the polling stops. It might be my account, it might be something else, still digging in to it.
Ben West
@bewest
Mar 14 2015 21:57 UTC
what verion are you using?
oh the new one
hehe
I updated the readme
should be ready to go
it's already googled
jwedding
@jwedding
Mar 14 2015 22:00 UTC
Yes, that's the one I pulled. It deploys ok, but I'm seeing some weird behavior in the polling in terms of timing out. I think @shanselman mentioned something about this last night as a change in the free tier. I've got another site on a paid plan, but I'm trying to just move this one.