Skip to content

tomholmesmate/Energy_Display

Repository files navigation

UK-Style Energy Display Simulator

A Python simulation of a UK-style in-home energy display for smart meter data, designed to replicate displays like the Chameleon IHD6. This project helps finalize logic and layout before deploying to ESP32 + e-ink hardware.

Features

  • Real-time Power Monitoring: Simulates fetching power usage data every 2 seconds (configurable)
  • Time-based Pricing: Peak (4-9pm: $0.36/kWh) and off-peak ($0.22/kWh) rate calculations
  • Daily Cost Tracking: Accumulates and displays total cost for the current day
  • Usage Status Indicators: Visual LOW/MODERATE/HIGH usage indicators with emoji status
  • Clean Terminal Display: Formatted dashboard that updates in real-time
  • Modular Design: Easily extensible for real smart meter integration

Project Structure

Energy_Display/
├── main.py              # Main application loop
├── data_fetcher.py      # Mock power data generation
├── rates.py             # Time-based pricing logic
├── display_sim.py       # Terminal dashboard formatter
├── requirements.txt     # Dependencies (none required)
└── README.md           # This file

Quick Start

  1. Run the simulator:

    python main.py
  2. Stop the simulator: Press Ctrl+C to gracefully shutdown and see final daily cost

Usage Patterns

The simulator generates realistic home energy usage patterns:

  • Morning Peak (6-8am): 1.5-2.2x base load
  • Evening Peak (5-9pm): 2.0-3.0x base load
  • Late Evening (10-11pm): 1.2-1.8x base load
  • Overnight/Low (other times): 0.8-1.3x base load

Configuration

Update Intervals

  • Testing: 2 seconds (current default)
  • Production: 300 seconds (5 minutes) - edit update_interval in main.py

Rate Structure

Edit rates.py to customize:

  • Peak/off-peak hours
  • Electricity rates ($/kWh)
  • Peak time periods

Usage Thresholds

Edit display_sim.py to adjust:

  • LOW: < 1.0 kW (🟢)
  • MODERATE: 1.0-2.5 kW (🟡)
  • HIGH: > 2.5 kW (🔴)

Next Steps

ESP32 + E-ink Deployment

  1. Replace MockPowerFetcher with real AMP smart meter API
  2. Adapt display output for e-ink screen constraints
  3. Implement WiFi connectivity and power management
  4. Add persistent storage for daily cost tracking

Real Smart Meter Integration

  1. Obtain AMP smart meter API access
  2. Replace mock data with real meter readings
  3. Add error handling for network/API failures
  4. Implement data validation and filtering

Development

This project uses only Python standard library - no external dependencies required.

Optional development tools (uncomment in requirements.txt):

  • pytest for testing
  • black for code formatting
  • flake8 for linting

License

Personal project for home energy monitoring.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published