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.
- 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
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
-
Run the simulator:
python main.py
-
Stop the simulator: Press
Ctrl+Cto gracefully shutdown and see final daily cost
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
- Testing: 2 seconds (current default)
- Production: 300 seconds (5 minutes) - edit
update_intervalinmain.py
Edit rates.py to customize:
- Peak/off-peak hours
- Electricity rates ($/kWh)
- Peak time periods
Edit display_sim.py to adjust:
- LOW: < 1.0 kW (🟢)
- MODERATE: 1.0-2.5 kW (🟡)
- HIGH: > 2.5 kW (🔴)
- Replace
MockPowerFetcherwith real AMP smart meter API - Adapt display output for e-ink screen constraints
- Implement WiFi connectivity and power management
- Add persistent storage for daily cost tracking
- Obtain AMP smart meter API access
- Replace mock data with real meter readings
- Add error handling for network/API failures
- Implement data validation and filtering
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
Personal project for home energy monitoring.