Docker Hub container that generates image for Amazon Kindle.
The image contains calendar with events from Google Calendar - supposedly events from your IoT devices (like Smart wifi button (Amazon Dash Button hack)).
You can point your Kindle browser to html-page that updates the image every minute. So you can see the calendar on your Kindle.
Read description in my blog.
Detailed manual how to create Google and open weather credentials is in the blog post mentioned above.
Roadmap:
- Create Google project
- Create Google service account
- Enable Google Calendar API
- Create key -> Add Key -> JSON
- replace
amazon-dash-hack.json
inamazon-dash-private
folder with downloaded file - Create Google calendar wheret your IoT device will publish events (like Amazon Dash Button)
- Share Google calendar with service account
- Create OpenWeatherMap API key and place it into
amazon-dash-private/openweathermap.key
file
Prepare secrets as described in the blog post mentioned above.
Copy amazon-dash-private
folder up one level, so it will be in the same folder as docker-iot-calendar
project.
Place your secrets to this folder copy.
Run in the docker-iot-calendar
folder:
make run
Local address for the calendar page http://localhost:4444
At first I thought it would be great idea to use svgwrite, and cairosvg, but then decided otherwise and use matplotlib instead.
To install system dependencies in Mac OSX (if you want to run it outside docker container):
brew update
brew install cairo
You have to install Humor font, xkcd font or xkcd font and Comic Neue.
If you already had matplotlib installed, after font installation you have to remove ~/.matplotlib/fontList.json
.
As HTTP server I use tornado.
Create and/or virtual environment (note two dots):
. ./activate.sh
Now you can run debug code or debug the application, for example
python src/iot_calendar.py
https://andgineer.github.io/docker-iot-calendar/builds/benchmark