https://github.com/ozh/cadrephoto
ββπΌοΈ Email to photo frame for Raspberry + e-ink. Winner of Github's For The Love Of Code 2025 !
https://github.com/ozh/cadrephoto
e-ink eink fortheloveofcode python raspberry raspberry-pi
Last synced: 3 days ago
JSON representation
ββπΌοΈ Email to photo frame for Raspberry + e-ink. Winner of Github's For The Love Of Code 2025 !
- Host: GitHub
- URL: https://github.com/ozh/cadrephoto
- Owner: ozh
- Created: 2025-08-04T17:42:42.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-10-25T11:43:03.000Z (8 months ago)
- Last Synced: 2026-06-18T20:04:23.335Z (12 days ago)
- Topics: e-ink, eink, fortheloveofcode, python, raspberry, raspberry-pi
- Language: Python
- Homepage:
- Size: 491 KB
- Stars: 21
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - ozh/cadrephoto - ββπΌοΈ Email to photo frame for Raspberry + e-ink. Winner of Github's For The Love Of Code 2025 ! (Python)
README
# ββπΌοΈ Cadrephoto
> An email-to-photo-frame for your Grandma, powered by Raspberry Pi and eink display
**Cadrephoto** (_french for "photo frame"_) is a project that allows you to send photos
on a digital photo frame **via email** : no app needed, no knowledge, perfect for users
of all ages and who may not be tech-savvy.

## π Table of Contents
- [π‘ Features](#-features)
- [π₯οΈ Hardware](#%EF%B8%8F-hardware)
- [βοΈ Installation](#%EF%B8%8F-installation)
- [π§© Setup the service](#-setup-the-service)
- [πΈ Pictures](#-pictures)
- [π Inspiration & License](#-inspiration-and-license)
# π‘ Features κ
The principle is the following:
- Raspberry Pi runs a Python script displaying photos on an eink screen
- It checks at regular intervals for new emails on a given email account
- When a new email with a photo arrives, the photo is displayed on the screen
- Email sender and photo frame owner receive an email notification
- Only the most recent photos are kept, making things ephemeral and an incentive to send newer pics ;)
- Everything is fully configurable via a simple configuration file
The buttons on the frame are used to perform various actions:
- βΊ **Button 1 (short press)** β display next photo (when Grandma wants something new)
- βΊ **Button 2 (long press)** β delete current photo (if Grandma doesnβt like it)
- βΊ **Button 3 (long press)** β debug screens with useful info (for curious Grandpa)
- βΊ **Button 4 (long press)** β clean shutdown of the Raspberry Pi (when Grandma relocates the frame)
# π₯οΈ Hardware κ
- A [Pimoroni Inky Impressions](https://shop.pimoroni.com/products/inky-impression-7-3) eink display (I used the 7.3")
- Any Raspberry Pi (built on a Raspberry Pi Zero 2 so any model should work)
- Obviously all the required stuff to run a Raspberry Pi (power supply, SD card, etc.)
- A case (I slightly hacked an Ikea 13 cm x 18 cm frame to house the screen ; there are also lots of 3D print templates available)
# βοΈ Installation κ
1. You'll want to create a **dedicated email account**, on a server that supports IMAP
and SMTP (most email providers should work) to receive the photos, since the script
will delete all emails after processing them.
(The wow factor with Grandma and her grand kids from having an email such as `photoframe@your-domain.com` is neat ;)
2. Then, dependencies. You'll have to `pip install` the following Python packages:
* [`inky`](https://github.com/pimoroni/inky) (check [this guide](https://learn.pimoroni.com/article/getting-started-with-inky-impression) if you're new to this)
* `pillow`
* `pillow-heif`
* `lgpio` and `gpiod`
* `python-dotenv`
(as always, all packages must be installed in the virtual environment -- I sticked to the
one created by the Pimoroni Inky setup script)
3. Clone this repository, copy the [`.env-example`](https://github.com/ozh/cadrephoto/blob/master/.env-example) file to `.env`, and edit everything
to match your setup.
4. Test the script by running it : `python -u main.py` (in the appropriate virtual environment)
If everything is set up correctly, you can setup the service, see below.
If not, I included a few [tests](https://github.com/ozh/cadrephoto/blob/master/tests/) to help you troubleshoot things.
# π§© Setup the service κ
Once everything is working, you can setup the service, so the script runs automatically
at Raspberry boot, and restarts if it crashes.
1. Create a systemd service file
```bash
$ sudo nano /etc/systemd/system/cadrephoto.service
```
2. Copy the following content into the file and modify it to match paths and user :
```ini
[Unit]
Description=Cadrephoto
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/home/ozh/.virtualenvs/pimoroni/bin/python /home/ozh/cadrephoto/app.py
WorkingDirectory=/home/ozh/cadrephoto
Restart=always
RestartSec=120
User=ozh
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
```
3. Enable and start the service :
```bash
$ sudo systemctl daemon-reload
$ sudo systemctl enable cadrephoto.service
$ sudo systemctl start cadrephoto.service
```
4. You can now :
```bash
# Check the status of the service:
$ sudo systemctl status cadrephoto.service
# Stop the service:
$ sudo systemctl stop cadrephoto.service
# View the logs in real-time:
$ journalctl -u cadrephoto.service -f
```
5. I think it's a good idea to install [`log2ram`](https://github.com/azlux/log2ram) to avoid writing constantly on the
SD card, which is not good for its longevity.
# π· Pictures κ
Photo frame full shot

Button A displays next photo. Button B deletes current photo.
Debug screens
Long Press on Button C displays a debug screen with various info, then another screen with the application log

Shutdown screen

(Customisable message like everything in the project)
# π Inspiration and License κ
This was my first Raspberry Pi project and first Python project π.
Special thanks to projects that inspired me:
* https://github.com/NotmoGit/AstroInky
* https://github.com/tymzd/InkMemories
Any crappy code is mine alone π
Project licensed under the WTF Public License. [](http://www.wtfpl.net/about/)
Feel free to do whatever the hell you want with it.