Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function to predict a value from a csv file. Part2 #260

Merged
merged 116 commits into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
d9a701c
add /app to gitignore
gieljnssns Jan 7, 2024
c8b71e1
Add csv-prediction
gieljnssns Jan 7, 2024
0e2f535
cleanup
gieljnssns Jan 9, 2024
61f64fd
more cleanup
gieljnssns Jan 18, 2024
11b3a3d
filename_path -> inp
gieljnssns Jan 19, 2024
779c6b8
resolve some comments
gieljnssns Jan 29, 2024
2d0c460
Use gridsearchcv and split up fit and predict
gieljnssns Feb 13, 2024
1933710
remove backtest
gieljnssns Feb 13, 2024
0bf50a2
cleanup
gieljnssns Feb 13, 2024
ac45455
cleanup + docstrings
gieljnssns Feb 13, 2024
f3574c8
add other regression methods
gieljnssns Mar 11, 2024
b9fa914
add --editable
gieljnssns Mar 15, 2024
f7fc59f
Add sklearn model
gieljnssns Mar 15, 2024
7177ad2
multiple regression methods
gieljnssns Mar 15, 2024
11664bf
change to MLRegressor
gieljnssns Mar 15, 2024
5b168cd
change naming and some formatting
gieljnssns Mar 15, 2024
4ced757
sklearn-model -> regression-model
gieljnssns Mar 15, 2024
1cb2ed5
REGRESSION_METHODS const
gieljnssns Mar 15, 2024
40adc0f
Some cleanup
gieljnssns Mar 17, 2024
bbfbc3a
Add csv-prediction
gieljnssns Jan 7, 2024
b5c2b95
Use gridsearchcv and split up fit and predict
gieljnssns Feb 13, 2024
9eaf488
gitignore fun
gieljnssns Feb 13, 2024
8f0cab3
python -> debugpy
gieljnssns Mar 17, 2024
c27ea5c
launch.json
gieljnssns Mar 17, 2024
e154380
delete csv-predictor
gieljnssns Mar 17, 2024
e946d18
remove KNeighborsRegressor
gieljnssns Mar 18, 2024
06920aa
first documentation for mlregressor
gieljnssns Mar 19, 2024
a5be2b8
add /app to gitignore
gieljnssns Jan 7, 2024
7c71203
Add csv-prediction
gieljnssns Jan 7, 2024
9b7472a
cleanup
gieljnssns Jan 9, 2024
b975b74
more cleanup
gieljnssns Jan 18, 2024
36ba25f
filename_path -> inp
gieljnssns Jan 19, 2024
259ced3
resolve some comments
gieljnssns Jan 29, 2024
e200dc8
Use gridsearchcv and split up fit and predict
gieljnssns Feb 13, 2024
d09cbe3
remove backtest
gieljnssns Feb 13, 2024
cb2050a
cleanup
gieljnssns Feb 13, 2024
264a8ca
cleanup + docstrings
gieljnssns Feb 13, 2024
c375042
add other regression methods
gieljnssns Mar 11, 2024
79752df
add --editable
gieljnssns Mar 15, 2024
79c478e
Add sklearn model
gieljnssns Mar 15, 2024
d4c36f0
multiple regression methods
gieljnssns Mar 15, 2024
bf64255
change to MLRegressor
gieljnssns Mar 15, 2024
d5adde3
change naming and some formatting
gieljnssns Mar 15, 2024
b15914d
sklearn-model -> regression-model
gieljnssns Mar 15, 2024
9807ed6
REGRESSION_METHODS const
gieljnssns Mar 15, 2024
063ccf2
Some cleanup
gieljnssns Mar 17, 2024
6fae7a4
Add csv-prediction
gieljnssns Jan 7, 2024
b4293c0
Use gridsearchcv and split up fit and predict
gieljnssns Feb 13, 2024
fa8f6c0
gitignore fun
gieljnssns Feb 13, 2024
54966d4
python -> debugpy
gieljnssns Mar 17, 2024
ef4e177
launch.json
gieljnssns Mar 17, 2024
1a502e1
delete csv-predictor
gieljnssns Mar 17, 2024
6095a2c
remove KNeighborsRegressor
gieljnssns Mar 18, 2024
8fd7fbf
add tests
gieljnssns Apr 17, 2024
cf5a4ad
Merge branch 'master' of https://github.com/gieljnssns/emhass
gieljnssns Apr 17, 2024
c51d540
Rename paragrams
gieljnssns Apr 17, 2024
1590404
Ready for review (I think)
gieljnssns Apr 18, 2024
f8b43aa
remove *.csv from .gitignore to upload heating_prediction.csv
gieljnssns Apr 18, 2024
a7f301c
add /app to gitignore
gieljnssns Jan 7, 2024
d40da86
Add csv-prediction
gieljnssns Jan 7, 2024
86b9fec
cleanup
gieljnssns Jan 9, 2024
21e486c
more cleanup
gieljnssns Jan 18, 2024
483898f
filename_path -> inp
gieljnssns Jan 19, 2024
3559c28
resolve some comments
gieljnssns Jan 29, 2024
c928f2b
Use gridsearchcv and split up fit and predict
gieljnssns Feb 13, 2024
e744c5e
remove backtest
gieljnssns Feb 13, 2024
cf5657f
cleanup
gieljnssns Feb 13, 2024
b2d1eb2
cleanup + docstrings
gieljnssns Feb 13, 2024
714f66b
add other regression methods
gieljnssns Mar 11, 2024
667611c
add --editable
gieljnssns Mar 15, 2024
a63546c
Add sklearn model
gieljnssns Mar 15, 2024
6f720eb
multiple regression methods
gieljnssns Mar 15, 2024
be01f8f
change to MLRegressor
gieljnssns Mar 15, 2024
7430bf0
change naming and some formatting
gieljnssns Mar 15, 2024
9ed8798
sklearn-model -> regression-model
gieljnssns Mar 15, 2024
7b5e2ba
REGRESSION_METHODS const
gieljnssns Mar 15, 2024
6bf36a3
Some cleanup
gieljnssns Mar 17, 2024
43b4927
Add csv-prediction
gieljnssns Jan 7, 2024
173f05e
Use gridsearchcv and split up fit and predict
gieljnssns Feb 13, 2024
19da6f8
gitignore fun
gieljnssns Feb 13, 2024
1f531ec
python -> debugpy
gieljnssns Mar 17, 2024
b4984d0
launch.json
gieljnssns Mar 17, 2024
c1344b1
delete csv-predictor
gieljnssns Mar 17, 2024
723ed3f
remove KNeighborsRegressor
gieljnssns Mar 18, 2024
93380f3
add tests
gieljnssns Apr 17, 2024
b614f81
add /app to gitignore
gieljnssns Jan 7, 2024
86b1604
Add csv-prediction
gieljnssns Jan 7, 2024
cd59928
cleanup
gieljnssns Jan 9, 2024
d4a3c67
more cleanup
gieljnssns Jan 18, 2024
87c54d8
filename_path -> inp
gieljnssns Jan 19, 2024
a9cd098
resolve some comments
gieljnssns Jan 29, 2024
9a86046
Use gridsearchcv and split up fit and predict
gieljnssns Feb 13, 2024
cfb248b
remove backtest
gieljnssns Feb 13, 2024
4af34ad
cleanup
gieljnssns Feb 13, 2024
c8e02a7
cleanup + docstrings
gieljnssns Feb 13, 2024
775d61f
add other regression methods
gieljnssns Mar 11, 2024
904a36a
multiple regression methods
gieljnssns Mar 15, 2024
ce407cf
change to MLRegressor
gieljnssns Mar 15, 2024
9d45cb1
change naming and some formatting
gieljnssns Mar 15, 2024
af8b9f6
Add csv-prediction
gieljnssns Jan 7, 2024
b035ccd
Use gridsearchcv and split up fit and predict
gieljnssns Feb 13, 2024
879186f
gitignore fun
gieljnssns Feb 13, 2024
36e1735
python -> debugpy
gieljnssns Mar 17, 2024
3e82c87
launch.json
gieljnssns Mar 17, 2024
730a2df
delete csv-predictor
gieljnssns Mar 17, 2024
a23b693
first documentation for mlregressor
gieljnssns Mar 19, 2024
058c732
Rename paragrams
gieljnssns Apr 17, 2024
6c21629
Ready for review (I think)
gieljnssns Apr 18, 2024
fec4558
remove *.csv from .gitignore to upload heating_prediction.csv
gieljnssns Apr 18, 2024
b9ec17a
Adapt to the latest path changes
gieljnssns Apr 19, 2024
30e76a9
Merge branch 'master' of https://github.com/gieljnssns/emhass
gieljnssns Apr 19, 2024
69a1140
mlregressor, add web buttons for mlregressor, add some suggestions
GeoDerp Apr 19, 2024
05efe75
Merge pull request #2 from GeoDerp/mlregressor-suggestions
gieljnssns Apr 22, 2024
a78ae79
is 0 -> == 0
gieljnssns Apr 22, 2024
f7033f3
Merge branch 'master' of https://github.com/gieljnssns/emhass
gieljnssns Apr 22, 2024
be90211
Merge remote-tracking branch 'david/master'
gieljnssns May 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ secrets_emhass.yaml
.vscode/launch.json
.vscode/settings.json
.vscode/tasks.json
*.csv
*.html
*.pkl
data/actionLogs.txt
**/app


