Interestingly I still can’t run MPC after a reboot for two days? I have to revert to dayahead for two days and then I can go back to MPC method.
2023-11-11 09:17:51,187 - 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 1455, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 869, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 867, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 852, 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 179, 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-11-11 09:17:51,216 - web_server - INFO - Setting up needed data
2023-11-11 09:17:51,217 - web_server - INFO - >> Publishing data...
2023-11-11 09:17:51,217 - web_server - INFO - Publishing data to HASS instance
2023-11-11 09:17:51,237 - web_server - INFO - Successfully posted to sensor.p_pv_forecast = 0
2023-11-11 09:17:51,250 - web_server - INFO - Successfully posted to sensor.p_load_forecast = 0.0
2023-11-11 09:17:51,260 - web_server - INFO - Successfully posted to sensor.p_deferrable0 = 0.0
2023-11-11 09:17:51,270 - web_server - INFO - Successfully posted to sensor.p_deferrable1 = 0.0
2023-11-11 09:17:51,280 - web_server - INFO - Successfully posted to sensor.p_batt_forecast = 0.0
2023-11-11 09:17:51,290 - web_server - INFO - Successfully posted to sensor.soc_batt_forecast = 16.0
2023-11-11 09:17:51,299 - web_server - INFO - Successfully posted to sensor.p_grid_forecast = 0.0
2023-11-11 09:17:51,310 - web_server - INFO - Successfully posted to sensor.total_cost_fun_value = 3.79
2023-11-11 09:17:51,320 - web_server - INFO - Successfully posted to sensor.unit_load_cost = 0.06
2023-11-11 09:17:51,332 - web_server - INFO - Successfully posted to sensor.unit_prod_price = -0.03