DaySync is a small e-ink display on your desk. It has only one purpose: show your upcoming events and meets from your Google Calendar.
Any standard Wi-Fi enabled Raspberry Pi 40PIN GPIO (tested on 3B+) and the Waveshare 2.13 inch e-Paper Display Hat.
- Clone the repo
git clone https://github.com/ArmanJR/DaySync
cd DaySync
- Go to your Google cloud console and create a project
- Enable Google Calendar API
- Create OAuth Client
- Application type: Web Application
- Add
http://localhost:8999
to Authorized JavaScript origins and Authorized redirect URIs - Download the token, save it as
client_secret.json
alongside this repo'smain.py
- Add your account as a test user on OAuth consent screen
- Create a virtual env
python3 -m venv venv
- Activate the env
source venv/bin/activate
- Install the requirements
pip install -r requirements.txt
-
Modify
main.py
to your settings- Your timezone
tz = pytz.timezone('America/Toronto')
- The
calendarID
(more about calendars below) updateInterval
in seconds
- Your timezone
-
Run the script to generate token
python main.py
A browser tab will open. Grant access to the app and close the browser after you did. A token.json
file should exist now in the project directory.
- Terminate the script (control+z) and run again via
nohup
nohup python main.py > output.log 2>&1 &
If you want to terminate the script, just find the PID and kill
ps aux | grep main.py
user 12345 0.1 1.0 123456 12345 ? S 10:00 0:00 python main.py
user 12346 0.0 0.0 123456 1234 pts/0 S+ 10:00 0:00 grep --color=auto main.py
kill 12345
By default, your main calendar is called primary
. You may want to import calendars from other accounts or sources.
To do so, share your calendar and replace calendarID
with the one you added.
If you have any problems running the code, please open an issue.
- Replace
nohup
with a proper script execution
The waveshare files are copied from https://github.com/waveshareteam/e-Paper
Pull requests are welcome
MIT