Code Monkey home page Code Monkey logo

accent's Introduction

Accent

Accent is a smart picture frame with a pop of color and no cables. Read more about it on Medium.

Accent

Server

The Accent server is built on Google App Engine using the Python 3 runtime in the standard environment.

The database backend uses Cloud Firestore. User-specific data is stored in the users collection with each user identified by a key generated by the client to identify it.

  • /users/<USER_KEY>/home - The home address used for the local time, the weather, and the commute origin.
  • /users/<USER_KEY>/work - The work address used for the commute destination.
  • /users/<USER_KEY>/travel_mode - The commute travel mode.
  • /users/<USER_KEY>/schedule - The content schedule.
  • /users/<USER_KEY>/google_calendar_credentials - The OAuth credentials for Google Calendar.

To populate the cross-user data after setting up:

  1. Obtain an API key for Google Maps and add it the api_keys collection under /api_keys/google_maps/api_key. Ensure that the Maps Static API, Directions API, Geocoding API, Maps Elevation API, and Time Zone API are all enabled and added to the key's restrictions. The Cloud Vision API also needs to be enabled, but it doesn't need a key.
  2. Obtain an API key for Dark Sky and add it in the api_keys collection under /api_keys/dark_sky/api_key.
  3. Obtain an OAuth client ID for the Google Calendar API with scope https://www.googleapis.com/auth/calendar.readonly.

To test and deploy the server:

  1. Install the Google Cloud SDK, create a project, and authenticate with a service account.
  2. Run cd server && python3 -m venv venv && . venv/bin/activate.
  3. Run pip install -r requirements.txt.
  4. Run the server locally with export GOOGLE_CLOUD_PROJECT=$(gcloud config get-value project) && python main.py.
  5. Test the local server with:
  6. Deploy the server with gcloud app deploy.

Client

The Accent client uses the Arduino toolchain for the Waveshare ESP32 board.

To push the client code to the board:

  1. Add your server base URL to Client.ino.
  2. Use the board information in Client.ino to set up the environment.
  3. Verify and upload the sketch.

Finally, follow the on-screen instructions to connect the client to a Wifi access point.

Frame

Files describing the Accent frame hardware include:

License

Copyright 2019 Max Braun

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

accent's People

Contributors

maxbbraun avatar

Watchers

 avatar

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.