# Byte-compiled / optimized / DLL files
Expand Down
20 changes: 13 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
"request": "launch",
"module": "emhass.web_server",
"console": "integratedTerminal",
"purpose":["debug-in-terminal"],
"purpose": [
"debug-in-terminal"
],
"justMyCode": true,
"env": {
"CONFIG_PATH": "/workspaces/emhass/config_emhass.yaml",
"OPTIONS_PATH": "/workspaces/emhass/options.json",
"SECRETS_PATH": "/workspaces/emhass/secrets_emhass.yaml",
"DATA_PATH": "/workspaces/emhass/data/",
"LOGGING_LEVEL": "DEBUG"
}
},
{
Expand All @@ -30,8 +31,15 @@
"request": "launch",
"module": "emhass.web_server",
"console": "integratedTerminal",
"args": ["--addon", "true", "--no_response", "true"],
"purpose":["debug-in-terminal"],
"args": [
"--addon",
"true",
"--no_response",
"true"
],
"purpose": [
"debug-in-terminal"
],
"justMyCode": true,
"env": {
"CONFIG_PATH": "/workspaces/emhass/config_emhass.yaml",
Expand All @@ -44,9 +52,7 @@
"LAT": "45.83", //optional change
"LON": "6.86", //optional change
"ALT": "4807.8", //optional change
"LOGGING_LEVEL": "DEBUG" //optional change
},

}
}
]
}
6 changes: 5 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
"isDefault": true
},
"args": [
"install", "--no-deps", "--force-reinstall", "."
"install",
"--no-deps",
"--force-reinstall",
"--editable",
"."
],
"presentation": {
"echo": true,
Expand Down
130 changes: 130 additions & 0 deletions data/heating_prediction.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
timestamp,degreeday,solar,hour
2023-11-10 23:59:32.458039+01:00,12.23,3.982,2.87
2023-11-11 23:59:32.459778+01:00,12.94,13.723,3.14
2023-11-12 23:59:32.462220+01:00,14.45,4.925,3.5
2023-11-13 23:59:32.462167+01:00,8.49,2.138,3.19
2023-11-14 23:59:32.338942+01:00,8.61,2.444,2.91
2023-11-15 23:59:32.195198+01:00,9.83,10.685,2.88
2023-11-16 23:59:32.501044+01:00,12.8,1.955,1.28
2023-11-17 23:59:32.316366+01:00,13.35,8.742,2.97
2023-11-18 23:59:32.082785+01:00,11.84,0.849,3.42
2023-11-19 23:59:32.077198+01:00,7.3,10.85,1.9
2023-11-20 23:59:32.431964+01:00,9.91,6.395,2.48
2023-11-21 23:59:32.295705+01:00,11.44,2.678,2.91
2023-11-22 23:59:32.377740+01:00,16.14,2.994,2.96
2023-11-23 23:59:32.385890+01:00,9.31,5.346,2.91
2023-11-24 23:59:32.376194+01:00,12.96,8.61,2.9
2023-11-25 23:59:32.373666+01:00,14.91,12.31,3.47
2023-11-26 23:59:32.373647+01:00,14.79,2.589,3.69
2023-11-27 23:59:32.379920+01:00,14.92,0.322,6.05
2023-11-28 23:59:32.213947+01:00,18.59,20.342,2.94
2023-11-29 23:59:32.217384+01:00,19.05,5.393,5.41
2023-11-30 23:59:32.222641+01:00,21.27,1.899,6.77
2023-12-01 23:59:32.224533+01:00,21.3,1.233,5.75
2023-12-02 23:59:32.107119+01:00,21.97,14.653,2.96
2023-12-03 23:59:32.107436+01:00,20.61,4.766,8.89
2023-12-04 23:59:32.116642+01:00,18.36,1.349,6.73
2023-12-05 23:59:32.191254+01:00,16.93,0.869,6.17
2023-12-06 23:59:32.176803+01:00,16.8,5.413,5.38
2023-12-07 23:59:32.251031+01:00,17.67,8.089,5.98
2023-12-08 23:59:32.255888+01:00,14.37,1.203,5.63
2023-12-09 23:59:32.109040+01:00,11.94,0.814,5.08
2023-12-10 23:59:32.103738+01:00,9.72,6.051,3.42
2023-12-11 23:59:32.497717+01:00,9.83,1.459,3.87
2023-12-12 23:59:32.502503+01:00,11.18,4.176,3.31
2023-12-13 23:59:32.504794+01:00,11.09,2.91,3.1
2023-12-14 23:59:32.177489+01:00,13.88,7.53,2.89
2023-12-15 23:59:32.186292+01:00,12.18,2.129,5.68
2023-12-16 23:59:32.176812+01:00,11.75,1.641,3.46
2023-12-17 23:59:32.119874+01:00,12.18,14.868,3.46
2023-12-18 23:59:32.120168+01:00,14.75,1.283,3.12
2023-12-19 23:59:32.120101+01:00,12.82,0.09,5.07
2023-12-20 23:59:32.249731+01:00,12.8,3.803,3.6
2023-12-21 23:59:32.249135+01:00,8.73,2.096,3.55
2023-12-22 23:59:32.385164+01:00,9.12,1.278,0.85
2023-12-23 23:59:32.382910+01:00,8.99,1.848,0.0
2023-12-24 23:59:32.382457+01:00,8.04,0.165,7.42
2023-12-25 23:59:32.303520+01:00,7.56,1.028,2.93
2023-12-26 23:59:32.105788+01:00,10.55,9.274,2.92
2023-12-27 23:59:32.183107+01:00,11.78,2.026,3.39
2023-12-28 23:59:32.183405+01:00,8.91,3.68,3.19
2023-12-29 23:59:32.399740+01:00,9.35,2.464,2.95
2023-12-30 23:59:32.091110+01:00,11.07,7.948,3.44
2023-12-31 23:59:32.257530+01:00,10.51,3.5,3.48
2024-01-01 23:59:32.106161+01:00,12.75,4.046,3.08
2024-01-02 23:59:32.103187+01:00,8.81,0.562,4.46
2024-01-03 23:59:32.429947+01:00,10.03,2.184,3.26
2024-01-04 23:59:32.436773+01:00,11.22,5.662,2.97
2024-01-05 23:59:32.165969+01:00,12.42,1.199,3.6
2024-01-06 23:59:32.110208+01:00,15.35,0.295,4.32
2024-01-07 23:59:32.147775+01:00,19.88,0.896,6.19
2024-01-08 23:59:32.242815+01:00,22.74,6.468,5.82
2024-01-09 23:59:32.201342+01:00,24.38,21.307,6.92
2024-01-10 23:59:32.411136+01:00,24.84,18.89,1.53
2024-01-11 23:59:32.399433+01:00,23.57,19.27,3.05
2024-01-12 23:59:32.467622+01:00,18.22,1.977,13.98
2024-01-13 23:59:32.077428+01:00,17.9,0.472,6.93
2024-01-14 23:59:32.127844+01:00,19.65,1.346,6.95
2024-01-15 23:59:32.125062+01:00,19.49,4.35,7.82
2024-01-16 23:59:32.280474+01:00,21.21,9.238,5.7
2024-01-17 23:59:32.283951+01:00,23.17,1.193,7.37
2024-01-18 23:59:32.361241+01:00,21.61,17.307,6.67
2024-01-19 23:59:32.341654+01:00,22.06,21.004,6.24
2024-01-20 23:59:32.359151+01:00,21.95,12.912,6.43
2024-01-21 23:59:32.126221+01:00,17.38,3.28,7.45
2024-01-22 23:59:32.126346+01:00,9.47,7.645,6.1
2024-01-23 23:59:32.417727+01:00,11.87,7.689,4.76
2024-01-24 23:59:32.420933+01:00,8.15,10.052,3.62
2024-01-25 23:59:32.419138+01:00,12.38,3.785,3.98
2024-01-26 23:59:32.422066+01:00,11.4,11.94,3.1
2024-01-27 23:59:32.176538+01:00,17.96,19.741,3.45
2024-01-28 23:59:32.168328+01:00,16.72,20.366,4.85
2024-01-29 23:59:32.173916+01:00,13.11,16.972,4.51
2024-01-30 23:59:32.503034+01:00,11.21,4.013,3.99
2024-01-31 23:59:32.179265+01:00,12.79,4.766,3.73
2024-02-01 23:59:32.487147+01:00,12.74,23.924,2.98
2024-02-02 23:59:32.570084+01:00,13.0,2.98,5.04
2024-02-03 23:59:32.484878+01:00,9.26,1.413,3.48
2024-02-04 23:59:32.472168+01:00,8.35,4.306,3.47
2024-02-05 23:59:32.409856+01:00,9.78,5.704,0.0
2024-02-06 23:59:32.439147+01:00,9.15,2.431,6.56
2024-02-07 23:59:32.235231+01:00,14.42,3.839,3.07
2024-02-08 23:59:32.441543+01:00,13.9,1.412,5.94
2024-02-09 23:59:32.443230+01:00,8.2,7.246,2.96
2024-02-10 23:59:32.504326+01:00,8.37,8.567,3.48
2024-02-11 23:59:32.452959+01:00,10.44,5.304,0.0
2024-02-12 23:59:32.450999+01:00,12.65,16.004,3.42
2024-02-13 23:59:32.343162+01:00,13.84,19.809,3.16
2024-02-14 23:59:32.339408+01:00,8.48,1.98,4.52
2024-02-15 23:59:32.339971+01:00,6.13,9.952,2.98
2024-02-16 23:59:32.455273+01:00,7.66,3.675,3.06
2024-02-17 23:59:32.097937+01:00,8.56,12.269,3.48
2024-02-18 23:59:32.126377+01:00,9.59,2.205,3.04
2024-02-19 23:59:32.421243+01:00,10.22,3.731,2.97
2024-02-20 23:59:32.421985+01:00,11.61,13.775,0.0
2024-02-21 23:59:32.371300+01:00,10.52,4.856,3.02
2024-02-22 23:59:32.373153+01:00,9.53,4.256,3.48
2024-02-23 23:59:32.372545+01:00,13.66,8.743,4.09
2024-02-24 23:59:32.197044+01:00,14.44,7.842,4.3
2024-02-25 23:59:32.196386+01:00,12.41,16.235,3.48
2024-02-26 23:59:32.409648+01:00,14.63,2.096,5.05
2024-02-27 23:59:32.373347+01:00,14.5,29.437,3.21
2024-02-28 23:59:32.407538+01:00,15.38,6.475,4.88
2024-02-29 23:59:32.194724+01:00,11.83,3.238,4.68
2024-03-01 23:59:32.084520+01:00,10.56,14.352,3.8
2024-03-02 23:59:32.066434+01:00,9.94,25.356,3.49
2024-03-03 23:59:32.270878+01:00,8.9,10.577,3.19
2024-03-04 23:59:32.274918+01:00,10.67,28.096,2.08
2024-03-05 23:59:32.315023+01:00,12.19,10.553,2.95
2024-03-06 23:59:32.441001+01:00,11.38,32.597,2.91
2024-03-07 23:59:32.440044+01:00,12.39,28.856,2.96
2024-03-08 23:59:32.228265+01:00,12.01,37.395,2.96
2024-03-09 23:59:32.081874+01:00,8.72,17.66,3.5
2024-03-10 23:59:32.335321+01:00,8.0,12.207,3.47
2024-03-11 23:59:32.139531+01:00,10.39,2.526,2.96
2024-03-12 23:59:32.136709+01:00,10.24,8.211,2.98
2024-03-13 23:59:32.407174+01:00,7.19,6.425,2.95
2024-03-14 23:59:32.342436+01:00,6.06,33.389,1.64
2024-03-15 23:59:32.266278+01:00,5.63,12.628,2.96
2024-03-16 23:59:32.155245+01:00,9.57,12.103,3.0
2024-03-17 23:59:32.366155+01:00,8.43,14.302,0.25
15 changes: 12 additions & 3 deletions docs/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ For those who wish to mount/sync the local `data` folder with the data folder fr
docker run ... -v $(pwd)/data/:/app/data ...
```

You can also mount data (ex .csv) files separately
```bash
docker run... -v $(pwd)/data/heating_prediction.csv:/app/data/ ...
```

#### Issue with TARGETARCH
If your docker build fails with an error related to `TARGETARCH`. It may be best to add your devices architecture manually:

Expand Down Expand Up @@ -301,7 +306,7 @@ git checkout $branch
```bash
#testing addon (build and run)
docker build -t emhass/docker --build-arg build_version=addon-local .
docker run --rm -it -p 5000:5000 --name emhass-container -v $(pwd)/options.json:/app/options.json -e LAT="45.83" -e LON="6.86" -e ALT="4807.8" -e TIME_ZONE="Europe/Paris" emhass/docker --url $HAURL --key $HAKEY
docker run --rm -it -p 5000:5000 --name emhass-container -v $(pwd)/data/heating_prediction.csv:/app/data/heating_prediction.csv -v $(pwd)/options.json:/app/options.json -e LAT="45.83" -e LON="6.86" -e ALT="4807.8" -e TIME_ZONE="Europe/Paris" emhass/docker --url $HAURL --key $HAKEY
```
```bash
#run actions on a separate terminal
Expand All @@ -311,6 +316,8 @@ curl -i -H 'Content-Type:application/json' -X POST -d {} http://localhost:5000/a
curl -i -H 'Content-Type:application/json' -X POST -d {} http://localhost:5000/action/forecast-model-fit
curl -i -H 'Content-Type:application/json' -X POST -d {} http://localhost:5000/action/forecast-model-predict
curl -i -H 'Content-Type:application/json' -X POST -d {} http://localhost:5000/action/forecast-model-tune
curl -i -H "Content-Type:application/json" -X POST -d '{"csv_file": "heating_prediction.csv", "features": ["degreeday", "solar"], "target": "hour", "regression_model": "RandomForestRegression", "model_type": "heating_hours_degreeday", "timestamp": "timestamp", "date_features": ["month", "day_of_week"], "new_values": [12.79, 4.766, 1, 2] }' http://localhost:5000/action/regressor-model-fit
curl -i -H "Content-Type:application/json" -X POST -d '{"mlr_predict_entity_id": "sensor.mlr_predict", "mlr_predict_unit_of_measurement": "h", "mlr_predict_friendly_name": "mlr predictor", "new_values": [8.2, 7.23, 2, 6], "model_type": "heating_hours_degreeday" }' http://localhost:5000/action/regressor-model-predict
curl -i -H 'Content-Type:application/json' -X POST -d {} http://localhost:5000/action/publish-data
```

Expand All @@ -326,7 +333,7 @@ lat: 45.83
lon: 6.86
alt: 4807.8
EOT
docker run --rm -it -p 5000:5000 --name emhass-container -v $(pwd)/config_emhass.yaml:/app/config_emhass.yaml -v $(pwd)/secrets_emhass.yaml:/app/secrets_emhass.yaml emhass/docker
docker run --rm -it -p 5000:5000 --name emhass-container -v $(pwd)/data/heating_prediction.csv:/app/data/heating_prediction.csv -v $(pwd)/config_emhass.yaml:/app/config_emhass.yaml -v $(pwd)/secrets_emhass.yaml:/app/secrets_emhass.yaml emhass/docker
```
```bash
#run actions on a separate terminal
Expand All @@ -336,10 +343,12 @@ curl -i -H 'Content-Type:application/json' -X POST -d {} http://localhost:5000/a
curl -i -H 'Content-Type:application/json' -X POST -d {} http://localhost:5000/action/forecast-model-fit
curl -i -H 'Content-Type:application/json' -X POST -d {} http://localhost:5000/action/forecast-model-predict
curl -i -H 'Content-Type:application/json' -X POST -d {} http://localhost:5000/action/forecast-model-tune
curl -i -H "Content-Type:application/json" -X POST -d '{"csv_file": "heating_prediction.csv", "features": ["degreeday", "solar"], "target": "hour", "regression_model": "RandomForestRegression", "model_type": "heating_hours_degreeday", "timestamp": "timestamp", "date_features": ["month", "day_of_week"], "new_values": [12.79, 4.766, 1, 2] }' http://localhost:5000/action/regressor-model-fit
curl -i -H "Content-Type:application/json" -X POST -d '{"mlr_predict_entity_id": "sensor.mlr_predict", "mlr_predict_unit_of_measurement": "h", "mlr_predict_friendly_name": "mlr predictor", "new_values": [8.2, 7.23, 2, 6], "model_type": "heating_hours_degreeday" }' http://localhost:5000/action/regressor-model-predict
curl -i -H 'Content-Type:application/json' -X POST -d {} http://localhost:5000/action/publish-data
```

User may wish to re-test with tweaked parameters such as `lp_solver` and `weather_forecast_method`, in `config_emhass.yaml` *(standalone)* or `options.json` *(addon)*, to broaden the testing scope.
User may wish to re-test with tweaked parameters such as `lp_solver`, `weather_forecast_method` and `load_forecast_method`, in `config_emhass.yaml` *(standalone)* or `options.json` *(addon)*, to broaden the testing scope.
*see [EMHASS & EMHASS-Add-on differences](https://emhass.readthedocs.io/en/latest/differences.html) for more information on how these config_emhass & options files differ*

*Note: may need to set `--build-arg TARGETARCH=YOUR-ARCH` in docker build*
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# EMHASS: Energy Management for Home Assistant

```{image} images/emhass_logo.png

```

Welcome to the documentation of EMHASS. With this package written in Python you will be able to implement a real Energy Management System for your household. This software was designed to be easy configurable and with a fast integration with Home Assistant: <https://www.home-assistant.io/>
Expand All @@ -21,6 +22,7 @@ differences.md
lpems.md
forecasts.md
mlforecaster.md
mlregressor.md
study_case.md
config.md
emhass.md
Expand All @@ -32,5 +34,3 @@ develop.md
- {ref}`genindex`
- {ref}`modindex`
- {ref}`search`


Loading
Loading