Olivier Simard-Hanley's ePaper Picture Frame Pulls Images From Gmail via a Raspberry Pi
Data scientist Olivier Simard-Hanley has put together an ePaper picture frame with a difference: it pulls its imagery from a Gmail inbox, using a Raspberry Pi Zero W.
"The frame's job is to display an image from a fixed URL at specific intervals," Simard-Hanley explains of the project. "There is a Flask app hosted at this address. Whenever it is pinged, it pulls the latest image received in a Gmail inbox, with the help of the Gmail API and Auth 2.0."
The project is split in two — three, if you count the hardware: A low-cost Raspberry Pi Zero W single-board computer driving an ePaper display, mounted behind the glass of an attractive wooden frame.
The first half of the project runs on the Raspberry Pi itself as a pair of Python scripts. The first script edits images into a format suitable for the ePaper display, reducing it down to a two-tone color palette and resizing it to an appropriate resolution. The second takes care of retrieving new images and displaying them on the ePaper panel itself, using Waveshare's EPD library.
The Python code talks to a server-side application running on Google Cloud, also written in Python: The Flask app responsible for polling a Gmail inbox for new images to display, using Gmail's read-only application programming interface (API), and making them available to the image-processing code on the Raspberry Pi.
The full source code for the project has been published to GitHub, under an unspecified open source license. Simard-Hanley warns those looking to recreate it that they will need the hardware, a Google Developer account with Gmail API, and "a love for trial and error!"