Skip to content

shensquared/dpt-dashboard

Repository files navigation

DPT Dashboard

Repurpose Sony DPT-CP1 e-reader as a monitor sidekick. Displays calendar, weather, reminders, flashcards, and custom data on a low-power e-ink display.

DPT Dashboard Screenshot

Features

  • Calendar integration - Today's events from macOS Calendar
  • Weather - Current conditions and forecast
  • Reminders - macOS Reminders app integration
  • SRS Flashcards - Spaced repetition system for language learning (Japanese/French decks included)
  • Custom data - Optional Home Assistant integration for smart home stats, health metrics, etc.
  • Low power - E-ink display, updates on schedule
  • Auto-refresh - Daemon mode for hands-free updates

Device Setup

Rooting the DPT-CP1

The DPT must be rooted to enable ADB access. Use HappyZ/dpt-tools:

  1. Clone the repo and follow the instructions to exploit the signed update vulnerability
  2. This installs a custom bootloader and enables ADB over WiFi/USB
  3. Once rooted, verify ADB access:
    adb devices

KOReader

The dashboard uses KOReader as the image viewer:

  1. Download KOReader APK for Android
  2. Install via ADB:
    adb install koreader-android-arm64-*.apk
  3. Images are pushed to /sdcard/koreader/ and opened via intent

Installation

Requirements

  • Python 3.10+
  • Pillow
  • ADB in PATH
  • macOS (for Calendar/Reminders integration)
  • Optional: Home Assistant for smart home/health data

Setup

# Create venv
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Configuration

Basic Configuration

Edit src/config.py to customize the dashboard layout and data sources.

Home Assistant Integration (Optional)

If you want to display smart home or health data from Home Assistant:

  1. Set environment variables:

    • HA_URL: Your Home Assistant URL (default: http://homeassistant.local:8123)
    • HA_TOKEN: Long-lived access token from Home Assistant
  2. Customize entities in src/config.py:

    • DASHBOARD_SECTIONS: Configure which entities to display
  3. Health metrics in src/dashboard.py:

    • Search for health_items and customize entity IDs

Without Home Assistant: The dashboard works fine with just calendar, weather, and reminders. Home Assistant sections will show as unavailable.

Usage

Manual Run

# Generate and push once
python run.py

# Generate only (no push)
python run.py --no-push

# Output to specific path
python run.py -o /tmp/dashboard.png

Auto-Refresh Daemon (macOS)

For automatic updates throughout the day:

# Copy the example plist
cp com.example.dpt-dashboard.plist ~/Library/LaunchAgents/com.dpt-dashboard.plist

# Edit paths and optionally HA_TOKEN
nano ~/Library/LaunchAgents/com.dpt-dashboard.plist

# Load and start the service
launchctl load ~/Library/LaunchAgents/com.dpt-dashboard.plist
launchctl start com.dpt-dashboard

# Check status
launchctl list | grep dpt-dashboard

# Stop
launchctl stop com.dpt-dashboard

# Unload
launchctl unload ~/Library/LaunchAgents/com.dpt-dashboard.plist

Default refresh interval: 30 minutes (configurable in plist)

Logs:

  • stdout: /tmp/dpt-dashboard.log
  • stderr: /tmp/dpt-dashboard.err

Dashboard Layout

+-------------------+-------------------+
|   Today's Agenda  |      Weather      |
|   Tue, Jan 07     |      Rainy        |
|                   |      18°C         |
|  10:00 Meeting    |  Inside: 21°C     |
|  14:00 Call       |  Humidity: 45%    |
+-------------------+-------------------+
|    Reminders      |      Health       |
|                   |   (Optional HA)   |
|  • Buy milk       |  Steps: --        |
|  • Call mom       |  Weight: --       |
|  • Pay bills      |  Heart Rate: --   |
+-------------------+-------------------+
|           January 2026                |
|  Su Mo Tu We Th Fr Sa                 |
|            1  2  3  4                 |
|   5  6 [7] 8  9 10 11                 |
|  12 13 14 15 16 17 18                 |
+---------------------------------------+
|  Updated: 09:30:15                    |
+---------------------------------------+

The dashboard is divided into three sections:

  • Top: Today's calendar events (left) and weather with indoor stats (right)
  • Middle: macOS Reminders (left) and optional Health/HA data or flashcard word of the day (right)
  • Bottom: Monthly calendar with today highlighted

Note: The screenshot shows the flashcard version - you can configure which data appears in the right panel.

Flashcard System

The dashboard includes an SRS (Spaced Repetition System) for language learning.

Features

  • SM-2 Algorithm - Proven spaced repetition algorithm
  • Multiple Decks - Japanese (30 words) and French (30 words) included
  • Customizable - Add your own decks in JSON format
  • Progress Tracking - Automatic scheduling based on review performance

Usage

The flashcard manager can run standalone or sync with Home Assistant:

# Standalone mode - CLI review
python flashcard_manager.py --load    # Load next card
python flashcard_manager.py --clear   # Clear display

# Server mode (for HA integration)
python flashcard_manager.py           # Start HTTP server on port 5050

Deck Format

Flashcard decks are JSON files in flashcards/:

{
  "language": "japanese",
  "cards": [
    {
      "id": 1,
      "front": "",
      "back": "dog",
      "pronunciation": "いぬ (inu)",
      "level": "beginner",
      "interval": 1,
      "ease": 2.5,
      "due": "2025-01-20",
      "reviews": 0
    }
  ]
}

Home Assistant Integration (Optional)

The flashcard manager can sync with Home Assistant to display cards on dashboards. See flashcard_manager.py for API details.

Project Structure

  • run.py - Entry point with daemon mode
  • src/config.py - Configuration
  • src/dashboard.py - Dashboard image generation
  • src/push.py - ADB push functionality
  • src/srs.py - Spaced repetition algorithm
  • flashcard_manager.py - Flashcard HTTP server (optional HA sync)
  • flashcards/ - Flashcard deck JSON files (Japanese, French)
  • com.example.dpt-dashboard.plist - Example launchd service
  • weathericons-regular-webfont.ttf - Weather Icons font

Notes

  • Screen: 1404 x 1872 pixels (portrait)
  • Images are PNG, grayscale
  • KOReader displays images best in portrait orientation
  • Compatible with other Android e-ink devices with ADB access

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages