8000 GitHub - xamcost/rpi-inky-immich: A simple program to display pictures from an immich server on an Inky e-ink display · GitHub
[go: up one dir, main page]

Skip to content

About

A simple program to display pictures from an immich server on an Inky e-ink display

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

RPi Inky Immich

This project provides a simple way to display images from a remote Immich server on a Raspberry Pi using an Inky e-ink display. In its current form, the script fetches random images from the Immich server and displays them on the Inky display.

By default, it includes a filter on the persons present in the images when querying Immich. Since I have a Inky 7 colour display with 4 buttons, I included some basic button functionality to navigate through images:

  • Button A: Display a new random image containing the persons listed in the IMMICH_PERSON_NAMES environment variable
  • Button B: Display a new random image without any filter
  • Button C: Not used yet!
  • Button D: Shutdown the Raspberry Pi

Getting Started

Prerequisites

You will need to ensure you have the following installed on your Raspberry Pi:

  • Python 3
  • Python dev headers: you can install them using sudo apt-get install python3-dev
  • Python RPi GPIO library: install it using sudo apt-get install python3-rpi.gpio

Other dependencies will be installed via pip (see Installation section).

Moreover, you need to generate an API key from your Immich server to allow the script to access the images. You can do this by logging into your Immich web interface, navigating to your user account settings, and generating a new API key. It only needs the following scopes:

  • asset.read
  • asset.download
  • person.read

I would recommend setting up a virtual environment for this project. You can do this using venv:

python3 -m venv inky-immich-env
source inky-immich-env/bin/activate

Installation

  1. Clone this repository to your Raspberry Pi:
git clone https://github.com/xamcost/rpi-inky-immich
cd rpi-inky-immich
  1. Install the required Python packages:
pip install -r requirements.txt
  1. Export the necessary environment variables. You can do this manually, or you can copy the example.env file to a .env file and edit it accordingly. Then source the .env file:
cp example.env .env
vim .env
source .env
  1. Launch the script:
python main.py

Running on Startup

A run.sh script is provided to facilitate running the program on startup. You can set it up using crontab, or by creating a systemd service. Here's how to do it with systemd:

  1. Make the run.sh script executable:
chmod +x run.sh
  1. Create a new service file from the provided example:
sudo cp example.service /etc/systemd/system/rpi-inky-immich.service
  1. Edit the service file to point to your virtual environment and the project directory:
sudo vim /etc/systemd/system/rpi-inky-immich.service
  1. Enable and start the service:
sudo systemctl enable rpi-inky-immich.service
sudo systemctl start rpi-inky-immich.service

Caveats

There are a few important limitations to be aware of:

  • this program won't work on Raspberry Pi Zero models since it uses pillow-heif to decode HEIC images, which doesn't support ARMv6 architecture. If you don't have HEIC images and want to use a Pi Zero, you can perfectly remove pillow-heif.
  • it has been tested only with Raspberry Pi Compute Module 4. It should work with any RPi 3, 4 or 5 model, but it may need some adjustments.
  • it has been tested only with Inky 7 colour display with 4 buttons. Yet it uses the auto function from the Inky library to detect the display type, so it should work with other Inky models as well, but button functionality may vary.

About

A simple program to display pictures from an immich server on an Inky e-ink display

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0