emhass 0.13.0__tar.gz → 0.13.1__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.
Files changed (37) hide show
  1. {emhass-0.13.0 → emhass-0.13.1}/.gitignore +2 -0
  2. {emhass-0.13.0 → emhass-0.13.1}/PKG-INFO +12 -3
  3. emhass-0.13.1/pyproject.toml +104 -0
  4. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/data/associations.csv +2 -0
  5. emhass-0.13.1/src/emhass/data/cec_inverters.pbz2 +0 -0
  6. emhass-0.13.1/src/emhass/data/cec_modules.pbz2 +0 -0
  7. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/data/config_defaults.json +5 -3
  8. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/static/data/param_definitions.json +12 -0
  9. emhass-0.13.0/emhass/__init__.py +0 -0
  10. emhass-0.13.0/emhass/command_line.py +0 -1850
  11. emhass-0.13.0/emhass/data/cec_inverters.pbz2 +0 -0
  12. emhass-0.13.0/emhass/data/cec_modules.pbz2 +0 -0
  13. emhass-0.13.0/emhass/data/emhass_inverters.csv +0 -8
  14. emhass-0.13.0/emhass/data/emhass_modules.csv +0 -6
  15. emhass-0.13.0/emhass/forecast.py +0 -1618
  16. emhass-0.13.0/emhass/machine_learning_forecaster.py +0 -388
  17. emhass-0.13.0/emhass/machine_learning_regressor.py +0 -247
  18. emhass-0.13.0/emhass/optimization.py +0 -1502
  19. emhass-0.13.0/emhass/retrieve_hass.py +0 -695
  20. emhass-0.13.0/emhass/utils.py +0 -1758
  21. emhass-0.13.0/emhass/web_server.py +0 -756
  22. emhass-0.13.0/pyproject.toml +0 -84
  23. {emhass-0.13.0 → emhass-0.13.1}/LICENSE +0 -0
  24. {emhass-0.13.0 → emhass-0.13.1}/README.md +0 -0
  25. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/img/emhass_icon.png +0 -0
  26. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/static/advanced.html +0 -0
  27. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/static/basic.html +0 -0
  28. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/static/configuration_list.html +0 -0
  29. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/static/configuration_script.js +0 -0
  30. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/static/img/emhass_icon.png +0 -0
  31. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/static/img/emhass_logo_short.svg +0 -0
  32. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/static/img/feather-sprite.svg +0 -0
  33. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/static/script.js +0 -0
  34. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/static/style.css +0 -0
  35. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/templates/configuration.html +0 -0
  36. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/templates/index.html +0 -0
  37. {emhass-0.13.0 → emhass-0.13.1/src}/emhass/templates/template.html +0 -0
@@ -47,6 +47,8 @@ MANIFEST
47
47
 
48
48
  # Local session data
49
49
  data/actionLogs.txt
