I upgraded to 0.10.2 without issue except I am getting an MPC POST failure every 30 minutes. I’ve seen this behaviour before and usually just ignore it. I POST every 60 seconds.
Logs:
2024-07-08 10:29:56,947 - web_server - INFO - Passed runtime parameters: {'prod_price_forecast': [0.29, 0.28, 0.18, 0.1, 0.1, 0.1, 0.12, 0.1, 0.1, 0.1, 0.17, 0.13, 0.17, 0.16, 0.33, 0.34, 0.34, 0.34, 0.31, 0.17, 0.26, 0.16, 0.13, 0.09, 0.13, 0.12, 0.1, 0.1, 0.16, 0.12, 0.12, 0.13, 0.12, 0.11, 0.09, 0.09], 'load_cost_forecast': [0.4, 0.4, 0.29, 0.2, 0.2, 0.2, 0.21, 0.2, 0.2, 0.2, 0.26, 0.21, 0.23, 0.22, 0.41, 0.42, 0.42, 0.42, 0.39, 0.24, 0.33, 0.22, 0.21, 0.18, 0.22, 0.21, 0.18, 0.18, 0.25, 0.21, 0.21, 0.21, 0.21, 0.19, 0.17, 0.17], 'pv_power_forecast': [433, 1423, 1328, 1243, 1222, 1222, 1193, 1153, 988, 694, 441, 203, 68, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 80, 268, 643, 965, 1289, 1539, 1722, 1845, 1895, 1909, 1866, 1917, 2011, 1942, 1751, 1475, 1120, 664, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'load_power_forecast': [356, 415, 1714, 852, 2655, 2145, 1711, 2297, 1286, 643, 382, 459, 454, 468, 861, 853, 2181, 739, 643, 639, 722, 669, 948, 584, 597, 534, 573, 763, 552, 431, 405, 303, 327, 321, 312, 313, 301, 315, 305, 317, 315, 318, 304, 303, 364, 428, 431, 503, 465], 'prediction_horizon': 36, 'num_def_loads': 2, 'def_total_hours': [1, 0], 'P_deferrable_nom': [1300, 2300], 'treat_def_as_semi_cont': [1, 0], 'set_def_constant': [0, 0], 'soc_init': 0.23, 'soc_final': 0.3, 'alpha': 1, 'beta': 0}
2024-07-08 10:29:56,947 - web_server - INFO - >> Setting input data dict
2024-07-08 10:29:56,948 - web_server - INFO - Setting up needed data
2024-07-08 10:29:56,952 - web_server - INFO - Retrieve hass get data method initiated...
2024-07-08 10:30:01,771 - web_server - INFO - Retrieving weather forecast data using method = list
2024-07-08 10:30:01,774 - web_server - INFO - >> Performing naive MPC optimization...
2024-07-08 10:30:01,774 - web_server - INFO - Performing naive MPC optimization
2024-07-08 10:30:01,786 - web_server - INFO - Perform an iteration of a naive MPC controller
2024-07-08 10:30:01,827 - web_server - DEBUG - Deferrable load 0: Proposed optimization window: 0 --> 0
2024-07-08 10:30:01,827 - web_server - DEBUG - Deferrable load 0: Validated optimization window: 0 --> 0
2024-07-08 10:30:01,830 - web_server - DEBUG - Deferrable load 1: Proposed optimization window: 0 --> 0
2024-07-08 10:30:01,830 - web_server - DEBUG - Deferrable load 1: Validated optimization window: 0 --> 0
2024-07-08 10:30:01,891 - web_server - ERROR - Exception on /action/naive-mpc-optim [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 865, 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 168, in action_call
opt_res = naive_mpc_optim(input_data_dict, app.logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/emhass/command_line.py", line 446, in naive_mpc_optim
opt_res_naive_mpc = input_data_dict["opt"].perform_naive_mpc_optim(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/emhass/optimization.py", line 804, in perform_naive_mpc_optim
self.opt_res = self.perform_optimization(df_input_data, P_PV.values.ravel(), P_load.values.ravel(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/emhass/optimization.py", line 606, in perform_optimization
opt_model.solve(COIN_CMD(msg=0, path=self.lp_solver_path))
File "/usr/local/lib/python3.11/dist-packages/pulp/pulp.py", line 1883, in solve
status = solver.actualSolve(self, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pulp/apis/coin_api.py", line 112, in actualSolve
return self.solve_CBC(lp, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pulp/apis/coin_api.py", line 188, in solve_CBC
raise PulpSolverError("Pulp: Error while executing " + self.path)
pulp.apis.core.PulpSolverError: Pulp: Error while executing /usr/bin/cbc
2024-07-08 10:30:01,935 - web_server - INFO - Passed runtime parameters: {}
2024-07-08 10:30:01,935 - web_server - INFO - >> Setting input data dict
2024-07-08 10:30:01,935 - web_server - INFO - Setting up needed data
2024-07-08 10:30:01,938 - web_server - INFO - >> Publishing data...
2024-07-08 10:30:01,938 - web_server - INFO - Publishing data to HASS instance
2024-07-08 10:30:01,956 - web_server - INFO - Successfully posted to sensor.p_pv_forecast = 1423
2024-07-08 10:30:01,968 - web_server - INFO - Successfully posted to sensor.p_load_forecast = 415
2024-07-08 10:30:01,978 - web_server - INFO - Successfully posted to sensor.p_deferrable0 = 0.0
2024-07-08 10:30:01,985 - web_server - INFO - Successfully posted to sensor.p_deferrable1 = 0.0
2024-07-08 10:30:01,995 - web_server - INFO - Successfully posted to sensor.p_batt_forecast = 7992.0
2024-07-08 10:30:02,003 - web_server - INFO - Successfully posted to sensor.soc_batt_forecast = 30.0
2024-07-08 10:30:02,013 - web_server - INFO - Successfully posted to sensor.p_grid_forecast = -9000.0
2024-07-08 10:30:02,023 - web_server - INFO - Successfully posted to sensor.total_cost_fun_value = 26.82
2024-07-08 10:30:02,033 - web_server - INFO - Successfully posted to sensor.optim_status = Infeasible
2024-07-08 10:30:02,044 - web_server - INFO - Successfully posted to sensor.unit_load_cost = 0.4
2024-07-08 10:30:02,058 - web_server - INFO - Successfully posted to sensor.unit_prod_price = 0.28
It’s infeasible at the moment becuase battery is below target state which is the case every evening and into the morning until the sun charges battery back to target or I charge overnight for morning peak usage. Normal process for me.
What could be causing this 30 minute error?