Code Monkey home page Code Monkey logo

commute-pebble-gae's Introduction

Commute for Pebble (server back-end)

Commute is an application for the Pebble smartwatch that allows users to look up commute times from their current location to home and work. Integration with Pebble Timeline allows users to receive proactive notifications when it's time to leave for work. The app is backed by data from the Google Maps API.

This is the server back-end, meant to be deployed on Google App Engine. All relevant repos:

Deploy instructions

Before deploying, open main.py and set the following variables:

  • google_maps_key: your own Google Maps API key
  • pebble_timeline_base_url: a replacement for Pebble's Timeline API

Before deploying, install Python dependencies with the following command:

$ pip install -r requirements.txt -t lib/

Then deploy to Google App Engine. In order to use the app, compile your own version of the Pebble watch app (repo linked above) and make sure to update the server base URL to that of your own App Engine back-end.

Note on branches:

  • master: stable version.
  • ferrari-6: contains multiple fixes and improvements that were still in development. Most importantly: switches from App Engine Channels (deprecated) to Pub/Sub for communicating with commute-pebble-headlights.
  • stripe-subscriptions: contains an early-stage abandoned effort to offer a paid service tier for Commute users.

commute-pebble-gae's People

Contributors

driesoeyen avatar

Stargazers

Thorben Klyn avatar

Watchers

 avatar

commute-pebble-gae's Issues

Calendar integration

Integrate with users' calendars (through Google Maps or device APIs) to enable these use-cases:

  • Notifications for travel time to next calendar appointment location
  • Using work calendar rather than a fixed schedule + work address

This feature should be reserved for paying users.

Make notification lead time configurable

Introduce user preference for setting how many minutes in advance a "Go to work" or "Go home" notification is triggered. Currently this is hardcoded to 10 minutes in advance.

KeyError when parsing directions without duration_in_traffic

When Google Maps doesn't have traffic information for a route, duration_in_traffic is absent from the directions JSON response. This can cause a KeyError while creating a pin. Subsequent retries will keep failing and the task will eventually be retried indefinitely at the lowest rate of once an hour.

Update timeline pins with fresh Google Maps info

Timeline pins sometimes become outdated before they're relevant. Consider refreshing them with new info from Google Maps every once in a while. This should only be implemented for paying users.

Implement freeform schedules

Currently, the system assumes a Monday to Friday work week where you start and stop working at the same time each day. Implement a more flexible way to set up Commute, including but not limited to:

  • Enable/disable weekdays separately
  • Allow setting up custom times for each day
  • Disable morning/evening notifications separately
  • Think of edge cases like people who go home for lunch

This feature should be reserved for paying users.

Add option to "arrive at home by"

When going home, the current options should be offered:

  • Go home at xx:xx (current implementation)
  • Arrive at home by xx:xx

Users should be able to switch between these 2 modes.

Display preview map in config

Based on the home and work addresses you entered, display a preview map with markers + route in the configuration screen to help users verify their own setup.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.