Accent
Accent is a smart picture frame with a pop of color and no cables. Read more about it on Medium.
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:
- 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. - Obtain an API key for OpenWeather and add it in the
api_keys
collection under/api_keys/open_weather/api_key
. - 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:
- Install the Google Cloud SDK, create a project, and authenticate with a service account.
- Run
cd server && python3 -m venv venv && . venv/bin/activate
. - Run
pip install -r requirements.txt
. - Run the server locally with
export GOOGLE_CLOUD_PROJECT=$(gcloud config get-value project) && python main.py
. - Test the local server with:
- /hello/<USER_KEY> for the settings UI to edit user-specific data.
- /next?key=<USER_KEY> for the time in milliseconds until the next schedule entry.
- /epd?key=<USER_KEY> for the currently scheduled 2-bit image used by the e-paper display.
- /gif?key=<USER_KEY> for a GIF version of the currently scheduled image for testing.
- /artwork?key=<USER_KEY> to bypass the schedule and get the artwork image directly.
- /city?key=<USER_KEY> to bypass the schedule and get the city image directly.
- /commute?key=<USER_KEY> to bypass the schedule and get the commute image directly.
- /calendar?key=<USER_KEY> to bypass the schedule and get the calendar image directly.
- /everyone?key=<USER_KEY> to bypass the schedule and get the everyone image directly.
- 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:
- Add your server base URL to
Client.ino
. - Use the board information in
Client.ino
to set up the environment. - 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:
- A Blender project for simulating materials:
frame.blend
- A blueprint with basic dimensions:
frame.pdf
- A Shaper Origin design:
frame.svg
- A FreeCAD project:
frame.FCStd
- A G-code file for CNC milling:
frame.gcode
- 3D models in STEP and STL formats:
frame.step
&frame.stl