FrameFi
¶
FrameFi is an application used to display pictures on my digital picture frame using a LILYGO T-Dongle S3. This documentation focuses on how to download images from a Google Photos album using rclone so that the photos can then be synced with the frame.
Workflow¶
- Add pictures to Google Photos album.
- Download pictures from album to homelab.
- Sync photos from homelab to digital picture frame via FrameFi (FTP).
Installation¶
See rclone for rclone installation and FrameFi for how to setup FrameFi on your LILYGO T-Dongle S3.
Configuration path: /opt/frame-fi
Config¶
Before running the download script, you need to configure the .env file and rclone.
Copy the .env.tmpl to .env and then edit the following variables:
RCLONE_GPHOTOS_CLIENT_ID: Your Google API client ID for rclone.RCLONE_GPHOTOS_CLIENT_SECRET: Your Google API client secret for rclone.RCLONE_GPHOTOS_ALBUM_NAME: The exact name of the Google Photos album you wish to download.RCLONE_DOWNLOAD_DESTINATION: The local directory where the downloaded images will be stored. Defaults to${INSTALL_DIR}/images.
Rclone Configuration¶
The download.sh script assumes an rclone remote named gphotos is configured to access Google Photos. If it's not already set up, you will need to configure it interactively using rclone config.
Warning
While the script sets the client ID and secret as environment variables, rclone typically requires an authenticated token for Google Photos. It is highly recommended to run rclone config interactively to set up the gphotos remote and obtain the necessary token.
Warning
Rclone can only download photos from albums that were created by rclone itself. It cannot download from albums created directly in Google Photos or by other applications.
Creating Google Photos Albums with Rclone¶
To create a new Google Photos album that rclone can later download from, use the following command:
Replace "Your New Album Name" with the desired name for your album. Once created, you can upload photos to this album using rclone or manually via the Google Photos interface.
Usage¶
To download images from your configured Google Photos album, simply run the download task:
This will execute the download.sh script, which will:
-
Check for
rclonedependency. -
Load environment variables from
.env. -
Verify or attempt to configure the
gphotosrclone remote. -
Create the Google Photos album if it does not already exist.
-
Create the local destination directory if it doesn't exist.
-
Use
rclone syncto download images from the specified Google Photos album to the local destination.
Automated Downloads (Crontab)¶
To automate the daily download of images, a crontab job can be created using the create-crontab.sh script.
Create Crontab Job¶
Run the following command to create a daily crontab job that executes the download.sh script at 3:00 AM.
Verify Crontab Job¶
To verify that the crontab job has been successfully added, you can list your current crontab entries:
Remove Crontab Job¶
If you need to remove the crontab job, you can edit your crontab and delete the relevant line: