Also a lot of errors in logs now:
2023-07-10 19:31:00,560 - web_server - ERROR - Exception on /action/naive-mpc-optim [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.9/dist-packages/emhass/web_server.py", line 174, in action_call
input_data_dict = set_input_data_dict(config_path, str(data_path), costfun,
File "/usr/local/lib/python3.9/dist-packages/emhass/command_line.py", line 110, in set_input_data_dict
rh.get_data(days_list, var_list,
File "/usr/local/lib/python3.9/dist-packages/emhass/retrieve_hass.py", line 140, in get_data
df_tp = df_raw.copy()[['state']].replace(
File "/usr/local/lib/python3.9/dist-packages/pandas/core/generic.py", line 5920, in astype
new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/internals/managers.py", line 419, in astype
return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/internals/managers.py", line 304, in apply
applied = getattr(b, f)(**kwargs)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/internals/blocks.py", line 580, in astype
new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/dtypes/cast.py", line 1292, in astype_array_safe
new_values = astype_array(values, dtype, copy=copy)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/dtypes/cast.py", line 1237, in astype_array
values = astype_nansafe(values, dtype, copy=copy)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/dtypes/cast.py", line 1098, in astype_nansafe
result = astype_nansafe(flat, dtype, copy=copy, skipna=skipna)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/dtypes/cast.py", line 1181, in astype_nansafe
return arr.astype(dtype, copy=True)
ValueError: could not convert string to float: 'NOTRUN'
2023-07-10 19:31:00,598 - web_server - INFO - Setting up needed data
2023-07-10 19:31:00,600 - web_server - INFO - >> Publishing data...
2023-07-10 19:31:00,601 - web_server - INFO - Publishing data to HASS instance
2023-07-10 19:31:00,617 - web_server - INFO - Successfully posted to sensor.p_pv_forecast = -1.5
2023-07-10 19:31:00,629 - web_server - INFO - Successfully posted to sensor.p_load_forecast = 500.63
2023-07-10 19:31:00,638 - web_server - INFO - Successfully posted to sensor.p_deferrable0 = 0.0
2023-07-10 19:31:00,648 - web_server - INFO - Successfully posted to sensor.p_deferrable1 = 0.0
2023-07-10 19:31:00,657 - web_server - INFO - Successfully posted to sensor.p_deferrable2 = 0.0
2023-07-10 19:31:00,668 - web_server - INFO - Successfully posted to sensor.p_deferrable3 = 0.0
2023-07-10 19:31:00,678 - web_server - INFO - Successfully posted to sensor.p_batt_forecast = 0.0
2023-07-10 19:31:00,688 - web_server - INFO - Successfully posted to sensor.soc_batt_forecast = 10.0
2023-07-10 19:31:00,697 - web_server - INFO - Successfully posted to sensor.p_grid_forecast = 502.13
2023-07-10 19:31:00,707 - web_server - INFO - Successfully posted to sensor.total_cost_fun_value = -8.08
2023-07-10 19:31:00,718 - web_server - INFO - Successfully posted to sensor.unit_load_cost = 0.45
2023-07-10 19:31:00,728 - web_server - INFO - Successfully posted to sensor.unit_prod_price = 0.36
2023-07-10 19:32:00,043 - web_server - INFO - Setting up needed data
2023-07-10 19:32:00,043 - web_server - ERROR - ERROR: The passed data is either not a list or the length is not correct, length should be 48
2023-07-10 19:32:00,044 - web_server - ERROR - Passed type is <class 'list'> and length is 48
2023-07-10 19:32:00,045 - web_server - INFO - Retrieve hass get data method initiated...
2023-07-10 19:32:00,648 - web_server - ERROR - Exception on /action/naive-mpc-optim [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.9/dist-packages/emhass/web_server.py", line 174, in action_call
input_data_dict = set_input_data_dict(config_path, str(data_path), costfun,
File "/usr/local/lib/python3.9/dist-packages/emhass/command_line.py", line 110, in set_input_data_dict
rh.get_data(days_list, var_list,
File "/usr/local/lib/python3.9/dist-packages/emhass/retrieve_hass.py", line 140, in get_data
df_tp = df_raw.copy()[['state']].replace(
File "/usr/local/lib/python3.9/dist-packages/pandas/core/generic.py", line 5920, in astype
new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/internals/managers.py", line 419, in astype
return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/internals/managers.py", line 304, in apply
applied = getattr(b, f)(**kwargs)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/internals/blocks.py", line 580, in astype
new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/dtypes/cast.py", line 1292, in astype_array_safe
new_values = astype_array(values, dtype, copy=copy)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/dtypes/cast.py", line 1237, in astype_array
values = astype_nansafe(values, dtype, copy=copy)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/dtypes/cast.py", line 1098, in astype_nansafe
result = astype_nansafe(flat, dtype, copy=copy, skipna=skipna)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/dtypes/cast.py", line 1181, in astype_nansafe
return arr.astype(dtype, copy=True)
ValueError: could not convert string to float: 'NOTRUN'
2023-07-10 19:32:00,679 - web_server - INFO - Setting up needed data
2023-07-10 19:32:00,681 - web_server - INFO - >> Publishing data...
2023-07-10 19:32:00,681 - web_server - INFO - Publishing data to HASS instance
2023-07-10 19:32:00,694 - web_server - INFO - Successfully posted to sensor.p_pv_forecast = -1.5
2023-07-10 19:32:00,704 - web_server - INFO - Successfully posted to sensor.p_load_forecast = 500.63
2023-07-10 19:32:00,716 - web_server - INFO - Successfully posted to sensor.p_deferrable0 = 0.0
2023-07-10 19:32:00,727 - web_server - INFO - Successfully posted to sensor.p_deferrable1 = 0.0
2023-07-10 19:32:00,736 - web_server - INFO - Successfully posted to sensor.p_deferrable2 = 0.0
2023-07-10 19:32:00,747 - web_server - INFO - Successfully posted to sensor.p_deferrable3 = 0.0
2023-07-10 19:32:00,757 - web_server - INFO - Successfully posted to sensor.p_batt_forecast = 0.0
2023-07-10 19:32:00,766 - web_server - INFO - Successfully posted to sensor.soc_batt_forecast = 10.0
2023-07-10 19:32:00,776 - web_server - INFO - Successfully posted to sensor.p_grid_forecast = 502.13
2023-07-10 19:32:00,786 - web_server - INFO - Successfully posted to sensor.total_cost_fun_value = -8.08
2023-07-10 19:32:00,798 - web_server - INFO - Successfully posted to sensor.unit_load_cost = 0.45
2023-07-10 19:32:00,809 - web_server - INFO - Successfully posted to sensor.unit_prod_price = 0.36