Skip to content

nikopaulanne/nordpool-spot-cutoff-optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nordpool Spot Cutoff Optimizer for Home Assistant

Dynamic load optimization using Nordpool 15-minute spot pricing

Intelligently reduce electricity consumption during price peaks while maintaining comfort and functionality. Save 10-20% on peak electricity costs.

Status: v2.0 rollout in progress on branch release/v2.0.0. See docs updates and DP-based optimizer details in upcoming commits.

🎯 What Is This?

A Python-based optimization engine for Home Assistant that:

  • Analyzes Nordpool 15-minute spot prices
  • Finds optimal cutoff periods (when to reduce load)
  • Calculates preheat and recovery phases
  • Outputs schedule as Home Assistant sensors
  • You integrate it with YOUR specific loads

πŸ’‘ Use Cases

This system can optimize any controllable electrical load:

Load Type Use Case Storage Method
HVAC Heat pumps, AC units Building thermal mass
Water Heating Electric boilers, heat pump water heaters Water tank
EV Charging Smart charging schedules Battery
Pool/Spa Heating and filtration Water thermal mass
Industrial Compressors, refrigeration Process buffers

Key requirement: Your load must tolerate short interruptions or have energy storage capacity.

πŸ“Š How It Works

3-Phase Optimization:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   PREHEAT   β”‚    CUTOFF    β”‚   RECOVERY  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Store       β”‚ Minimize     β”‚ Return to   β”‚
β”‚ energy      β”‚ consumption  β”‚ normal      β”‚
β”‚ (optional)  β”‚ (save €€€)   β”‚ operation   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. Preheat (optional) - Store energy before expensive period
  2. Cutoff - Reduce/stop load during price peaks
  3. Recovery - Gentle return to normal operation

The optimizer finds the globally optimal schedule using Dynamic Programming, testing 100-200 candidates per day.

πŸš€ Quick Start

Prerequisites

  • Home Assistant 2024.10+
  • Nordpool HACS integration with 15-min data enabled
  • Python Scripts integration (python_script: in configuration.yaml)
  • Controllable load (climate entities, switches, etc.)

Installation

  1. Clone this repository

    cd /config/
    git clone https://github.com/nikopaulanne/nordpool-spot-cutoff-optimizer.git
  2. Copy Python script

    cp nordpool-spot-cutoff-optimizer/python_scripts/nordpool_cutoff_optimizer.py /config/python_scripts/
  3. Add configuration (see Part 3 documentation)

  4. Restart Home Assistant

  5. Calibrate parameters (see documentation)

πŸ“š Documentation

3-part series on Home Assistant Community:

  1. Part 1: Theory - Understanding the concept (using HVAC as example)
  2. Part 2: Cutoff Optimizer - Python implementation details
  3. Part 3: Integration Examples - How to integrate with YOUR system

Full documentation also available in docs/ folder.

πŸ“ˆ Real-World Results

HVAC Heating Example (Finland, October 2025):

Date Peak Price Savings Temperature Impact
Oct 1 36.6 c/kWh 35.9% < 0.3Β°C drop
Oct 3 7.66 c/kWh 18.2% < 0.5Β°C drop
Average - 10-20% Minimal

πŸŽ›οΈ Key Configuration Parameters

The optimizer is load-agnostic. Core parameters:

Parameter Default Description
base_price_diff 3.5 c/kWh Minimum price difference for 1h cutoff
max_cutoff_duration 4 hours Maximum cutoff length
preheat_temp_offset +1Β°C Preheat amount (HVAC example)
min_savings_threshold 10% Minimum savings to activate

You calibrate these for YOUR specific system. See calibration guide.

πŸ“‚ Repository Structure

nordpool-spot-cutoff-optimizer/
β”œβ”€β”€ README.md                    # This file
β”œβ”€β”€ docs/                        # Full documentation
β”‚   β”œβ”€β”€ 01-theory.md            # Conceptual background
β”‚   β”œβ”€β”€ 02-cutoff-optimizer.md  # Python implementation
β”‚   └── 03-integration-examples.md  # Setup guides
β”œβ”€β”€ python_scripts/
β”‚   └── nordpool_cutoff_optimizer.py  # Core optimizer
β”œβ”€β”€ examples/
β”‚   β”œβ”€β”€ hvac/                   # HVAC integration example
β”‚   β”œβ”€β”€ water_heater/           # Water heater example
β”‚   └── ...                     # More examples welcome!
└── tools/                      # Calibration & analysis tools

πŸ–ΌοΈ Screenshots

Coming soon: Dashboard examples, results visualization

🀝 Contributing

We need YOUR integration examples!

If you've successfully implemented this for:

  • Different heating/cooling systems
  • Industrial equipment
  • Smart home devices
  • Other creative uses

Please share! Submit a PR with:

  1. Your configuration files
  2. A README explaining your setup
  3. (Optional) Results/screenshots

See CONTRIBUTING.md for guidelines.

πŸ“ License

MIT License - see LICENSE file

⚠️ Disclaimer

This is a scheduling optimizer only. YOU are responsible for:

  • βœ… Safe implementation for your equipment
  • βœ… Respecting manufacturer guidelines
  • βœ… Testing thoroughly before production use
  • βœ… Monitoring system behavior
  • βœ… Ensuring comfort and safety

The authors assume no liability for equipment damage or comfort issues.

πŸ™ Acknowledgments

  • Home Assistant community for feedback and testing
  • Nordpool integration developers
  • All contributors sharing integration examples

οΏ½οΏ½οΏ½ Support & Discussion


⭐ If this project helps you save energy, please star the repository!

πŸ’¬ Share your results and setup in the discussions!