emhass 0.7.8__tar.gz → 0.8.0__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.
- {emhass-0.7.8 → emhass-0.8.0}/CHANGELOG.md +6 -0
- {emhass-0.7.8 → emhass-0.8.0}/PKG-INFO +2 -2
- {emhass-0.7.8 → emhass-0.8.0}/README.md +1 -1
- {emhass-0.7.8 → emhass-0.8.0}/setup.py +3 -2
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass/static/style.css +2 -1
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass/templates/index.html +30 -5
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass/web_server.py +6 -4
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass.egg-info/PKG-INFO +2 -2
- {emhass-0.7.8 → emhass-0.8.0}/CODE_OF_CONDUCT.md +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/CONTRIBUTING.md +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/LICENSE +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/MANIFEST.in +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/data_load_cost_forecast.csv +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/data_load_forecast.csv +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/data_prod_price_forecast.csv +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/data_train_load_clustering.pkl +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/data_train_load_forecast.pkl +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/data_weather_forecast.csv +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/logger_emhass.log +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/opt_res_latest.csv +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/opt_res_perfect_optim_cost.csv +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/opt_res_perfect_optim_profit.csv +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/opt_res_perfect_optim_self-consumption.csv +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/test_df_final.pkl +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/test_response_get_data_get_method.pbz2 +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/test_response_scrapper_get_method.pbz2 +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/test_response_solarforecast_get_method.pbz2 +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/data/test_response_solcast_get_method.pbz2 +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/pyproject.toml +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/setup.cfg +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass/__init__.py +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass/command_line.py +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass/forecast.py +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass/machine_learning_forecaster.py +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass/optimization.py +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass/retrieve_hass.py +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass/static/img/emhass_icon.png +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass/static/img/emhass_logo_short.svg +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass/templates/template.html +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass/utils.py +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass.egg-info/SOURCES.txt +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass.egg-info/dependency_links.txt +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass.egg-info/entry_points.txt +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass.egg-info/requires.txt +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/src/emhass.egg-info/top_level.txt +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/tests/test_command_line_utils.py +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/tests/test_forecast.py +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/tests/test_machine_learning_forecaster.py +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/tests/test_optimization.py +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/tests/test_retrieve_hass.py +0 -0
- {emhass-0.7.8 → emhass-0.8.0}/tests/test_utils.py +0 -0
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.8.0] - 2024-02-25
|
4
|
+
### Improvement
|
5
|
+
- Thanks to the great work from @GeoDerp we now have a unified/centralized Dockerfile that allows for testing different installation configuration methods in one place. This greatly helps testing, notably emulating the add-on environment. This will improve overall testing for both teh core code and the add-on. Again many thanks!
|
6
|
+
- There were also a lot of nice improveements from @GeoDerp to the webui, namely: styling, dynamic table, optimization feedback after button press, logging, a new clear button, etc.
|
7
|
+
- From now on we will unify the semantic versioning for both the main core code and the add-on.
|
8
|
+
|
3
9
|
## [0.7.8] - 2024-02-18
|
4
10
|
### Improvement
|
5
11
|
Added some nice logging functionalities and responsiveness on the webui.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: emhass
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.8.0
|
4
4
|
Summary: An Energy Management System for Home Assistant
|
5
5
|
Home-page: https://github.com/davidusb-geek/emhass
|
6
6
|
Author: David HERNANDEZ
|
@@ -460,7 +460,7 @@ Check the dedicated section in the documentation here: [https://emhass.readthedo
|
|
460
460
|
|
461
461
|
## Development
|
462
462
|
|
463
|
-
Pull request are very much accepted on this project. For development you can find some instructions here [Development](
|
463
|
+
Pull request are very much accepted on this project. For development you can find some instructions here [Development](https://emhass.readthedocs.io/en/latest/develop.html)
|
464
464
|
|
465
465
|
## Troubleshooting
|
466
466
|
|
@@ -425,7 +425,7 @@ Check the dedicated section in the documentation here: [https://emhass.readthedo
|
|
425
425
|
|
426
426
|
## Development
|
427
427
|
|
428
|
-
Pull request are very much accepted on this project. For development you can find some instructions here [Development](
|
428
|
+
Pull request are very much accepted on this project. For development you can find some instructions here [Development](https://emhass.readthedocs.io/en/latest/develop.html)
|
429
429
|
|
430
430
|
## Troubleshooting
|
431
431
|
|
@@ -19,7 +19,7 @@ long_description = (here / 'README.md').read_text(encoding='utf-8')
|
|
19
19
|
|
20
20
|
setup(
|
21
21
|
name='emhass', # Required
|
22
|
-
version='0.
|
22
|
+
version='0.8.0', # Required
|
23
23
|
description='An Energy Management System for Home Assistant', # Optional
|
24
24
|
long_description=long_description, # Optional
|
25
25
|
long_description_content_type='text/markdown', # Optional (see note above)
|
@@ -62,5 +62,6 @@ setup(
|
|
62
62
|
'emhass=emhass.command_line:main',
|
63
63
|
],
|
64
64
|
},
|
65
|
-
package_data={'emhass': ['templates/index.html','templates/template.html',
|
65
|
+
package_data={'emhass': ['templates/index.html','templates/template.html',
|
66
|
+
'static/style.css','static/img/emhass_icon.png','static/img/emhass_logo_short.svg']},
|
66
67
|
)
|
@@ -44,6 +44,7 @@
|
|
44
44
|
<option value="List" selected>List</option>
|
45
45
|
<option value="Box">Box</option>
|
46
46
|
</select>
|
47
|
+
<button type="button" id="input-clear">Clear</button>
|
47
48
|
</div>
|
48
49
|
</div>
|
49
50
|
<div id="input-container"> <!-- (Box/List) dynamic input elements will be added here -->
|
@@ -175,7 +176,7 @@
|
|
175
176
|
if (testStorage()) { //if local storage exists and works
|
176
177
|
let selectElement = document.getElementById('input-select') // select button element
|
177
178
|
var input_container = document.getElementById('input-container'); // container div containing all dynamic input elements (Box/List)
|
178
|
-
if (localStorage.getItem("input_container_content")) { //If items already stored in local storage, then override default
|
179
|
+
if (localStorage.getItem("input_container_content") && localStorage.getItem("input_container_content") !== "{}" ) { //If items already stored in local storage, then override default
|
179
180
|
if (selectElement.value == "Box") { //if Box is selected, show saved json data into box
|
180
181
|
document.getElementById("text-area").value = localStorage.getItem("input_container_content");
|
181
182
|
}
|
@@ -299,10 +300,7 @@
|
|
299
300
|
//if box is selected, remove input-list elements and replace (with text-area)
|
300
301
|
if (selectElement.value == "Box") {
|
301
302
|
if (input_container_child_name == "input-list" || input_container_child === null) { // if input list exists or no Box element
|
302
|
-
|
303
|
-
while (inputListArr[0]) { //while there is still input-list elements remove
|
304
|
-
inputListArr[0].parentNode.removeChild(inputListArr[0]);
|
305
|
-
};
|
303
|
+
input_container.innerHTML = ""; //remove input-list list elements via erasing container innerHTML
|
306
304
|
let div = document.createElement('div'); //add input-box element
|
307
305
|
div.className = "input-box";
|
308
306
|
div.innerHTML = `
|
@@ -325,6 +323,30 @@
|
|
325
323
|
}
|
326
324
|
}
|
327
325
|
|
326
|
+
//clear stored input data from localStorage (if any), clear input elements
|
327
|
+
async function ClearInputData(id) {
|
328
|
+
if (testStorage() && localStorage.getItem("input_container_content") !== null) {
|
329
|
+
localStorage.setItem("input_container_content", "{}")
|
330
|
+
}
|
331
|
+
ClearInputElements();
|
332
|
+
|
333
|
+
}
|
334
|
+
|
335
|
+
//clear input elements
|
336
|
+
async function ClearInputElements() {
|
337
|
+
let selectElement = document.getElementById('input-select')
|
338
|
+
var input_container = document.getElementById('input-container');
|
339
|
+
if (selectElement.value == "Box") {
|
340
|
+
document.getElementById("text-area").value = "{}";
|
341
|
+
}
|
342
|
+
if (selectElement.value == "List") {
|
343
|
+
input_container.innerHTML = "";
|
344
|
+
}
|
345
|
+
|
346
|
+
}
|
347
|
+
|
348
|
+
|
349
|
+
|
328
350
|
//add listeners to buttons
|
329
351
|
[
|
330
352
|
"dayahead-optim",
|
@@ -344,6 +366,9 @@
|
|
344
366
|
[
|
345
367
|
"input-select"
|
346
368
|
].forEach((id) => document.getElementById(id).addEventListener('change', () => getSavedData(id)));
|
369
|
+
[
|
370
|
+
"input-clear"
|
371
|
+
].forEach((id) => document.getElementById(id).addEventListener('click', () => ClearInputData(id)));
|
347
372
|
</script>
|
348
373
|
|
349
374
|
</html>
|
@@ -205,12 +205,14 @@ if __name__ == "__main__":
|
|
205
205
|
use_options = os.getenv('USE_OPTIONS', default=False)
|
206
206
|
# Define the paths
|
207
207
|
if args.addon==1:
|
208
|
-
OPTIONS_PATH = os.getenv('OPTIONS_PATH', default="/
|
208
|
+
OPTIONS_PATH = os.getenv('OPTIONS_PATH', default="/app/options.json")
|
209
209
|
options_json = Path(OPTIONS_PATH)
|
210
|
-
CONFIG_PATH = os.getenv("CONFIG_PATH", default="/
|
210
|
+
CONFIG_PATH = os.getenv("CONFIG_PATH", default="/app/config_emhass.yaml")
|
211
211
|
#Obtain url and key from ENV or ARG
|
212
212
|
hass_url = os.getenv("EMHASS_URL", default=args.url)
|
213
|
-
key = os.getenv("
|
213
|
+
key = os.getenv("SUPERVISOR_TOKEN", default=args.key)
|
214
|
+
if hass_url != "http://supervisor/core/api":
|
215
|
+
key = os.getenv("EMHASS_KEY", key)
|
214
216
|
#If url or key is None, Set as empty string to reduce NoneType errors bellow
|
215
217
|
if key is None: key = ""
|
216
218
|
if hass_url is None: hass_url = ""
|
@@ -220,7 +222,7 @@ if __name__ == "__main__":
|
|
220
222
|
options = json.load(data)
|
221
223
|
else:
|
222
224
|
app.logger.error("options.json does not exists")
|
223
|
-
DATA_PATH = os.getenv("DATA_PATH", default="/
|
225
|
+
DATA_PATH = os.getenv("DATA_PATH", default="/app/data/")
|
224
226
|
else:
|
225
227
|
if use_options:
|
226
228
|
OPTIONS_PATH = os.getenv('OPTIONS_PATH', default="/app/options.json")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: emhass
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.8.0
|
4
4
|
Summary: An Energy Management System for Home Assistant
|
5
5
|
Home-page: https://github.com/davidusb-geek/emhass
|
6
6
|
Author: David HERNANDEZ
|
@@ -460,7 +460,7 @@ Check the dedicated section in the documentation here: [https://emhass.readthedo
|
|
460
460
|
|
461
461
|
## Development
|
462
462
|
|
463
|
-
Pull request are very much accepted on this project. For development you can find some instructions here [Development](
|
463
|
+
Pull request are very much accepted on this project. For development you can find some instructions here [Development](https://emhass.readthedocs.io/en/latest/develop.html)
|
464
464
|
|
465
465
|
## Troubleshooting
|
466
466
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|