Skip to content

Conversation

@mverteuil
Copy link
Owner

Summary

This PR adds support for Waveshare e-paper HAT displays, enabling BirdNET-Pi to show recent detections on low-power e-ink screens.

Key Features

  • E-paper display service: Manages Waveshare 2.13" V4 HAT displays
  • Daemon integration: Background service updates display every 5 minutes
  • Detection display: Shows most recent bird detections with confidence scores
  • SBC installer integration: Automatic installation and service management
  • Configuration: Enable/disable via config file

Supported Hardware

  • Waveshare 2.13" e-Paper HAT (V4)
  • Raspberry Pi with GPIO support
  • 250×122 resolution, 4 grayscale levels

Technical Details

New Components

  • EpaperDisplayService: Core display management with Pillow-based rendering
  • epaper_display_daemon.py: Background daemon for periodic updates
  • Integration with SystemControlService for service lifecycle

Display Layout

  • Header with timestamp
  • Up to 5 recent detections
  • Species name (common and scientific)
  • Confidence percentage
  • Detection time
  • Automatic text wrapping and truncation

Configuration

epaper:
  enabled: true
  update_interval: 300  # seconds

Files Changed

  • 12 files modified
  • 1,165 insertions
  • New module: src/birdnetpi/display/
  • Comprehensive test coverage (600+ lines)

Testing

  • Unit tests for display rendering and layout
  • Daemon lifecycle tests
  • Mock hardware tests (no physical HAT required)
  • All tests passing

Dependencies

Added pillow and RPi.GPIO for e-paper HAT support (optional dependencies, only needed when feature is enabled).

Breaking Changes

None - this is an optional feature that must be explicitly enabled.

Implements e-paper display service for single-board computers with
Waveshare 2-color e-paper HAT. Displays system stats, health status,
and bird detections with animation effect for new detections.

Features:
- System statistics (CPU, memory, disk usage)
- Health status from health check API
- Latest bird detection display
- 3-frame animation cycle for new detections
- Simulation mode (saves PNG when no hardware)
- Optional dependency group for platform-specific libraries

Configuration:
- enable_epaper_display: Enable/disable service
- epaper_refresh_interval: Update frequency in seconds
- epaper_display_type: Display model identifier

Tests: 22 new test cases (75% coverage on service, 95% on daemon)
…ment

- Add birdnetpi-epaper-display.service to systemd service configuration
- Add epaper-display service to SBC services list in system_control.py
- Mark service as optional since not all SBCs have e-paper HAT
- Service will appear in logs page and service control page automatically
- Path resolver fixture may already create data directory
- Prevents FileExistsError in CI
After rebase on main, the data directory is created earlier by fixtures, causing
mkdir to fail without exist_ok flag.
@mverteuil mverteuil merged commit 148a07f into main Oct 21, 2025
3 checks passed
@mverteuil mverteuil deleted the feature/epaperhat branch October 21, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants