Pebble Timeline Integration #1373

Open
Wferr opened this Issue Feb 23, 2016 · 8 comments

Projects

None yet

3 participants

@Wferr
Wferr commented Feb 23, 2016

Would be awesome if there was I Integration with pebble Timeline to see the matches and what time they are all quickly from your wrist. Just an idea.

@phil-lopreiato
Member

That's so cool, I need to update my OG pebble and try it out. It doesn't look too hard to interface with, actually...

What kind of things would you specifically like to see that aren't already provided by myTBA notifications? Or what would be the way you'd like to see notifications integrated with the pebble platform?

Developer docs, for reference https://developer.pebble.com/guides/timeline/pin-structure/

@Wferr
Wferr commented Feb 24, 2016

What I was thinking would be cool to have would be future and past matches all in the timeline. Would be cool to use the Sports layout for past matches with the red/blue scores and info on what teams were in it. And for future matches being a calendar layout in the timeline showing what teams and what time. Having a open in TBA button would be awesome.

@phil-lopreiato
Member

I can see that being possible and I think it's a great idea.

@fangeugene I think the server had to push events to pebble, we might have to include some callbacks into the notification framework to update for everything. Maybe we do a team based pub/sub key thing

@Wferr
Wferr commented Feb 25, 2016

If there is any way I could help just ask. I don't quite understand how TBA works yet.

@phil-lopreiato
Member

If you want to take the lead on this feature, I'd be happy to help you through it. Just let me know!

@Wferr
Wferr commented Feb 29, 2016

I would love to but I'm not sure where to start.

@phil-lopreiato
Member

Awesome! I'll give you an overview of the TBA notification code:

Here's how I can picture the pebble stuff, by skimming through the docs.

  • We probably want to use topic subscriptions, with the topic being based on event key or team key (I think those two are reasonable to support). We can send a single pin to multiple topics (for each match, we'd update: the parent event and the 6 teams participating).
  • We'll need an API Key to deal with topics, which we can store in a Sitevar.
  • We can use mach keys as pin ids so we can easily go back and modify them later.
  • If we want calendar items before matches start and sports items after scores have been posted, we'll need to insert two callbacks into the notification framework: when the schedule gets updated (TBA receives new matches) and when we send a score result.
    • When we update the schedule, we'll want to go through all unplayed matches and send PUT requests with the calendar objects.
    • When a score gets updated, we'll want to send a PUT with the same ID (match key) as before, but with a different json dict, now as a sports type.
  • We'll want to do this processing using a Task Queue so it can be done in the background.

Does that make overall sense? Also, here is a library that looks useful

@brennan-macaig

I've worked on a little bit of Pebble stuff, so if a branch is set up on this I'd be happy to look at it and see if I can help.

I have the OG Pebble Steel (with version 3.x.x loaded up) so I'd be happy to test as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment