Accent is a smart picture frame with a pop of color and no cables. Read more about it on Medium.
The Accent client uses the PlatformIO Arduino toolchain for the Waveshare ESP32 board. See the client control flow for a high-level overview of the client code.
To push the client code to the board:
platformio.ini
.build_flags
in platformio.ini
:
kBaseUrl
in Client.cpp
.pio run -t upload
.Follow the on-screen instructions to connect the client to a Wifi access point. The settings will be preserved across uploads and can be reset manually. See the setup documentation for details.
The Accent server is built on Google App Engine using the Python 3 runtime in the standard environment. See the server control flow for a high-level overview of the client code.
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:
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 and Google Calendar API also need to be enabled, but they do not need a key.api_keys
collection under /api_keys/open_weather/api_key
.https://www.googleapis.com/auth/calendar.readonly
in the OAuth consent screen. You will either need to make your OAuth app public or add your account to the list of test users. Configure the full /oauth
URL of your App Engine app as an authorized redirect URI for the OAuth client. Write OAuth Client ID and Client Secret to the client_id
and client_secret
fields of the google_calendar
document in the oauth_clients
Firestore collection (/oauth_clients/google_calendar
).To test and deploy the server:
cd server && python3 -m venv venv && . venv/bin/activate
.pip install -r requirements.txt
(which also builds the C extension).export GOOGLE_CLOUD_PROJECT=$(gcloud config get-value project) && python main.py
.gcloud app deploy
.Files describing the Accent frame hardware include:
frame.blend
frame.pdf
frame.svg
frame.FCStd
frame.gcode
frame.step
& frame.stl