EMHASS

Energy Management for Home Assistant

#

PyPI - Version Conda - Version EMHASS GitHub Workflow Status GitHub PyPI - Python Version PyPI - Status Read the Docs SonarQube security rating SonarQube security Vulnerabilities SonarQube reliability SonarQube bugs

Optimize your home energy usage automatically

Let's make a better use of energy!

EMHASS is a Python module designed to optimize your home energy interfacing with Home Assistant.

๐Ÿš€ Quick Start ยท โš™๏ธ Configuration ยท ๐Ÿ’ป API Reference

๐Ÿ—ฃ๏ธ Community ยท ๐Ÿ› ๏ธ Issues ยท ๐Ÿงฉ Home Assistant Add-on


๐Ÿ’ฐ Cost Optimization

Save money by scheduling loads during low-cost tariff periods or high PV production windows using Linear Programming.

An EMS based on Linear Programming
โ˜€๏ธ Solar Forecasting

Integrate PV forecasts to make smarter decisions about when to charge your battery or run heavy appliances.

The forecast module
๐Ÿค– Machine Learning

Advanced load forecasting using scikit-learn models to predict your householdโ€™s future consumption behavior.

The machine learning forecaster
๐Ÿ”ฅ Thermal Models

Manage thermal inertia for water heaters and heat pumps effectively to act as thermal energy storage.

Deferrable load thermal model
๐Ÿ”Œ Home Assistant

Seamless integration. Retrieve sensor data directly from Home Assistant and publish optimized schedules back.

Quick start: Configuration and Installation
๐Ÿณ Docker & Add-on

Run easily as a Home Assistant Add-on or a standalone Docker container.

Installation Methods

๐Ÿš€ Under the Hood

The latest EMHASS core has been completely re-engineered for speed and stability.
โšก Turbocharged Performance

The optimization engine has been rewritten using CVXPY and vectorization. Benchmarks show optimization times are 4-5x faster (approx. 0.1s per iteration).

๐ŸŽ๏ธ Next-Gen Solvers

We have adopted HiGHS as the default: a state-of-the-art, open-source linear solver offering superior stability.

๐Ÿ“ฆ Simplified Deployment

No more system-level dependencies! Because the new solver stack is bundled as Python wheels, the Docker image is lighter, and installation is more robust.

๐Ÿ—๏ธ Modular Architecture

The codebase now features a modular architecture with testable helper methods. This improves maintainability and code updates reliability.

Quick overview of EMHASS

The EMHASS workflow

โค๏ธ Acknowledgements & Inspirations

We gratefully acknowledge the following projects that inspired this work or provide the critical foundations for our optimization engine:

  • OMEGAlpes: For the initial inspiration on energy systems modeling and linear programming formulations. Docs

  • CVXPY: For the powerful, convex optimization modeling language that powers our new vectorized backend. Website

  • HiGHS: For the high-performance, open-source linear optimization solver now standard in EMHASS. Website

  • skforecast: For the robust machine learning framework used in our forecasting modules. Docs