emhass 0.15.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of emhass might be problematic. Click here for more details.
- emhass-0.15.4/.gitignore +171 -0
- emhass-0.15.4/LICENSE +9 -0
- emhass-0.15.4/PKG-INFO +164 -0
- emhass-0.15.4/README.md +99 -0
- emhass-0.15.4/pyproject.toml +123 -0
- emhass-0.15.4/src/emhass/__init__.py +0 -0
- emhass-0.15.4/src/emhass/command_line.py +2386 -0
- emhass-0.15.4/src/emhass/connection_manager.py +108 -0
- emhass-0.15.4/src/emhass/data/associations.csv +98 -0
- emhass-0.15.4/src/emhass/data/cec_inverters.pbz2 +0 -0
- emhass-0.15.4/src/emhass/data/cec_modules.pbz2 +0 -0
- emhass-0.15.4/src/emhass/data/config_defaults.json +120 -0
- emhass-0.15.4/src/emhass/forecast.py +1759 -0
- emhass-0.15.4/src/emhass/img/emhass_icon.png +0 -0
- emhass-0.15.4/src/emhass/machine_learning_forecaster.py +658 -0
- emhass-0.15.4/src/emhass/machine_learning_regressor.py +291 -0
- emhass-0.15.4/src/emhass/optimization.py +2028 -0
- emhass-0.15.4/src/emhass/retrieve_hass.py +1323 -0
- emhass-0.15.4/src/emhass/static/advanced.html +43 -0
- emhass-0.15.4/src/emhass/static/basic.html +14 -0
- emhass-0.15.4/src/emhass/static/configuration_list.html +48 -0
- emhass-0.15.4/src/emhass/static/configuration_script.js +956 -0
- emhass-0.15.4/src/emhass/static/data/param_definitions.json +592 -0
- emhass-0.15.4/src/emhass/static/img/emhass_icon.png +0 -0
- emhass-0.15.4/src/emhass/static/img/emhass_logo_short.svg +544 -0
- emhass-0.15.4/src/emhass/static/img/feather-sprite.svg +1 -0
- emhass-0.15.4/src/emhass/static/script.js +474 -0
- emhass-0.15.4/src/emhass/static/style.css +1371 -0
- emhass-0.15.4/src/emhass/templates/configuration.html +77 -0
- emhass-0.15.4/src/emhass/templates/index.html +79 -0
- emhass-0.15.4/src/emhass/templates/template.html +4 -0
- emhass-0.15.4/src/emhass/utils.py +2331 -0
- emhass-0.15.4/src/emhass/web_server.py +895 -0
- emhass-0.15.4/src/emhass/websocket_client.py +224 -0
emhass-0.15.4/.gitignore
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# ---> Python
|
|
2
|
+
test.py
|
|
3
|
+
# Legacy config yaml file
|
|
4
|
+
config_emhass.yaml
|
|
5
|
+
# Secret yaml file
|
|
6
|
+
secrets_emhass.yaml
|
|
7
|
+
# config json file
|
|
8
|
+
**/config.json
|
|
9
|
+
*.tar
|
|
10
|
+
.vscode/*
|
|
11
|
+
.vscode/launch.json
|
|
12
|
+
.vscode/settings.json
|
|
13
|
+
.vscode/tasks.json
|
|
14
|
+
.devcontainer/devcontainer.json
|
|
15
|
+
*.pkl
|
|
16
|
+
**/app
|
|
17
|
+
.cache.sqlite
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# Byte-compiled / optimized / DLL files
|
|
21
|
+
__pycache__/
|
|
22
|
+
*.py[cod]
|
|
23
|
+
*$py.class
|
|
24
|
+
|
|
25
|
+
# C extensions
|
|
26
|
+
*.so
|
|
27
|
+
|
|
28
|
+
# Distribution / packaging
|
|
29
|
+
.Python
|
|
30
|
+
build/
|
|
31
|
+
develop-eggs/
|
|
32
|
+
dist/
|
|
33
|
+
downloads/
|
|
34
|
+
eggs/
|
|
35
|
+
.eggs/
|
|
36
|
+
lib/
|
|
37
|
+
lib64/
|
|
38
|
+
parts/
|
|
39
|
+
sdist/
|
|
40
|
+
var/
|
|
41
|
+
wheels/
|
|
42
|
+
share/python-wheels/
|
|
43
|
+
*.egg-info/
|
|
44
|
+
.installed.cfg
|
|
45
|
+
*.egg
|
|
46
|
+
MANIFEST
|
|
47
|
+
|
|
48
|
+
# Local session data
|
|
49
|
+
data/actionLogs.txt
|
|
50
|
+
data/debug-*.csv
|
|
51
|
+
data/cached-open-meteo-forecast*.json
|
|
52
|
+
data/entities/*.json
|
|
53
|
+
|
|
54
|
+
# PyInstaller
|
|
55
|
+
# Usually these files are written by a python script from a template
|
|
56
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
57
|
+
*.manifest
|
|
58
|
+
*.spec
|
|
59
|
+
|
|
60
|
+
# Installer logs
|
|
61
|
+
pip-log.txt
|
|
62
|
+
pip-delete-this-directory.txt
|
|
63
|
+
uv.lock
|
|
64
|
+
|
|
65
|
+
# Unit test / coverage reports
|
|
66
|
+
htmlcov/
|
|
67
|
+
.tox/
|
|
68
|
+
.nox/
|
|
69
|
+
.coverage
|
|
70
|
+
.coverage.*
|
|
71
|
+
.cache
|
|
72
|
+
nosetests.xml
|
|
73
|
+
coverage.xml
|
|
74
|
+
*.cover
|
|
75
|
+
*.py,cover
|
|
76
|
+
.hypothesis/
|
|
77
|
+
.pytest_cache/
|
|
78
|
+
cover/
|
|
79
|
+
|
|
80
|
+
# Translations
|
|
81
|
+
*.mo
|
|
82
|
+
*.pot
|
|
83
|
+
|
|
84
|
+
# Django stuff:
|
|
85
|
+
*.log
|
|
86
|
+
local_settings.py
|
|
87
|
+
db.sqlite3
|
|
88
|
+
db.sqlite3-journal
|
|
89
|
+
|
|
90
|
+
# Flask stuff:
|
|
91
|
+
instance/
|
|
92
|
+
.webassets-cache
|
|
93
|
+
|
|
94
|
+
# Scrapy stuff:
|
|
95
|
+
.scrapy
|
|
96
|
+
|
|
97
|
+
# Sphinx documentation
|
|
98
|
+
docs/_build/
|
|
99
|
+
|
|
100
|
+
# PyBuilder
|
|
101
|
+
.pybuilder/
|
|
102
|
+
target/
|
|
103
|
+
|
|
104
|
+
# Jupyter Notebook
|
|
105
|
+
.ipynb_checkpoints
|
|
106
|
+
|
|
107
|
+
# IPython
|
|
108
|
+
profile_default/
|
|
109
|
+
ipython_config.py
|
|
110
|
+
|
|
111
|
+
# pyenv
|
|
112
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
113
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
114
|
+
# .python-version
|
|
115
|
+
|
|
116
|
+
# pipenv
|
|
117
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
118
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
119
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
120
|
+
# install all needed dependencies.
|
|
121
|
+
#Pipfile.lock
|
|
122
|
+
|
|
123
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
124
|
+
__pypackages__/
|
|
125
|
+
|
|
126
|
+
# Celery stuff
|
|
127
|
+
celerybeat-schedule
|
|
128
|
+
celerybeat.pid
|
|
129
|
+
|
|
130
|
+
# SageMath parsed files
|
|
131
|
+
*.sage.py
|
|
132
|
+
|
|
133
|
+
# Environments
|
|
134
|
+
.env
|
|
135
|
+
.venv
|
|
136
|
+
env/
|
|
137
|
+
venv/
|
|
138
|
+
ENV/
|
|
139
|
+
env.bak/
|
|
140
|
+
venv.bak/
|
|
141
|
+
venvemhass/
|
|
142
|
+
|
|
143
|
+
# Spyder project settings
|
|
144
|
+
.spyderproject
|
|
145
|
+
.spyproject
|
|
146
|
+
|
|
147
|
+
# Rope project settings
|
|
148
|
+
.ropeproject
|
|
149
|
+
|
|
150
|
+
# mkdocs documentation
|
|
151
|
+
/site
|
|
152
|
+
|
|
153
|
+
# mypy
|
|
154
|
+
.mypy_cache/
|
|
155
|
+
.dmypy.json
|
|
156
|
+
dmypy.json
|
|
157
|
+
|
|
158
|
+
# Pyre type checker
|
|
159
|
+
.pyre/
|
|
160
|
+
|
|
161
|
+
# pytype static type analyzer
|
|
162
|
+
.pytype/
|
|
163
|
+
|
|
164
|
+
# Cython debug symbols
|
|
165
|
+
cython_debug/
|
|
166
|
+
|
|
167
|
+
docs/EMHASS_presentation.pdf
|
|
168
|
+
|
|
169
|
+
# DS_Store files
|
|
170
|
+
*/.DS_Store
|
|
171
|
+
.DS_Store
|
emhass-0.15.4/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-2022 David HERNANDEZ
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
emhass-0.15.4/PKG-INFO
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: emhass
|
|
3
|
+
Version: 0.15.4
|
|
4
|
+
Summary: An Energy Management System for Home Assistant
|
|
5
|
+
Project-URL: Homepage, https://github.com/davidusb-geek/emhass
|
|
6
|
+
Project-URL: Source, https://github.com/davidusb-geek/emhass
|
|
7
|
+
Project-URL: Issues, https://github.com/davidusb-geek/emhass/issues
|
|
8
|
+
Project-URL: Documentation, https://emhass.readthedocs.io/en/latest/
|
|
9
|
+
Project-URL: Community, https://community.home-assistant.io/t/emhass-an-energy-management-for-home-assistant
|
|
10
|
+
Author-email: David HERNANDEZ TORRES <davidusb@gmail.com>
|
|
11
|
+
License: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: energy,hass,management,optimization
|
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Requires-Python: <3.13,>=3.10
|
|
24
|
+
Requires-Dist: aiofiles
|
|
25
|
+
Requires-Dist: aiohttp
|
|
26
|
+
Requires-Dist: asyncio
|
|
27
|
+
Requires-Dist: gunicorn>=23.0.0
|
|
28
|
+
Requires-Dist: h5py>=3.12.1
|
|
29
|
+
Requires-Dist: highspy>=1.10.0
|
|
30
|
+
Requires-Dist: influxdb>=5.3.1
|
|
31
|
+
Requires-Dist: jinja2
|
|
32
|
+
Requires-Dist: numpy<2.3.0,>=2.0.0
|
|
33
|
+
Requires-Dist: orjson
|
|
34
|
+
Requires-Dist: pandas>=2.2.0
|
|
35
|
+
Requires-Dist: plotly>=6.0.0
|
|
36
|
+
Requires-Dist: protobuf>=5.29.3
|
|
37
|
+
Requires-Dist: pulp>=2.8.0
|
|
38
|
+
Requires-Dist: pvlib>=0.11.0
|
|
39
|
+
Requires-Dist: pytz>=2024.2
|
|
40
|
+
Requires-Dist: pyyaml>=6.0.2
|
|
41
|
+
Requires-Dist: quart
|
|
42
|
+
Requires-Dist: scipy>=1.15.0
|
|
43
|
+
Requires-Dist: skforecast<0.20.0,>=0.19.1
|
|
44
|
+
Requires-Dist: tables>=3.10.0
|
|
45
|
+
Requires-Dist: uvicorn>=0.30.0
|
|
46
|
+
Requires-Dist: waitress>=3.0.2
|
|
47
|
+
Requires-Dist: websockets
|
|
48
|
+
Provides-Extra: dev
|
|
49
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
50
|
+
Provides-Extra: docs
|
|
51
|
+
Requires-Dist: myst-parser; extra == 'docs'
|
|
52
|
+
Requires-Dist: pydata-sphinx-theme; extra == 'docs'
|
|
53
|
+
Requires-Dist: sphinx; extra == 'docs'
|
|
54
|
+
Requires-Dist: sphinx-design; extra == 'docs'
|
|
55
|
+
Provides-Extra: test
|
|
56
|
+
Requires-Dist: aioresponses; extra == 'test'
|
|
57
|
+
Requires-Dist: coverage; extra == 'test'
|
|
58
|
+
Requires-Dist: hatchling; extra == 'test'
|
|
59
|
+
Requires-Dist: pytest; extra == 'test'
|
|
60
|
+
Requires-Dist: pytz; extra == 'test'
|
|
61
|
+
Requires-Dist: ruff; extra == 'test'
|
|
62
|
+
Requires-Dist: snakeviz; extra == 'test'
|
|
63
|
+
Requires-Dist: tabulate; extra == 'test'
|
|
64
|
+
Description-Content-Type: text/markdown
|
|
65
|
+
|
|
66
|
+
<div align="center">
|
|
67
|
+
<br>
|
|
68
|
+
<img alt="EMHASS" src="https://raw.githubusercontent.com/davidusb-geek/emhass/master/docs/images/logo_docs.png" width="700px">
|
|
69
|
+
<h1>Energy Management for Home Assistant</h1>
|
|
70
|
+
<strong></strong>
|
|
71
|
+
</div>
|
|
72
|
+
<br>
|
|
73
|
+
|
|
74
|
+
<p align="center">
|
|
75
|
+
<a style="text-decoration:none" href="https://pypi.org/project/emhass/">
|
|
76
|
+
<img alt="PyPI - Version" src="https://img.shields.io/pypi/v/emhass">
|
|
77
|
+
</a>
|
|
78
|
+
<a style="text-decoration:none" href="https://anaconda.org/channels/davidusb/packages/emhass/overview">
|
|
79
|
+
<img alt="Conda - Version" src="https://img.shields.io/conda/v/davidusb/emhass">
|
|
80
|
+
</a>
|
|
81
|
+
<a style="text-decoration:none" href="https://github.com/davidusb-geek/emhass/actions">
|
|
82
|
+
<img alt="EMHASS GitHub Workflow Status" src="https://github.com/davidusb-geek/emhass/actions/workflows/publish_docker.yaml/badge.svg?event=release">
|
|
83
|
+
</a>
|
|
84
|
+
<a style="text-decoration:none" href="https://github.com/davidusb-geek/emhass/blob/master/LICENSE">
|
|
85
|
+
<img alt="GitHub" src="https://img.shields.io/github/license/davidusb-geek/emhass">
|
|
86
|
+
</a>
|
|
87
|
+
<a style="text-decoration:none" href="https://pypi.org/project/emhass/">
|
|
88
|
+
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/emhass">
|
|
89
|
+
</a>
|
|
90
|
+
<a style="text-decoration:none" href="https://pypi.org/project/emhass/">
|
|
91
|
+
<img alt="PyPI - Status" src="https://img.shields.io/pypi/status/emhass">
|
|
92
|
+
</a>
|
|
93
|
+
<a style="text-decoration:none" href="https://emhass.readthedocs.io/en/latest/">
|
|
94
|
+
<img alt="Read the Docs" src="https://img.shields.io/readthedocs/emhass">
|
|
95
|
+
</a>
|
|
96
|
+
<a hstyle="text-decoration:none" ref="https://codecov.io/github/davidusb-geek/emhass" >
|
|
97
|
+
<img src="https://codecov.io/github/davidusb-geek/emhass/branch/master/graph/badge.svg?token=BW7KSCHN90"/>
|
|
98
|
+
</a>
|
|
99
|
+
<a hstyle="text-decoration:none" ref="https://github.com/davidusb-geek/emhass/actions/workflows/codeql.yml" >
|
|
100
|
+
<img src="https://github.com/davidusb-geek/emhass/actions/workflows/codeql.yml/badge.svg?branch=master&event=schedule"/>
|
|
101
|
+
</a>
|
|
102
|
+
<a style="text-decoration:none" href="https://sonarcloud.io/summary/new_code?id=davidusb-geek_emhass">
|
|
103
|
+
<img alt="SonarQube security rating" src="https://sonarcloud.io/api/project_badges/measure?project=davidusb-geek_emhass&metric=security_rating">
|
|
104
|
+
</a>
|
|
105
|
+
<a style="text-decoration:none" href="https://sonarcloud.io/summary/new_code?id=davidusb-geek_emhass">
|
|
106
|
+
<img alt="SonarQube security Vulnerabilities" src="https://sonarcloud.io/api/project_badges/measure?project=davidusb-geek_emhass&metric=vulnerabilities">
|
|
107
|
+
</a>
|
|
108
|
+
<a style="text-decoration:none" href="https://sonarcloud.io/summary/new_code?id=davidusb-geek_emhass">
|
|
109
|
+
<img alt="SonarQube reliability" src="https://sonarcloud.io/api/project_badges/measure?project=davidusb-geek_emhass&metric=reliability_rating">
|
|
110
|
+
</a>
|
|
111
|
+
<a style="text-decoration:none" href="https://sonarcloud.io/summary/new_code?id=davidusb-geek_emhass">
|
|
112
|
+
<img alt="SonarQube bugs" src="https://sonarcloud.io/api/project_badges/measure?project=davidusb-geek_emhass&metric=bugs">
|
|
113
|
+
</a>
|
|
114
|
+
|
|
115
|
+
</p>
|
|
116
|
+
|
|
117
|
+
<div align="center">
|
|
118
|
+
<a style="text-decoration:none" href="https://emhass.readthedocs.io/en/latest/">
|
|
119
|
+
<img src="https://raw.githubusercontent.com/davidusb-geek/emhass/master/docs/images/Documentation_button.svg" alt="Documentation">
|
|
120
|
+
</a>
|
|
121
|
+
<a style="text-decoration:none" href="https://community.home-assistant.io/t/emhass-an-energy-management-for-home-assistant/338126">
|
|
122
|
+
<img src="https://raw.githubusercontent.com/davidusb-geek/emhass/master/docs/images/Community_button.svg" alt="Community">
|
|
123
|
+
</a>
|
|
124
|
+
<a style="text-decoration:none" href="https://github.com/davidusb-geek/emhass/issues">
|
|
125
|
+
<img src="https://raw.githubusercontent.com/davidusb-geek/emhass/master/docs/images/Issues_button.svg" alt="Issues">
|
|
126
|
+
</a>
|
|
127
|
+
<a style="text-decoration:none" href="https://github.com/davidusb-geek/emhass-add-on">
|
|
128
|
+
<img src="https://raw.githubusercontent.com/davidusb-geek/emhass/master/docs/images/EMHASS_Add_on_button.svg" alt="EMHASS Add-on">
|
|
129
|
+
</a>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<br>
|
|
133
|
+
<p align="left">
|
|
134
|
+
EMHASS is a Python module designed to optimize your home energy interfacing with Home Assistant.
|
|
135
|
+
</p>
|
|
136
|
+
|
|
137
|
+
## Introduction
|
|
138
|
+
|
|
139
|
+
EMHASS (Energy Management for Home Assistant) is an optimization tool designed for residential households. The package uses a Linear Programming approach to optimize energy usage while considering factors such as electricity prices, power generation from solar panels, and energy storage from batteries. EMHASS provides a high degree of configurability, making it easy to integrate with Home Assistant and other smart home systems. Whether you have solar panels, energy storage, or just a controllable load, EMHASS can provide an optimized daily schedule for your devices, allowing you to save money and minimize your environmental impact.
|
|
140
|
+
|
|
141
|
+
The complete documentation for this package is [available here](https://emhass.readthedocs.io/en/latest/).
|
|
142
|
+
|
|
143
|
+
To get started you can follow our [🚀 Quick Start](/docs/quick_start.md) guide in the documentation.
|
|
144
|
+
|
|
145
|
+
Here are the guides for:
|
|
146
|
+
- [📦 Installation methods](/docs/installation_methods)
|
|
147
|
+
- [📖 Usage](/docs/usage_guide)
|
|
148
|
+
- [🤖 Home Assistant Automations](automations)
|
|
149
|
+
|
|
150
|
+
## Development
|
|
151
|
+
|
|
152
|
+
Pull requests are very much accepted on this project. For development, you can find some instructions here [Development](https://emhass.readthedocs.io/en/latest/develop.html).
|
|
153
|
+
|
|
154
|
+
## License
|
|
155
|
+
|
|
156
|
+
MIT License
|
|
157
|
+
|
|
158
|
+
Copyright (c) 2021-2025 David HERNANDEZ
|
|
159
|
+
|
|
160
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
161
|
+
|
|
162
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
163
|
+
|
|
164
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
emhass-0.15.4/README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<br>
|
|
3
|
+
<img alt="EMHASS" src="https://raw.githubusercontent.com/davidusb-geek/emhass/master/docs/images/logo_docs.png" width="700px">
|
|
4
|
+
<h1>Energy Management for Home Assistant</h1>
|
|
5
|
+
<strong></strong>
|
|
6
|
+
</div>
|
|
7
|
+
<br>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a style="text-decoration:none" href="https://pypi.org/project/emhass/">
|
|
11
|
+
<img alt="PyPI - Version" src="https://img.shields.io/pypi/v/emhass">
|
|
12
|
+
</a>
|
|
13
|
+
<a style="text-decoration:none" href="https://anaconda.org/channels/davidusb/packages/emhass/overview">
|
|
14
|
+
<img alt="Conda - Version" src="https://img.shields.io/conda/v/davidusb/emhass">
|
|
15
|
+
</a>
|
|
16
|
+
<a style="text-decoration:none" href="https://github.com/davidusb-geek/emhass/actions">
|
|
17
|
+
<img alt="EMHASS GitHub Workflow Status" src="https://github.com/davidusb-geek/emhass/actions/workflows/publish_docker.yaml/badge.svg?event=release">
|
|
18
|
+
</a>
|
|
19
|
+
<a style="text-decoration:none" href="https://github.com/davidusb-geek/emhass/blob/master/LICENSE">
|
|
20
|
+
<img alt="GitHub" src="https://img.shields.io/github/license/davidusb-geek/emhass">
|
|
21
|
+
</a>
|
|
22
|
+
<a style="text-decoration:none" href="https://pypi.org/project/emhass/">
|
|
23
|
+
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/emhass">
|
|
24
|
+
</a>
|
|
25
|
+
<a style="text-decoration:none" href="https://pypi.org/project/emhass/">
|
|
26
|
+
<img alt="PyPI - Status" src="https://img.shields.io/pypi/status/emhass">
|
|
27
|
+
</a>
|
|
28
|
+
<a style="text-decoration:none" href="https://emhass.readthedocs.io/en/latest/">
|
|
29
|
+
<img alt="Read the Docs" src="https://img.shields.io/readthedocs/emhass">
|
|
30
|
+
</a>
|
|
31
|
+
<a hstyle="text-decoration:none" ref="https://codecov.io/github/davidusb-geek/emhass" >
|
|
32
|
+
<img src="https://codecov.io/github/davidusb-geek/emhass/branch/master/graph/badge.svg?token=BW7KSCHN90"/>
|
|
33
|
+
</a>
|
|
34
|
+
<a hstyle="text-decoration:none" ref="https://github.com/davidusb-geek/emhass/actions/workflows/codeql.yml" >
|
|
35
|
+
<img src="https://github.com/davidusb-geek/emhass/actions/workflows/codeql.yml/badge.svg?branch=master&event=schedule"/>
|
|
36
|
+
</a>
|
|
37
|
+
<a style="text-decoration:none" href="https://sonarcloud.io/summary/new_code?id=davidusb-geek_emhass">
|
|
38
|
+
<img alt="SonarQube security rating" src="https://sonarcloud.io/api/project_badges/measure?project=davidusb-geek_emhass&metric=security_rating">
|
|
39
|
+
</a>
|
|
40
|
+
<a style="text-decoration:none" href="https://sonarcloud.io/summary/new_code?id=davidusb-geek_emhass">
|
|
41
|
+
<img alt="SonarQube security Vulnerabilities" src="https://sonarcloud.io/api/project_badges/measure?project=davidusb-geek_emhass&metric=vulnerabilities">
|
|
42
|
+
</a>
|
|
43
|
+
<a style="text-decoration:none" href="https://sonarcloud.io/summary/new_code?id=davidusb-geek_emhass">
|
|
44
|
+
<img alt="SonarQube reliability" src="https://sonarcloud.io/api/project_badges/measure?project=davidusb-geek_emhass&metric=reliability_rating">
|
|
45
|
+
</a>
|
|
46
|
+
<a style="text-decoration:none" href="https://sonarcloud.io/summary/new_code?id=davidusb-geek_emhass">
|
|
47
|
+
<img alt="SonarQube bugs" src="https://sonarcloud.io/api/project_badges/measure?project=davidusb-geek_emhass&metric=bugs">
|
|
48
|
+
</a>
|
|
49
|
+
|
|
50
|
+
</p>
|
|
51
|
+
|
|
52
|
+
<div align="center">
|
|
53
|
+
<a style="text-decoration:none" href="https://emhass.readthedocs.io/en/latest/">
|
|
54
|
+
<img src="https://raw.githubusercontent.com/davidusb-geek/emhass/master/docs/images/Documentation_button.svg" alt="Documentation">
|
|
55
|
+
</a>
|
|
56
|
+
<a style="text-decoration:none" href="https://community.home-assistant.io/t/emhass-an-energy-management-for-home-assistant/338126">
|
|
57
|
+
<img src="https://raw.githubusercontent.com/davidusb-geek/emhass/master/docs/images/Community_button.svg" alt="Community">
|
|
58
|
+
</a>
|
|
59
|
+
<a style="text-decoration:none" href="https://github.com/davidusb-geek/emhass/issues">
|
|
60
|
+
<img src="https://raw.githubusercontent.com/davidusb-geek/emhass/master/docs/images/Issues_button.svg" alt="Issues">
|
|
61
|
+
</a>
|
|
62
|
+
<a style="text-decoration:none" href="https://github.com/davidusb-geek/emhass-add-on">
|
|
63
|
+
<img src="https://raw.githubusercontent.com/davidusb-geek/emhass/master/docs/images/EMHASS_Add_on_button.svg" alt="EMHASS Add-on">
|
|
64
|
+
</a>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<br>
|
|
68
|
+
<p align="left">
|
|
69
|
+
EMHASS is a Python module designed to optimize your home energy interfacing with Home Assistant.
|
|
70
|
+
</p>
|
|
71
|
+
|
|
72
|
+
## Introduction
|
|
73
|
+
|
|
74
|
+
EMHASS (Energy Management for Home Assistant) is an optimization tool designed for residential households. The package uses a Linear Programming approach to optimize energy usage while considering factors such as electricity prices, power generation from solar panels, and energy storage from batteries. EMHASS provides a high degree of configurability, making it easy to integrate with Home Assistant and other smart home systems. Whether you have solar panels, energy storage, or just a controllable load, EMHASS can provide an optimized daily schedule for your devices, allowing you to save money and minimize your environmental impact.
|
|
75
|
+
|
|
76
|
+
The complete documentation for this package is [available here](https://emhass.readthedocs.io/en/latest/).
|
|
77
|
+
|
|
78
|
+
To get started you can follow our [🚀 Quick Start](/docs/quick_start.md) guide in the documentation.
|
|
79
|
+
|
|
80
|
+
Here are the guides for:
|
|
81
|
+
- [📦 Installation methods](/docs/installation_methods)
|
|
82
|
+
- [📖 Usage](/docs/usage_guide)
|
|
83
|
+
- [🤖 Home Assistant Automations](automations)
|
|
84
|
+
|
|
85
|
+
## Development
|
|
86
|
+
|
|
87
|
+
Pull requests are very much accepted on this project. For development, you can find some instructions here [Development](https://emhass.readthedocs.io/en/latest/develop.html).
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
|
|
91
|
+
MIT License
|
|
92
|
+
|
|
93
|
+
Copyright (c) 2021-2025 David HERNANDEZ
|
|
94
|
+
|
|
95
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
96
|
+
|
|
97
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
98
|
+
|
|
99
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "emhass"
|
|
3
|
+
version = "0.15.4"
|
|
4
|
+
description = "An Energy Management System for Home Assistant"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10, <3.13"
|
|
7
|
+
authors = [{ name = "David HERNANDEZ TORRES", email = "davidusb@gmail.com" }]
|
|
8
|
+
license = { text = "MIT" }
|
|
9
|
+
keywords = ["energy", "management", "optimization", "hass"]
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Development Status :: 5 - Production/Stable",
|
|
12
|
+
"Intended Audience :: Developers",
|
|
13
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
16
|
+
"Programming Language :: Python :: 3.10",
|
|
17
|
+
"Programming Language :: Python :: 3.11",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"numpy>=2.0.0, <2.3.0",
|
|
23
|
+
"scipy>=1.15.0",
|
|
24
|
+
"pandas>=2.2.0",
|
|
25
|
+
"pvlib>=0.11.0",
|
|
26
|
+
"protobuf>=5.29.3",
|
|
27
|
+
"pytz>=2024.2",
|
|
28
|
+
"h5py>=3.12.1",
|
|
29
|
+
"highspy>=1.10.0",
|
|
30
|
+
"pulp>=2.8.0",
|
|
31
|
+
"pyyaml>=6.0.2",
|
|
32
|
+
"tables>=3.10.0",
|
|
33
|
+
"skforecast>=0.19.1,<0.20.0",
|
|
34
|
+
"waitress>=3.0.2",
|
|
35
|
+
"plotly>=6.0.0",
|
|
36
|
+
"gunicorn>=23.0.0",
|
|
37
|
+
"quart",
|
|
38
|
+
"aiofiles",
|
|
39
|
+
"jinja2",
|
|
40
|
+
"asyncio",
|
|
41
|
+
"aiohttp",
|
|
42
|
+
"orjson",
|
|
43
|
+
"websockets",
|
|
44
|
+
"uvicorn>=0.30.0",
|
|
45
|
+
"influxdb>=5.3.1",
|
|
46
|
+
]
|
|
47
|
+
[build-system]
|
|
48
|
+
requires = ["hatchling"]
|
|
49
|
+
build-backend = "hatchling.build"
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
[tool.uv.workspace]
|
|
53
|
+
members = ["emhass"]
|
|
54
|
+
|
|
55
|
+
[tool.uv.sources]
|
|
56
|
+
emhass = { workspace = true }
|
|
57
|
+
|
|
58
|
+
[tool.uv]
|
|
59
|
+
default-groups = "all"
|
|
60
|
+
package = true
|
|
61
|
+
|
|
62
|
+
[project.optional-dependencies]
|
|
63
|
+
docs = ["sphinx", "pydata-sphinx-theme", "sphinx-design", "myst-parser"]
|
|
64
|
+
test = [
|
|
65
|
+
"pytest",
|
|
66
|
+
"pytz",
|
|
67
|
+
"coverage",
|
|
68
|
+
"snakeviz",
|
|
69
|
+
"ruff",
|
|
70
|
+
"tabulate",
|
|
71
|
+
"hatchling",
|
|
72
|
+
"aioresponses"
|
|
73
|
+
]
|
|
74
|
+
dev = ["ruff"]
|
|
75
|
+
|
|
76
|
+
[tool.hatch.build.targets.wheel]
|
|
77
|
+
packages = ["src/emhass"]
|
|
78
|
+
package-data = { "emhass" = [
|
|
79
|
+
"templates/*",
|
|
80
|
+
"static/*",
|
|
81
|
+
"img/*",
|
|
82
|
+
"data/cec_modules.pbz2",
|
|
83
|
+
"data/cec_inverters.pbz2",
|
|
84
|
+
"data/associations.csv",
|
|
85
|
+
"data/config_defaults.json",
|
|
86
|
+
] }
|
|
87
|
+
|
|
88
|
+
[tool.hatch.build.targets.sdist]
|
|
89
|
+
include = [
|
|
90
|
+
"src/emhass/*.py",
|
|
91
|
+
"src/emhass/templates/",
|
|
92
|
+
"src/emhass/static/",
|
|
93
|
+
"src/emhass/img/",
|
|
94
|
+
"src/emhass/data/cec_modules.pbz2",
|
|
95
|
+
"src/emhass/data/cec_inverters.pbz2",
|
|
96
|
+
"src/emhass/data/associations.csv",
|
|
97
|
+
"src/emhass/data/config_defaults.json",
|
|
98
|
+
]
|
|
99
|
+
|
|
100
|
+
[project.scripts]
|
|
101
|
+
emhass = "emhass.command_line:main_sync"
|
|
102
|
+
|
|
103
|
+
[project.urls]
|
|
104
|
+
Homepage = "https://github.com/davidusb-geek/emhass"
|
|
105
|
+
Source = "https://github.com/davidusb-geek/emhass"
|
|
106
|
+
Issues = "https://github.com/davidusb-geek/emhass/issues"
|
|
107
|
+
Documentation = "https://emhass.readthedocs.io/en/latest/"
|
|
108
|
+
Community = "https://community.home-assistant.io/t/emhass-an-energy-management-for-home-assistant"
|
|
109
|
+
|
|
110
|
+
[tool.ruff.lint]
|
|
111
|
+
select = ["E", "W", "F", "I", "C", "B", "Q", "UP", "YTT", "PYI"]
|
|
112
|
+
ignore = ["E501", "B008", "B905", "C901"]
|
|
113
|
+
|
|
114
|
+
[dependency-groups]
|
|
115
|
+
dev = ["emhass"]
|
|
116
|
+
|
|
117
|
+
[tool.ruff]
|
|
118
|
+
target-version = "py311"
|
|
119
|
+
src = ["src", "tests"]
|
|
120
|
+
fix = true
|
|
121
|
+
show-fixes = true
|
|
122
|
+
|
|
123
|
+
line-length = 100
|
|
File without changes
|