One last error:
2023-07-16 09:04:00,047 - web_server - INFO - Setting up needed data
2023-07-16 09:04:00,049 - web_server - ERROR - ERROR: The passed data is either not a list or the length is not correct, length should be 33
2023-07-16 09:04:00,049 - web_server - ERROR - Passed type is <class 'list'> and length is 33
2023-07-16 09:04:00,051 - web_server - INFO - Retrieve hass get data method initiated...
2023-07-16 09:04:00,619 - web_server - INFO - Retrieving weather forecast data using method = scrapper
2023-07-16 09:04:01,902 - web_server - INFO - Retrieving data from hass for load forecast using method = naive
2023-07-16 09:04:01,902 - web_server - INFO - Retrieve hass get data method initiated...
2023-07-16 09:04:02,941 - web_server - INFO - >> Performing naive MPC optimization...
2023-07-16 09:04:02,941 - web_server - INFO - Performing naive MPC optimization
2023-07-16 09:04:02,950 - web_server - INFO - Perform an iteration of a naive MPC controller
2023-07-16 09:04:03,104 - web_server - INFO - Status: Optimal
2023-07-16 09:04:03,105 - web_server - INFO - Total value of the Cost function = -1.3
2023-07-16 09:04:03,487 - web_server - INFO - Setting up needed data
2023-07-16 09:04:03,489 - web_server - INFO - >> Publishing data...
2023-07-16 09:04:03,489 - web_server - INFO - Publishing data to HASS instance
2023-07-16 09:04:03,508 - web_server - INFO - Successfully posted to sensor.p_pv_forecast = 443.44
2023-07-16 09:04:03,517 - web_server - INFO - Successfully posted to sensor.p_load_forecast = 740.29
2023-07-16 09:04:03,527 - web_server - INFO - Successfully posted to sensor.p_deferrable0 = 0.0
2023-07-16 09:04:03,538 - web_server - INFO - Successfully posted to sensor.p_batt_forecast = 296.85
2023-07-16 09:04:03,551 - web_server - INFO - Successfully posted to sensor.soc_batt_forecast = 13.32
2023-07-16 09:04:03,561 - web_server - INFO - Successfully posted to sensor.p_grid_forecast = 0.0
2023-07-16 09:04:03,572 - web_server - INFO - Successfully posted to sensor.total_cost_fun_value = -1.3
2023-07-16 09:04:03,583 - web_server - INFO - Successfully posted to sensor.unit_load_cost = 0.16
2023-07-16 09:04:03,591 - web_server - INFO - Successfully posted to sensor.unit_prod_price = 0.06
Shell Command:
post_mpc_optim_solcast: "curl -i -H \"Content-Type: application/json\" -X POST -d '{\"load_cost_forecast\":{{(
([states('sensor.cecil_st_general_price')|float(0)] +
state_attr('sensor.cecil_st_general_forecast', 'forecasts') |map(attribute='per_kwh')|list)[:48])
}}, \"prod_price_forecast\":{{(
([states('sensor.cecil_st_feed_in_price')|float(0)] +
state_attr('sensor.cecil_st_feed_in_forecast', 'forecasts')|map(attribute='per_kwh')|list)[:48])
}}, \"pv_power_forecast\":{{states('sensor.solcast_24hrs_forecast')
}}, \"prediction_horizon\": {{min(48, (state_attr('sensor.cecil_st_feed_in_forecast', 'forecasts')|map(attribute='per_kwh')|list|length)+1)
}},\"soc_init\":{{(states('sensor.sonnenbatterie_84324_state_charge_user')|float(0))/100
}},,\"soc_final\":0.05,\"def_total_hours\":[2]}' http://localhost:5000/action/naive-mpc-optim"
What is it refering to?
pv_power_forecast is [] due to going over API calls again. Haven’t implemented oziee yet. Thats the next task. I assume error relates to empty array but why 33?