Accent is a smart picture frame with a pop of color and no cables. Read more about it on Medium.
To push the client code to the board:
- Configure the IDE or CLI with
- Pick one display type via
- If you want to point the client to a custom server, change
- Compile and upload with
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 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/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.
- Obtain an API key for OpenWeather and add it in the
- Obtain an OAuth client ID for the Google Calendar API with scope
https://www.googleapis.com/auth/calendar.readonlyin 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
/oauthURL of your App Engine app as an authorized redirect URI for the OAuth client. Write OAuth Client ID and Client Secret to the
client_secretfields of the
google_calendardocument in the
oauth_clientFirestore collection (
To test and deploy the server:
- Install the Google Cloud SDK, create a project, and authenticate with a service account.
cd server && python3 -m venv venv && . venv/bin/activate.
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.
Files describing the Accent frame hardware include: