Hi,
After having “optimised” my solar/battery/ev/ac unit setup with manually created automations I wanted to give EMHASS a try.
I did a minimal configuration as a first step but when I try to run any optimisation through the web interface I see the following error message in the logs. Can anyone point me to what is going wrong here?
2024-01-29 23:26:22,645 - web_server - INFO - EMHASS server online, serving index.html...
2024-01-29 23:26:22,650 - web_server - WARNING - The data container dictionary is empty... Please launch an optimization task
2024-01-29 23:26:25,676 - web_server - INFO - Setting up needed data
2024-01-29 23:26:25,687 - web_server - INFO - Retrieving weather forecast data using method = scrapper
2024-01-29 23:26:26,172 - web_server - INFO - Retrieving data from hass for load forecast using method = naive
2024-01-29 23:26:26,173 - web_server - INFO - Retrieve hass get data method initiated...
2024-01-29 23:26:26,173 - web_server - ERROR - Variable sensor.ac_loads was not found. This is typically because no data could be retrieved from Home Assistant
2024-01-29 23:26:26,174 - web_server - ERROR - Exception on /action/dayahead-optim [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 872, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 870, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 855, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/emhass/web_server.py", line 50, in action_call
input_data_dict = set_input_data_dict(config_path, str(data_path), costfun,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/emhass/command_line.py", line 91, in set_input_data_dict
P_load_forecast = fcst.get_load_forecast(method=optim_conf['load_forecast_method'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/emhass/forecast.py", line 587, in get_load_forecast
rh.prepare_data(self.retrieve_hass_conf['var_load'], load_negative = self.retrieve_hass_conf['load_negative'],
File "/usr/local/lib/python3.11/dist-packages/emhass/retrieve_hass.py", line 210, in prepare_data
self.df_final[new_var_interp] = self.df_final[new_var_interp].interpolate(
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pandas/core/frame.py", line 3767, in __getitem__
indexer = self.columns._get_indexer_strict(key, "columns")[1]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pandas/core/indexes/base.py", line 5877, in _get_indexer_strict
self._raise_if_missing(keyarr, indexer, axis_name)
File "/usr/local/lib/python3.11/dist-packages/pandas/core/indexes/base.py", line 5938, in _raise_if_missing
raise KeyError(f"None of [{key}] are in the [{axis_name}]")
KeyError: "None of [Index(['sensor.ac_loads_positive'], dtype='object')] are in the [columns]"