The Photo Frame I Didn't Have Time to Fix
说明与用途
photoframe 现在在 Raspberry Pi 上显示来自 Immich 的照片,具有自动化发布管道,并通过真实硬件测试进行保护。
问题
Google Photos API was cut, leaving photoframe unable to read the library; need to adapt to self-hosted Immich and update OS compatibility.
结果
photoframe now reliably displays photos from Immich on various Raspberry Pi models, with robust error handling, memory optimization, and a fully automated release pipeline guarded by Pi hardware tests.
工作流
- 1. Add Immich API key auth via x-api-key header.
- 2. Map Immich albums to photoframe keywords.
- 3. Create /immichconfig route while preserving existing routes.
- 4. Update Flask error handling in server.py.
- 5. Implement display fallback: use tvservice if available, else fbset and /sys/class/graphics.
- 6. Add memory checks: request preview image, upscale only if /proc/meminfo and ImageMagick limits allow.
- 7. Implement exponential backoff retry for downloads with jitter.
- 8. Handle SIGTERM/SIGINT to blank display and hide credentials.
- 9. Build headless Lite Pi image via pi-gen fork; configure wifi via wifi-config.txt.
- 10. Test on Pi hardware before any push, tag, or release.
- 11. Use automated agents with rules: no unauthorized commits, no route modifications, release gate via PR and Pi test.
证据
Henric Andersson's Raspberry Pi project that pulls random photos from Google Photos and shows them like a picture frame.
In 2025 Google cut the Photos Library API down to photos an app uploaded itself, and a frame that reads your library has nothing left to read.
I self-host Immich. My photos are already there. So the fix was obvious on paper: teach photoframe to talk to Immich.
The first Immich work happened over a weekend in September 2025.
None of those steps is crazy on its own. Together they're a release nobody had run.
Nothing gets pushed, tagged, released, or sent upstream until it's been tested on Pi hardware.
- 记录日期: 2026-10-03T02:41:05.501Z