These are chat archives for nightscout/ios

2nd
Dec 2015
Pete
@someoneAnyone
Dec 02 2015 13:23
@jmatheson Nice!
Pete
@someoneAnyone
Dec 02 2015 13:54
The more contributing to nightscouter the better! There is a ton we can do being native…. @ericmarkmartin and I have branches going where we’re builing out the watch. and I plan on starting a new branch where we start the alarm audio work.
Jason Calabrese
@jasoncalabrese
Dec 02 2015 13:59
Great to see Nightscouter coming together, and more people getting involved
Pete
@someoneAnyone
Dec 02 2015 14:00
@jasoncalabrese Yes!
@jasoncalabrese , is there any work on bundling up the chart nightscout is using like it is in the android uploader?
Jason Calabrese
@jasoncalabrese
Dec 02 2015 14:03
Sad to say, but NS uploader had been mostly abandoned
For alarms are you going to try to do push?
Pete
@someoneAnyone
Dec 02 2015 14:08
Can’t do push yet…
not until nightscout centeral hosting is up and running...
or all nightscout sites need to send alarms to a centeralized place that the app listens too (and is registered with apple)
I want to get audio alarms working
and haptics
bummer on the chart
Jason Calabrese
@jasoncalabrese
Dec 02 2015 14:10
Maybe we can find an in between step, before for full hosting
Like a service that monitors multiple sites and did the push, but not full hosting
Pete
@someoneAnyone
Dec 02 2015 14:12
that could work… we’d need a plugin for the website like the maker one, then I’d need to create SSL certs for that server and register it with apple
Jason Calabrese
@jasoncalabrese
Dec 02 2015 14:16
Yeah, that might be a good way to start
Would be great if there was an existing service that we could use
Jim Matheson
@jmatheson
Dec 02 2015 17:29
@someoneAnyone we can get free https with cloudflare. Also, we could take a look at Parse.com for push notifications and hosting. It’s typically free until you have a significant amount of activity. I’ve used both in the past.
Scott Leibrand
@scottleibrand
Dec 02 2015 17:35
can also get free https with LetsEncrypt: supposed to be launching today-ish.
Pete
@someoneAnyone
Dec 02 2015 20:45
I'm open to any ideas. Google is another option. The problem I thought would be tough is getting individual sites to talk to a centralized place. Like parse.
I can only have the app talk to one APN sever license.
Jason Calabrese
@jasoncalabrese
Dec 02 2015 20:52
don't know how we'll get past that, don't see full hosting happening soon
Ben West
@bewest
Dec 02 2015 20:52
everyone on azure is getting ssl encryption by default
with foundation hosted mqtt, we can do a lot without vendor specific messaging
Jim Matheson
@jmatheson
Dec 02 2015 20:54
we can set up parse cloud code to receive the alert (sent via the plugin as you mentioned similar to how the Maker one works) and send it to the app.
Jason Calabrese
@jasoncalabrese
Dec 02 2015 20:55
mqtt can't do push alarms and ios apps get killed and can't stay connected
Jim Matheson
@jmatheson
Dec 02 2015 20:55
you can still push when the app is not running
Jason Calabrese
@jasoncalabrese
Dec 02 2015 20:56
yeah, but not mqtt
app won't stay connected
Jim Matheson
@jmatheson
Dec 02 2015 20:56
anyone know how the other nightscout app is pushing?
Jason Calabrese
@jasoncalabrese
Dec 02 2015 20:57
all apps are polling
only push is via pushover or maker
but those are separate accounts, for something like parse we'd need a single account
Pete
@someoneAnyone
Dec 02 2015 21:01
Right. I have the app doing background fetch but it's up to iOS to wake it up. And it's based on the users usage of the app
we would need a sever that the app can trust as an APN. Then we need a plug in from nightscout to talk to it.
Jim Matheson
@jmatheson
Dec 02 2015 21:02
yes, we’d need a central place on something like parse that would receive all requests in a central place and dole out the push notifications to users.
but if we want to avoid that...
Ben West
@bewest
Dec 02 2015 21:02
mqtt works great on android... it's what FB uses for messenger app
Pete
@someoneAnyone
Dec 02 2015 21:02
There are a lot of cool integrations possible once we have a central host. Like app links and shared credentials.
Android can poll in the background. iOS can't.
Jason Calabrese
@jasoncalabrese
Dec 02 2015 21:03
think with the new battery savings on android M it will have similar issues
Pete
@someoneAnyone
Dec 02 2015 21:03
Right, it's all to save battery.
Ben West
@bewest
Dec 02 2015 21:03
don't need to poll I think... you can put the socket to sleep
Jason Calabrese
@jasoncalabrese
Dec 02 2015 21:03
app will be dead
need something else to wake it up
Jim Matheson
@jmatheson
Dec 02 2015 21:04
so is the community theory to not use anything central for security reasons?
Jason Calabrese
@jasoncalabrese
Dec 02 2015 21:04
then you can reconnect mqtt
Pete
@someoneAnyone
Dec 02 2015 21:04
Even for the today widget on iOS i don't get to wake it. Io does when it wants to
Jason Calabrese
@jasoncalabrese
Dec 02 2015 21:05
no, just couldn't get the support needed to do hosting via the foundation, there are real issues, but also a lot of FUD
Pete
@someoneAnyone
Dec 02 2015 21:05
FUd?
Jason Calabrese
@jasoncalabrese
Dec 02 2015 21:06
Fear, uncertainty, and doubt
Ben West
@bewest
Dec 02 2015 21:07
starting a hosting project is fairly big... FWIW, there's a prototype of a hosted service on github
Pete
@someoneAnyone
Dec 02 2015 21:07
Ahh.
Ben West
@bewest
Dec 02 2015 21:07
a hosted service is a speculative operation
so there are reasons groups of people might or might not want to be responsible/liable for different parts of that operation... all of a sudden with that kind of infrastructure, it's harder to do DIY at same time...
because the security requirements become so onerous at some point
Pete
@someoneAnyone
Dec 02 2015 21:08
I'll look into the project above but it sounds like a replacement for http request and would not solve rhe sleep issue.
Ben West
@bewest
Dec 02 2015 21:09
nice thing about mqtt, is we can send messages to device as well
so once you are authed and know you are talking to NS, the NS site can issue commands/requests back to device :-)
Pete
@someoneAnyone
Dec 02 2015 21:09
Sorry for the typos. I'm sitting the lounge at RDU airport.
What commands would be needed?
I poll update the get call every 5 minutes.
Eric Martin
@ericmarkmartin
Dec 02 2015 21:17
Speaking of battery, did some more reading on the Apple Watch stuff, and it turns out that rate limiting won't actually be an issue unless updates are needed really, really, really frequently. The issue is more of battery life on the watch. For that reason, Apple asks that you try not to update complications within minutes, and give as much future data as you can muster, which is a massive problem for something like what we're trying to do. The general approach for applications like nightscouter that need data often and can't anticipate it is to load off most of the work onto the iOS App with watch connectivity. I'm working on that rn.
Pete
@someoneAnyone
Dec 02 2015 21:20
@ericmarkmartin my watch branch has some changes. Can you sync up with it?
Eric Martin
@ericmarkmartin
Dec 02 2015 21:33
sure thing