- Batch-fetch asset IDs in deep sleep mode with NVS caching to reduce
network calls and improve battery life (configurable batch size 1-50)
- Add wake_log module: persistent CSV log of each photo cycle surviving
reboots and deep sleep, with download/clear via web UI
- Add browser-based log viewer and log comparison tools (tools/)
- Update .gitignore to exclude .cursor/, chat-summaries/, wake_*.csv,
and .DS_Store
Co-authored-by: Cursor <cursoragent@cursor.com>
Without configTime(), the ESP32 DNS subsystem isn't properly
initialized after WiFi connect, causing HTTPS hostname resolution
to fail silently in the deep sleep wake path. The fix calls
configTime() fire-and-forget (non-blocking, <1ms) which initializes
DNS without the 5-second NTP wait.
Co-authored-by: Cursor <cursoragent@cursor.com>
Adds a 'Sync Time' button in the Device Actions section that calls
POST /api/action/sync-time to trigger NTP sync and RTC write.
Co-authored-by: Cursor <cursoragent@cursor.com>
Allows triggering NTP sync + hardware RTC write from the web UI,
useful for periodic manual time correction (e.g., every 30 days
or when charging).
Co-authored-by: Cursor <cursoragent@cursor.com>
The syncNTP() call blocks up to 5 seconds waiting for NTP response on
every deep sleep wake cycle (every 10 minutes). Combined with mDNS
startup, this added significant active WiFi time per cycle.
Fix: Add 'minimal' flag to WiFiManager::begin()/startStation(). In
the deep sleep wake path, skip NTP sync and mDNS entirely. The system
clock is already seeded from the hardware RTC at boot, which is
accurate enough for 30-day date window calculations.
Normal interactive boot still does full NTP sync + mDNS as before.
Co-authored-by: Cursor <cursoragent@cursor.com>
Refactor timerWakeCycle() to fetch a single random photo per wake
using cycle-mode-aware server-side filtering via Immich's
POST /api/search/random endpoint.
Changes:
- Add fetchOneRandomAssetId() to ImmichClient with support for
isFavorite, takenAfter, takenBefore filter parameters
- Add timer_last_date NVS field for chronological cursor persistence
- Implement probabilistic filter selection per cycle mode:
- Random: unfiltered size=1
- Chronological/ReverseChronological: date cursor in NVS
- FavoritesWeighted: 66% favorites, 33% unfiltered
- WeightedChronological: 66% recent (30d), 33% unfiltered
- WeightedReverseChronological: 66% older (30d), 33% unfiltered
- Add retry loop with filter relaxation on empty results
- Initialize hardware RTC (RX8130CE) firmware-wide:
- Seed system clock from RTC at boot (immediate time)
- NTP sync after WiFi connect, write back to RTC
- Add time_utils.h with isoNow(), isoNowMinus30d(), hasValidTime()
Normal mode (PhotoQueue + displayTask) is completely untouched.
Co-authored-by: Cursor <cursoragent@cursor.com>
Album selection now controls which photos are displayed.
Uses POST /api/search/random with albumIds filter (Immich v3
compatible) instead of the removed GET /api/albums/{id} assets.
- Add albumIds parameter to fetchRandomAssets/fetchRandomAssetIds
- syncFromAlbums: fetch random assets filtered by selected albums
- syncFromAllPhotos: preserve existing global random behavior
- Album mode reshuffles on exhaustion instead of re-fetching
- 24h resync checks album assetCounts for changes before re-fetch
- requestSync + albums_changed action triggers queue rebuild on save
- timerWakeCycle respects album selection
- Discard stale pre-renders on album change
Co-authored-by: Cursor <cursoragent@cursor.com>
Refactor displayTask() into two phases: display and pre-render.
After showing a photo, the next one is immediately downloaded,
decoded, and dithered into a pending framebuffer (~240KB PSRAM).
When the slideshow timer fires, the EPD refresh starts instantly
without the previous 2-5s pipeline delay.
- Add PendingPhoto struct with settings hash for staleness guard
- Extract displayPhoto() and prepareNextPhoto() helpers
- Manual next/random discards pre-render and goes inline
- Falls back to inline pipeline if pre-render unavailable
- No changes to ImagePipeline, DisplayManager, or other modules
Co-authored-by: Cursor <cursoragent@cursor.com>
Presets are now [1, 2, 5, 10, 15, 30, 60] minutes. A 'Custom' button
reveals a number input clamped to 1–60 minutes. Backend also clamps
the received value with constrain(v, 1, 60) for safety.
Co-authored-by: Cursor <cursoragent@cursor.com>
Shift icons up 1px to better match the text midline, and increase
ICON_GAP from 4 to 6 for more breathing room between icon and text.
Co-authored-by: Cursor <cursoragent@cursor.com>
Draw pin icon on the location badge and calendar icon on the
datetime badge when displaying a single photo (not side-by-side).
Icons are rendered using M5GFX shape primitives (fillCircle,
fillTriangle, drawRect, fillRect, drawLine) - no bitmap data needed.
Icons only appear when regionW == DISPLAY_WIDTH to avoid cluttering
the narrower badges used for portrait-pair layouts.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Location gets its own badge in the lower-left corner (separate from
the main date/time/people/camera badge at the configured position)
- All overlay badges now use rounded corners (radius 4px) via
fillRoundRect instead of fillRect
- New setting: 'Translucent background?' checkbox in web UI
When enabled, badge backgrounds use a checkerboard pattern (every
other pixel black) instead of solid black, creating a 50% opacity
effect that lets the underlying image show through
- Refactored all badge drawing through a single drawOverlayBadge()
helper (metadata, sleep indicator, battery indicator)
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the PALETTE_565 + writePixel loop with a bgr888_t palette whose
values exactly match Panel_ED2208's internal epd_palette, pushed via a
single pushImage() call.
Benefits:
- Eliminates ~240K individual writePixel calls per frame
- Zero-distance palette values guarantee correct color mapping
- Removes lossy RGB565 intermediate encoding
- Remove unused paletteToColor565() helper
Also adds informational comment to triggerRefresh() noting that
Panel_ED2208::_exec_transfer always sends the full 400x600 frame.
Co-authored-by: Cursor <cursoragent@cursor.com>
Root cause: Panel_ED2208's epd_quality mode applies _dither_row_rgb_pair
(diagonal bias pattern with dither=140) during _exec_transfer(). Since our
ImagePipeline already does proper Floyd-Steinberg dithering, the driver's
additional dithering was creating visible diagonal artifacts.
Fix: setEpdMode(epd_fastest) selects _dither_row_none (clean nearest-color
lookup, no spatial bias). On Panel_ED2208 this only affects the dither
function — NOT refresh quality or waveform.
Also: default dither_noise setting to OFF since error scatter was targeting
the wrong layer (it made gradient areas fuzzier without fixing the real
problem in the display driver).
Co-authored-by: Cursor <cursoragent@cursor.com>
- Letterbox: extend edge pixels outward with blur + fade to solid color
- Portrait: detect and pair portraits side-by-side, fallback to solo
- Metadata: add overlay mode (corner badge), time field, custom date/time
format strings (strftime), font size 1.5x, region-aware for pairs
- Buttons: swap G9/G10 to match physical layout, double-press random
button for deep sleep, SLP indicator drawn before sleep
- Boot: remove redundant 'Loading photos' screen (saves 17s refresh)
Co-authored-by: Cursor <cursoragent@cursor.com>
- Replace center-crop with fit-contain (no photo cropping)
- Letterbox bars filled with adjacent edge average color
- Queue fetches in batches until 50 usable assets
- Auto-refill queue on exhaustion, dedup via shown history
- Filter RAW files from asset selection
Co-authored-by: Cursor <cursoragent@cursor.com>