50
+ data/debug-*.csv
51
+ data/cached-open-meteo-forecast.json
50
52
  data/entities/*.json
51
53
 
52
54
  # PyInstaller
@@ -1,18 +1,25 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: emhass
3
- Version: 0.13.0
3
+ Version: 0.13.1
4
4
  Summary: An Energy Management System for Home Assistant
5
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
6
10
  Author-email: David HERNANDEZ <davidusb@gmail.com>
7
- License-Expression: MIT
11
+ License: MIT
8
12
  License-File: LICENSE
9
13
  Keywords: energy,hass,management,optimization
10
14
  Classifier: Development Status :: 5 - Production/Stable
11
15
  Classifier: Intended Audience :: Developers
12
16
  Classifier: License :: OSI Approved :: MIT License
13
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
14
21
  Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Topic :: Software Development :: Build Tools
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
23
  Requires-Python: <3.13,>=3.10
17
24
  Requires-Dist: flask>=3.1.0
18
25
  Requires-Dist: gunicorn>=23.0.0
@@ -30,6 +37,8 @@ Requires-Dist: scipy>=1.15.0
30
37
  Requires-Dist: skforecast>=0.14.0
31
38
  Requires-Dist: tables>=3.10.0
32
39
  Requires-Dist: waitress>=3.0.2
40
+ Provides-Extra: dev
41
+ Requires-Dist: ruff; extra == 'dev'
33
42
  Provides-Extra: docs
34
43
  Requires-Dist: myst-parser; extra == 'docs'
35
44
  Requires-Dist: sphinx; extra == 'docs'
@@ -0,0 +1,104 @@
1
+ [project]
2
+ name = "emhass"
3
+ version = "0.13.1"
4
+ description = "An Energy Management System for Home Assistant"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10, <3.13"
7
+ authors = [
8
+ { name = "David HERNANDEZ", email = "davidusb@gmail.com" },
9
+ ]
10
+ license = { text = "MIT" }
11
+ keywords = ["energy", "management", "optimization", "hass"]
12
+ classifiers = [
13
+ "Development Status :: 5 - Production/Stable",
14
+ "Intended Audience :: Developers",
15
+ "Topic :: Software Development :: Libraries :: Python Modules",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3 :: Only",
18
+ "Programming Language :: Python :: 3.10",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Operating System :: OS Independent",
22
+ ]
23
+ dependencies = [
24
+ "numpy>=2.0.0, <2.3.0",
25
+ "scipy>=1.15.0",
26
+ "pandas>=2.2.0",
27
+ "pvlib>=0.11.0",
28
+ "protobuf>=5.29.3",
29
+ "pytz>=2024.2",
30
+ "requests>=2.32.2",
31
+ "h5py>=3.12.1",
32
+ "pulp>=2.8.0",
33
+ "pyyaml>=6.0.2",
34
+ "tables>=3.10.0",
35
+ "skforecast>=0.14.0",
36
+ "flask>=3.1.0",
37
+ "waitress>=3.0.2",
38
+ "plotly>=6.0.0",
39
+ "gunicorn>=23.0.0",
40
+ ]
41
+ [build-system]
42
+ requires = ["hatchling"]
43
+ build-backend = "hatchling.build"
44
+
45
+
46
+ [tool.uv.workspace]
47
+ members = ["emhass"]
48
+
49
+ [tool.uv.sources]
50
+ emhass = { workspace = true }
51
+
52
+ [tool.uv]
53
+ default-groups = "all"
54
+ package = true
55
+
56
+ [project.optional-dependencies]
57
+ docs = ["sphinx", "sphinx-rtd-theme", "myst-parser"]
58
+ test = ["requests-mock", "pytest", "coverage", "snakeviz", "ruff", "tabulate", "hatchling"]
59
+ dev = ["ruff"]
60
+
61
+ [tool.hatch.build.targets.wheel]
62
+ packages = ["src/emhass"]
63
+ package-data = { "emhass" = [
64
+ "templates/*",
65
+ "static/*",
66
+ "img/*",
67
+ "data/cec_modules.pbz2",
68
+ "data/cec_inverters.pbz2",
69
+ "data/associations.csv",
70
+ "data/config_defaults.json"]}
71
+
72
+ [tool.hatch.build.targets.sdist]
73
+ include = [
74
+ "src/emhass/templates/",
75
+ "src/emhass/static/",
76
+ "src/emhass/img/",
77
+ "src/emhass/data/cec_modules.pbz2",
78
+ "src/emhass/data/cec_inverters.pbz2",
79
+ "src/emhass/data/associations.csv",
80
+ "src/emhass/data/config_defaults.json",
81
+ ]
82
+
83
+ [project.scripts]
84
+ emhass = "emhass.command_line:main"
85
+
86
+ [project.urls]
87
+ Homepage = "https://github.com/davidusb-geek/emhass"
88
+ Source = "https://github.com/davidusb-geek/emhass"
89
+ Issues = "https://github.com/davidusb-geek/emhass/issues"
90
+ Documentation = "https://emhass.readthedocs.io/en/latest/"
91
+ Community = "https://community.home-assistant.io/t/emhass-an-energy-management-for-home-assistant"
92
+
93
+ [tool.ruff.lint]
94
+ select = ["E", "W", "F", "I", "C", "B", "Q", "UP", "YTT", "PYI"]
95
+ ignore = ["E501", "B008", "B905", "C901"]
96
+
97
+ [dependency-groups]
98
+ dev = [
99
+ "emhass",
100
+ ]
101
+
102
+ [tool.ruff]
103
+ target-version = "py311"
104
+ src = ["src", "tests"]
@@ -38,6 +38,7 @@ optim_conf,prod_sell_price,photovoltaic_production_sell_price
38
38
  optim_conf,set_total_pv_sell,set_total_pv_sell
39
39
  optim_conf,lp_solver,lp_solver
40
40
  optim_conf,lp_solver_path,lp_solver_path
41
+ optim_conf,lp_solver_timeout,lp_solver_timeout
41
42
  optim_conf,set_nocharge_from_grid,set_nocharge_from_grid
42
43
  optim_conf,set_nodischarge_to_grid,set_nodischarge_to_grid
43
44
  optim_conf,set_battery_dynamic,set_battery_dynamic
@@ -46,6 +47,7 @@ optim_conf,battery_dynamic_min,battery_dynamic_min
46
47
  optim_conf,weight_battery_discharge,weight_battery_discharge
47
48
  optim_conf,weight_battery_charge,weight_battery_charge
48
49
  optim_conf,weather_forecast_method,weather_forecast_method
50
+ optim_conf,open_meteo_cache_max_age,open_meteo_cache_max_age
49
51
  optim_conf,def_start_timestep,start_timesteps_of_each_deferrable_load,list_start_timesteps_of_each_deferrable_load
50
52
  optim_conf,def_end_timestep,end_timesteps_of_each_deferrable_load,list_end_timesteps_of_each_deferrable_load
51
53
  optim_conf,list_hp_periods,load_peak_hour_periods
@@ -9,13 +9,14 @@
9
9
  "set_total_pv_sell": false,
10
10
  "lp_solver": "default",
11
11
  "lp_solver_path": "empty",
12
+ "lp_solver_timeout": 45,
12
13
  "set_nocharge_from_grid": false,
13
14
  "set_nodischarge_to_grid": true,
14
15
  "set_battery_dynamic": false,
15
16
  "battery_dynamic_max": 0.9,
16
17
  "battery_dynamic_min": -0.9,
17
- "weight_battery_discharge": 1.0,
18
- "weight_battery_charge": 1.0,
18
+ "weight_battery_discharge": 0.0,
19
+ "weight_battery_charge": 0.0,
19
20
  "sensor_power_photovoltaics": "sensor.power_photovoltaics",
20
21
  "sensor_power_photovoltaics_forecast": "sensor.p_pv_forecast",
21
22
  "sensor_power_load_no_var_loads": "sensor.power_load_no_var_loads",
@@ -43,6 +44,7 @@
43
44
  0
44
45
  ],
45
46
  "weather_forecast_method": "open-meteo",
47
+ "open_meteo_cache_max_age": 30,
46
48
  "load_forecast_method": "naive",
47
49
  "delta_forecast_daily": 1,
48
50
  "load_cost_forecast_method": "hp_hc_periods",
@@ -123,4 +125,4 @@
123
125
  "battery_minimum_state_of_charge": 0.3,
124
126
  "battery_maximum_state_of_charge": 0.9,
125
127
  "battery_target_state_of_charge": 0.6
126
- }
128
+ }
@@ -138,6 +138,12 @@
138
138
  "input": "text",
139
139
  "default_value": "/usr/bin/cbc"
140
140
  },
141
+ "lp_solver_timeout": {
142
+ "friendly_name": "Linear programming solver timeout",
143
+ "Description": "Set the maximum time (in seconds) for the LP solver. Defaults to 45.",
144
+ "input": "int",
145
+ "default_value": 45
146
+ },
141
147
  "weather_forecast_method": {
142
148
  "friendly_name": "Weather forecast method",
143
149
  "Description": "This will define the weather forecast method that will be used. options are 'open-meteo', 'Solcast', 'solar.forecast' (forecast.solar) and 'csv' to load a CSV file. When loading a CSV file this will be directly considered as the PV power forecast in Watts.",
@@ -150,6 +156,12 @@
150
156
  ],
151
157
  "default_value": "open-meteo"
152
158
  },
159
+ "open_meteo_cache_max_age": {
160
+ "friendly_name": "Open-Meteo Cache Max Age",
161
+ "Description": "The maximum age, in minutes, of the cached open-meteo json response, after which a new version will be fetched from Open-Meteo. Defaults to 30.",
162
+ "input": "int",
163
+ "default_value": 30
164
+ },
153
165
  "maximum_power_from_grid": {
154
166
  "friendly_name": "Max power from grid",
155
167
  "Description": "The maximum power that can be supplied by the utility grid in Watts (consumption). Defaults to 9000.",
File without changes