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

continual_publish service #284

Merged
merged 10 commits into from
Jun 1, 2024
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ secrets_emhass.yaml
.vscode/tasks.json
*.html
*.pkl
data/actionLogs.txt
**/app


Expand Down Expand Up @@ -41,6 +40,10 @@ share/python-wheels/
*.egg
MANIFEST

# Local session data
data/actionLogs.txt
data/entities/*.json

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
Expand Down
2 changes: 2 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"OPTIONS_PATH": "/workspaces/emhass/options.json",
"SECRETS_PATH": "/workspaces/emhass/secrets_emhass.yaml",
"DATA_PATH": "/workspaces/emhass/data/",
"LOGGING_LEVEL": "DEBUG"
}
},
{
Expand Down Expand Up @@ -52,6 +53,7 @@
"LAT": "45.83", //optional change
"LON": "6.86", //optional change
"ALT": "4807.8", //optional change
"LOGGING_LEVEL": "DEBUG" //optional change
},
}
]
Expand Down
117 changes: 110 additions & 7 deletions README.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions config_emhass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ retrieve_hass_conf:
- 'sensor.power_photovoltaics'
- 'sensor.power_load_no_var_loads'
method_ts_round: 'nearest' # Set the method for timestamp rounding, options are: first, last and nearest
continual_publish: False # Save published sensor data and check for state change every freq minutes

optim_conf:
set_use_battery: False # consider a battery storage
Expand Down
1 change: 1 addition & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ These are the parameters that we will need to define to retrieve data from Home
- 'sensor.power_photovoltaics'
- 'sensor.power_load_no_var_loads'
- `method_ts_round`: Set the method for timestamp rounding, options are: first, last and nearest.
- `continual_publish`: set to True to save entities to .json after optimization run. Then automatically republish the saved entities *(with updated current state value)* every freq minutes. *entity data saved to data_path/entities.*

A second part of this section is given by some privacy-sensitive parameters that should be included in a `secrets_emhass.yaml` file alongside the `config_emhass.yaml` file.

Expand Down
1 change: 1 addition & 0 deletions docs/differences.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ See bellow for a list of associations between the parameters from `config_emhass
| retrieve_hass_conf | load_negative | load_negative | |
| retrieve_hass_conf | set_zero_min | set_zero_min | |
| retrieve_hass_conf | method_ts_round | method_ts_round | |
| retrieve_hass_conf | continual_publish | continual_publish | |
| params_secrets | solcast_api_key | optional_solcast_api_key | |
| params_secrets | solcast_rooftop_id | optional_solcast_rooftop_id | |
| params_secrets | solar_forecast_kwp | optional_solar_forecast_kwp | |
Expand Down
1 change: 1 addition & 0 deletions options.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"optimization_time_step": 30,
"historic_days_to_retrieve": 2,
"method_ts_round": "nearest",
"continual_publish": false,
"optional_solcast_api_key": "empty",
"optional_solcast_rooftop_id": "empty",
"optional_solar_forecast_kwp": 5,
Expand Down
Loading
Loading