Closed SzosszeNET closed 7 months ago
Can you try 3.7.0 beta? You’ll need to enable pre-release in HACS On 1 Feb 2024 at 20:15 +0000, SzosszeNET @.***>, wrote:
I'm terribly sorry, been trying to work out in the past two days what's going on, but now I'm at loss... On version 3.6.0 and as far as loading data everything looks just fine: 20:08:33 INFO: PV Opt v3.6.0 20:08:33 INFO: 20:08:33 INFO: Local timezone set to GB 20:08:33 INFO: Time Zone Offset: 0.0 minutes 20:08:33 INFO: Inverter type: SOLIS_SOLAX_MODBUS: inverter module: solis.py 20:08:33 INFO: Reading arguments from YAML: 20:08:33 INFO: ----------------------------------- 20:08:33 INFO: consumption_history_days = 2 2: value in YAML 20:08:33 INFO: battery_capacity_wh = 5000 5000: value in YAML 20:08:33 INFO: charger_power_watts = 3600 3600: value in YAML 20:08:33 INFO: inverter_power_watts = 3600 3600: value in YAML 20:08:33 INFO: id_solcast_today = sensor.solcast_pv_forecast_forecast_today 0.0: value(s) in YAML 20:08:33 INFO: id_solcast_tomorrow = sensor.solcast_pv_forecast_forecast_tomorrow 1.53035: value(s) in YAML 20:08:33 WARNING: consumption_margin = 10 10: system default. Unable to read from HA entities listed in YAML. No default in YAML. 20:08:33 INFO: octopus_account = * **** YAML default value. No default defined. 20:08:33 INFO: octopus_api_key = **** s*****: YAML default value. No default defined. 20:08:33 INFO: battery_voltage = sensor.solis_battery_voltage 52.1: value in YAML 20:08:33 INFO: update_cycle_seconds = 15 15: value in YAML 20:08:33 INFO: maximum_dod_percent = number.solis_battery_minimum_soc 15.0: value in YAML 20:08:33 INFO: id_consumption_today = sensor.solis_house_load_today 22.6: value(s) in YAML 20:08:33 INFO: id_grid_import_today = sensor.solis_grid_import_today 19.2: value(s) in YAML 20:08:33 INFO: id_grid_export_today = sensor.solis_grid_export_today 0.3: value(s) in YAML 20:08:33 INFO: id_battery_soc = sensor.solis_battery_soc 15.0: value(s) in YAML 20:08:33 INFO: id_timed_charge_start_hours = number.solis_timed_charge_start_hours 20.0: value(s) in YAML 20:08:33 INFO: id_timed_charge_start_minutes = number.solis_timed_charge_start_minutes 30.0: value(s) in YAML 20:08:33 INFO: id_timed_charge_end_hours = number.solis_timed_charge_end_hours 21.0: value(s) in YAML 20:08:33 INFO: id_timed_charge_end_minutes = number.solis_timed_charge_end_minutes 0.0: value(s) in YAML 20:08:33 INFO: id_timed_charge_current = number.solis_timed_charge_current 30.0: value(s) in YAML 20:08:33 INFO: id_timed_discharge_start_hours = number.solis_timed_discharge_start_hours 0.0: value(s) in YAML 20:08:33 INFO: id_timed_discharge_start_minutes = number.solis_timed_discharge_start_minutes 0.0: value(s) in YAML 20:08:33 INFO: id_timed_discharge_end_hours = number.solis_timed_discharge_end_hours 0.0: value(s) in YAML 20:08:33 INFO: id_timed_discharge_end_minutes = number.solis_timed_discharge_end_minutes 0.0: value(s) in YAML 20:08:33 INFO: id_timed_discharge_current = number.solis_timed_discharge_current 60.0: value(s) in YAML 20:08:33 INFO: id_timed_charge_discharge_button = button.solis_update_charge_discharge_times 2024-02-01T16:30:20.738670+00:00: value(s) in YAML 20:08:33 INFO: id_inverter_mode = select.solis_energy_storage_control_switch Timed Charge/Discharge: value(s) in YAML 20:08:33 INFO: id_daily_solar = sensor.solis_power_generation_today 2.9: value(s) in YAML 20:08:33 INFO: 20:08:33 INFO: Checking config: 20:08:33 INFO: ----------------------- 20:08:33 WARNING: forced_charge = True True: system default. Not in YAML. 20:08:33 WARNING: forced_discharge = True True: system default. Not in YAML. 20:08:33 WARNING: read_only = True True: system default. Not in YAML. 20:08:33 WARNING: allow_cyclic = False False: system default. Not in YAML. 20:08:33 WARNING: optimise_frequency_minutes = 10 10: system default. Not in YAML. 20:08:33 WARNING: slot_threshold_p = 1.0 1.0: system default. Not in YAML. 20:08:33 WARNING: day_of_week_weighting = 0.5 0.5: system default. Not in YAML. 20:08:33 WARNING: pass_threshold_p = 4.0 4.0: system default. Not in YAML. 20:08:33 WARNING: octopus_auto = True True: system default. Not in YAML. 20:08:33 WARNING: inverter_efficiency_percent = 97 97: system default. Not in YAML. 20:08:33 WARNING: charger_efficiency_percent = 91 91: system default. Not in YAML. 20:08:33 WARNING: inverter_loss_watts = 100 100: system default. Not in YAML. 20:08:33 WARNING: solar_forecast = Solcast Solcast: system default. Not in YAML. 20:08:33 WARNING: consumption_grouping = mean mean: system default. Not in YAML. 20:08:33 WARNING: forced_power_group_tolerance = 100 100: system default. Not in YAML. 20:08:33 WARNING: id_battery_charge_power = sensor.solis_battery_input_energy 0.0: system default. Not in YAML. 20:08:33 WARNING: id_inverter_ac_power = sensor.solis_active_power -90.0: system default. Not in YAML. 20:08:33 WARNING: supports_hold_soc = True True: system default. Not in YAML. 20:08:33 WARNING: id_backup_mode_soc = number.solis_backup_mode_soc 100.0: system default. Not in YAML. 20:08:33 INFO: 20:08:33 INFO: Syncing config with Home Assistant: 20:08:33 INFO: ----------------------------------- 20:08:33 INFO: 20:08:33 INFO: Config Item HA Entity Current State 20:08:33 INFO: ----------- --------- ------------- 20:08:33 INFO: forced_charge switch.pvopt_forced_charge on 20:08:33 INFO: forced_discharge switch.pvopt_forced_discharge on 20:08:33 INFO: read_only switch.pvopt_read_only on 20:08:33 INFO: allow_cyclic switch.pvopt_allow_cyclic off 20:08:33 INFO: optimise_frequency_minutes number.pvopt_optimise_frequency_minutes 10 20:08:33 INFO: slot_threshold_p number.pvopt_slot_threshold_p 1.0 20:08:33 INFO: day_of_week_weighting number.pvopt_day_of_week_weighting 0.5 20:08:33 INFO: pass_threshold_p number.pvopt_pass_threshold_p 4.0 20:08:33 INFO: battery_capacity_wh number.pvopt_battery_capacity_wh 5000 20:08:33 INFO: inverter_efficiency_percent number.pvopt_inverter_efficiency_percent 97 20:08:33 INFO: charger_efficiency_percent number.pvopt_charger_efficiency_percent 91 20:08:33 INFO: charger_power_watts number.pvopt_charger_power_watts 3600 20:08:33 INFO: inverter_power_watts number.pvopt_inverter_power_watts 3600 20:08:33 INFO: inverter_loss_watts number.pvopt_inverter_loss_watts 100 20:08:33 INFO: solar_forecast select.pvopt_solar_forecast Solcast 20:08:33 INFO: consumption_history_days number.pvopt_consumption_history_days 2 20:08:33 INFO: consumption_margin number.pvopt_consumption_margin 10 20:08:33 INFO: consumption_grouping select.pvopt_consumption_grouping mean 20:08:33 INFO: forced_power_group_tolerance number.pvopt_forced_power_group_tolerance 100 20:08:33 INFO: 20:08:33 INFO: Loading Contract: 20:08:33 INFO: ----------------- 20:08:33 INFO: Trying to auto detect Octopus tariffs: 20:08:33 INFO: Found import entity event.octopus_energy_electricity_current_day_rates 20:08:33 INFO: Found export entity event.octopus_energy_electricityexport_current_day_rates 20:08:34 INFO: Contract tariffs loaded OK 20:08:34 INFO: Import: E-1R-AGILE-FLEX-22-11-25-N Start: 2024-01-23 13:00:00+0000 End: 2024-02-02 23:00:00+0000 20:08:34 INFO: Export: E-1R-OUTGOING-FIX-12M-19-05-13-N Start: 2019-05-15 23:00:00+0000 End: N/A 20:08:34 INFO: AGILE tariff detected. Rates will update at 16:00 daily 20:08:34 INFO: 20:08:34 INFO: 20:08:34 INFO: Found Octopus Savings Events entity: event.octopus_energy_a**_octoplus_saving_session_events 20:08:34 INFO: 20:08:34 INFO: No upcoming Octopus Saving Events detected or joined: 20:08:34 INFO: Finished loading contract 20:08:34 INFO: 20:08:34 INFO: Running initial Optimisation: 20:08:34 INFO: 20:08:34 INFO: 20:08:34 INFO: Found Octopus Savings Events entity: event.octopus_energy_a_a2720466_octoplus_saving_session_events 20:08:34 INFO: 20:08:34 INFO: No upcoming Octopus Saving Events detected or joined: 20:08:34 INFO: 20:08:34 INFO: Starting Opimisation with discharge enabled 20:08:34 INFO: ------------------------------------------- 20:08:34 INFO: 20:08:34 INFO: Checking tariffs: 20:08:34 INFO: ----------------- 20:08:34 INFO: Import: E-1R-AGILE-FLEX-22-11-25-N Start: 2024-01-23 13:00:00+0000 End: 2024-02-02 23:00:00+0000 20:08:34 INFO: Export: E-1R-OUTGOING-FIX-12M-19-05-13-N Start: 2019-05-15 23:00:00+0000 End: N/A 20:08:34 INFO: AGILE tariff detected. Rates will update at 16:00 daily 20:08:34 INFO: - Tariffs OK 20:08:34 INFO: 20:08:34 INFO: Solcast forecast loaded OK 20:08:34 INFO: Getting expected consumption data 20:08:34 INFO: - Estimated consumption from sensor.solis_house_load_today loaded OK 20:08:34 INFO: Initial SOC: 15.0 20:08:34 INFO: Calculating Base flows 20:08:35 INFO: 20:08:35 INFO: Retrieved day ahead forecast for period 25/01 23:00 - 02/02 22:00 for tariff E-1R-AGILE-FLEX-22-11-25-N 20:09:34 INFO: >>> Agile Callback Handler and on the error log I see 20:08:35 WARNING pv_opt: ------------------------------------------------------------ 20:08:35 WARNING pv_opt: Unexpected error running initialize() for pv_opt 20:08:35 WARNING pv_opt: ------------------------------------------------------------ 20:08:35 WARNING pv_opt: Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 162, in initialize_app await utils.run_in_executor(self, init) File "/usr/lib/python3.11/site-packages/appdaemon/utils.py", line 304, in run_in_executor response = future.result() ^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 321, in initialize self.optimise() File "/usr/lib/python3.11/site-packages/appdaemon/adbase.py", line 35, in f_app_lock return f(args, kw) ^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 1322, in optimise self.base_cost = self.contract.net_cost(self.base) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pvpy.py", line 442, in net_cost imp_df = self.imp.to_df(start, end, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pvpy.py", line 230, in to_df newindex = pd.date_range(x.index[0], df.index[-1], freq="30T")
File "/usr/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 5385, in getitem return getitem(key) ^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/pandas/core/arrays/datetimelike.py", line 379, in getitem result = cast("Union[Self, DTScalarOrNaT]", super().getitem(key)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/pandas/core/arrays/_mixins.py", line 284, in getitem result = self._ndarray[key] ~~~~~~~~~~~~~^^^^^ IndexError: index -1 is out of bounds for axis 0 with size 0 20:08:35 WARNING pv_opt: ------------------------------------------------------------ Tried deleting and reinstalling PV OPT unfortunately no difference... — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
I did already and went back to 3.6.0 just in case.
Unfortunately it's the same issue...
21:41:35 INFO: PV Opt v3.6.1 21:41:35 INFO: 21:41:35 INFO: Local timezone set to GB 21:41:35 INFO: Time Zone Offset: 0.0 minutes 21:41:35 INFO: Inverter type: SOLIS_SOLAX_MODBUS: inverter module: solis.py 21:41:35 INFO: Reading arguments from YAML: 21:41:35 INFO: ----------------------------------- 21:41:35 INFO: 21:41:35 INFO: Over-write flag is set so YAML will over-write HA 21:41:35 INFO: consumption_history_days = 2 2: value in YAML 21:41:35 INFO: redact_personal_data_from_log = True True: value in YAML 21:41:35 INFO: battery_capacity_wh = 5000 5000: value in YAML 21:41:35 INFO: charger_power_watts = 3600 3600: value in YAML 21:41:35 INFO: inverter_power_watts = 3600 3600: value in YAML 21:41:35 INFO: id_solcast_today = sensor.solcast_pv_forecast_forecast_today 0.0: value(s) in YAML 21:41:35 INFO: id_solcast_tomorrow = sensor.solcast_pv_forecast_forecast_tomorrow 1.53035: value(s) in YAML 21:41:35 WARNING: consumption_margin = 10 10: system default. Unable to read from HA entities listed in YAML. No default in YAML. 21:41:35 INFO: octopus_account = * ****: YAML default value. No default defined. 21:41:35 INFO: octopus_api_key = ***** *****: YAML default value. No default defined. 21:41:35 INFO: battery_voltage = sensor.solis_battery_voltage 51.7: value in YAML 21:41:35 INFO: update_cycle_seconds = 15 15: value in YAML 21:41:35 INFO: maximum_dod_percent = number.solis_battery_minimum_soc 15.0: value in YAML 21:41:35 INFO: id_consumption_today = sensor.solis_house_load_today 23.6: value(s) in YAML 21:41:35 INFO: id_grid_import_today = sensor.solis_grid_import_today 20.6: value(s) in YAML 21:41:35 INFO: id_grid_export_today = sensor.solis_grid_export_today 0.4: value(s) in YAML 21:41:35 INFO: id_battery_soc = sensor.solis_battery_soc 24.0: value(s) in YAML 21:41:35 INFO: id_timed_charge_start_hours = number.solis_timed_charge_start_hours 20.0: value(s) in YAML 21:41:35 INFO: id_timed_charge_start_minutes = number.solis_timed_charge_start_minutes 30.0: value(s) in YAML 21:41:35 INFO: id_timed_charge_end_hours = number.solis_timed_charge_end_hours 21.0: value(s) in YAML 21:41:35 INFO: id_timed_charge_end_minutes = number.solis_timed_charge_end_minutes 0.0: value(s) in YAML 21:41:35 INFO: id_timed_charge_current = number.solis_timed_charge_current 30.0: value(s) in YAML 21:41:35 INFO: id_timed_discharge_start_hours = number.solis_timed_discharge_start_hours 0.0: value(s) in YAML 21:41:35 INFO: id_timed_discharge_start_minutes = number.solis_timed_discharge_start_minutes 0.0: value(s) in YAML 21:41:35 INFO: id_timed_discharge_end_hours = number.solis_timed_discharge_end_hours 0.0: value(s) in YAML 21:41:35 INFO: id_timed_discharge_end_minutes = number.solis_timed_discharge_end_minutes 0.0: value(s) in YAML 21:41:35 INFO: id_timed_discharge_current = number.solis_timed_discharge_current 60.0: value(s) in YAML 21:41:35 INFO: id_timed_charge_discharge_button = button.solis_update_charge_discharge_times 2024-02-01T16:30:20.738670+00:00: value(s) in YAML 21:41:35 INFO: id_inverter_mode = select.solis_energy_storage_control_switch Timed Charge/Discharge: value(s) in YAML 21:41:35 INFO: 21:41:35 INFO: Checking config: 21:41:35 INFO: ----------------------- 21:41:35 WARNING: forced_charge = True True: system default. Not in YAML. 21:41:35 WARNING: forced_discharge = True True: system default. Not in YAML. 21:41:35 WARNING: read_only = True True: system default. Not in YAML. 21:41:35 WARNING: allow_cyclic = False False: system default. Not in YAML. 21:41:35 WARNING: optimise_frequency_minutes = 10 10: system default. Not in YAML. 21:41:35 WARNING: slot_threshold_p = 1.0 1.0: system default. Not in YAML. 21:41:35 WARNING: day_of_week_weighting = 0.5 0.5: system default. Not in YAML. 21:41:35 WARNING: pass_threshold_p = 4.0 4.0: system default. Not in YAML. 21:41:35 WARNING: octopus_auto = True True: system default. Not in YAML. 21:41:35 WARNING: inverter_efficiency_percent = 97 97: system default. Not in YAML. 21:41:35 WARNING: charger_efficiency_percent = 91 91: system default. Not in YAML. 21:41:35 WARNING: inverter_loss_watts = 100 100: system default. Not in YAML. 21:41:35 WARNING: solar_forecast = Solcast Solcast: system default. Not in YAML. 21:41:35 WARNING: consumption_grouping = mean mean: system default. Not in YAML. 21:41:35 WARNING: forced_power_group_tolerance = 100 100: system default. Not in YAML. 21:41:35 WARNING: id_battery_charge_power = sensor.solis_battery_input_energy 0.0: system default. Not in YAML. 21:41:35 WARNING: id_inverter_ac_power = sensor.solis_active_power 890.0: system default. Not in YAML. 21:41:35 WARNING: supports_hold_soc = True True: system default. Not in YAML. 21:41:35 WARNING: id_backup_mode_soc = number.solis_backup_mode_soc 100.0: system default. Not in YAML. 21:41:35 INFO: 21:41:35 INFO: >>> {'consumption_history_days': 2, 'redact_personal_data_from_log': True, 'battery_capacity_wh': 5000, 'charger_power_watts': 3600, 'inverter_power_watts': 3600, 'id_solcast_today': 'sensor.solcast_pv_forecast_forecast_today', 'id_solcast_tomorrow': 'sensor.solcast_pv_forecast_forecast_tomorrow', 'battery_voltage': 'sensor.solis_battery_voltage', 'update_cycle_seconds': 15, 'maximum_dod_percent': 'number.solis_battery_minimum_soc', 'id_consumption_today': 'sensor.solis_house_load_today', 'id_grid_import_today': 'sensor.solis_grid_import_today', 'id_grid_export_today': 'sensor.solis_grid_export_today', 'id_battery_soc': 'sensor.solis_battery_soc', 'id_timed_charge_start_hours': 'number.solis_timed_charge_start_hours', 'id_timed_charge_start_minutes': 'number.solis_timed_charge_start_minutes', 'id_timed_charge_end_hours': 'number.solis_timed_charge_end_hours', 'id_timed_charge_end_minutes': 'number.solis_timed_charge_end_minutes', 'id_timed_charge_current': 'number.solis_timed_charge_current', 'id_timed_discharge_start_hours': 'number.solis_timed_discharge_start_hours', 'id_timed_discharge_start_minutes': 'number.solis_timed_discharge_start_minutes', 'id_timed_discharge_end_hours': 'number.solis_timed_discharge_end_hours', 'id_timed_discharge_end_minutes': 'number.solis_timed_discharge_end_minutes', 'id_timed_discharge_current': 'number.solis_timed_discharge_current', 'id_timed_charge_discharge_button': 'button.solis_update_charge_discharge_times', 'id_inverter_mode': 'select.solis_energy_storage_control_switch'} 21:41:35 INFO: 21:41:35 INFO: Syncing config with Home Assistant: 21:41:35 INFO: ----------------------------------- 21:41:35 INFO: 21:41:35 INFO: Config Item HA Entity Current State 21:41:35 INFO: ----------- --------- ------------- 21:41:35 INFO: forced_charge switch.pvopt_forced_charge on 21:41:35 INFO: forced_discharge switch.pvopt_forced_discharge on 21:41:35 INFO: read_only switch.pvopt_read_only on 21:41:35 INFO: allow_cyclic switch.pvopt_allow_cyclic off 21:41:35 INFO: optimise_frequency_minutes number.pvopt_optimise_frequency_minutes 10 21:41:35 INFO: slot_threshold_p number.pvopt_slot_threshold_p 1 21:41:35 INFO: day_of_week_weighting number.pvopt_day_of_week_weighting 0.5 21:41:35 INFO: pass_threshold_p number.pvopt_pass_threshold_p 4 21:41:35 INFO: battery_capacity_wh number.pvopt_battery_capacity_wh 5000 21:41:35 INFO: inverter_efficiency_percent number.pvopt_inverter_efficiency_percent 97 21:41:35 INFO: charger_efficiency_percent number.pvopt_charger_efficiency_percent 91 21:41:35 INFO: charger_power_watts number.pvopt_charger_power_watts 3600 21:41:35 INFO: inverter_power_watts number.pvopt_inverter_power_watts 3600 21:41:35 INFO: inverter_loss_watts number.pvopt_inverter_loss_watts 100 21:41:35 INFO: solar_forecast select.pvopt_solar_forecast Solcast 21:41:35 INFO: consumption_history_days number.pvopt_consumption_history_days 2 21:41:35 INFO: consumption_margin number.pvopt_consumption_margin 10 21:41:35 INFO: consumption_grouping select.pvopt_consumption_grouping mean 21:41:35 INFO: forced_power_group_tolerance number.pvopt_forced_power_group_tolerance 100 21:41:35 INFO: 21:41:35 INFO: Loading Contract: 21:41:35 INFO: ----------------- 21:41:35 INFO: Trying to auto detect Octopus tariffs: 21:41:35 INFO: Found import entity event.octopus_energyelectricity****_current_day_rates 21:41:35 INFO: Found export entity event.octopus_energyelectricity****_export_current_day_rates 21:41:36 INFO: Contract tariffs loaded OK 21:41:36 INFO: Import: E-1R-AGILE-FLEX-22-11-25-N Start: 2024-01-23 13:00:00+0000 End: 2024-02-02 23:00:00+0000 21:41:36 INFO: Export: E-1R-OUTGOING-FIX-12M-19-05-13-N Start: 2019-05-15 23:00:00+0000 End: N/A 21:41:36 INFO: 21:41:36 INFO: AGILE tariff detected. Rates will update at 16:00 daily 21:41:36 INFO: 21:41:36 INFO: 21:41:36 INFO: Found Octopus Savings Events entity: event.octopusenergy**_octoplus_saving_session_events 21:41:36 INFO: 21:41:36 INFO: No upcoming Octopus Saving Events detected or joined: 21:41:36 INFO: Finished loading contract 21:41:36 INFO: 21:41:36 INFO: Running initial Optimisation: 21:41:36 INFO: 21:41:36 INFO: 21:41:36 INFO: Found Octopus Savings Events entity: event.octopusenergy**_octoplus_saving_session_events 21:41:36 INFO: 21:41:36 INFO: No upcoming Octopus Saving Events detected or joined: 21:41:36 INFO: 21:41:36 INFO: Starting Opimisation with discharge enabled 21:41:36 INFO: ------------------------------------------- 21:41:36 INFO: 21:41:36 INFO: Checking tariffs: 21:41:36 INFO: ----------------- 21:41:36 INFO: Import: E-1R-AGILE-FLEX-22-11-25-N Start: 2024-01-23 13:00:00+0000 End: 2024-02-02 23:00:00+0000 21:41:36 INFO: Export: E-1R-OUTGOING-FIX-12M-19-05-13-N Start: 2019-05-15 23:00:00+0000 End: N/A 21:41:36 INFO: 21:41:36 INFO: AGILE tariff detected. Rates will update at 16:00 daily 21:41:36 INFO: - Tariffs OK 21:41:36 INFO: 21:41:36 INFO: Solcast forecast loaded OK 21:41:36 INFO: Getting expected consumption data 21:41:36 INFO: - Estimated consumption from sensor.solis_house_load_today loaded OK 21:41:36 INFO: Initial SOC: 27.5 21:41:36 INFO: Calculating Base flows 21:41:36 INFO: 21:41:36 INFO: Retrieved day ahead forecast for period 25/01 23:00 - 02/02 22:00 for tariff E-1R-AGILE-FLEX-22-11-25-N 21:42:36 INFO: >>> Agile Callback Handler 21:42:36 INFO: >>> Contract end day: 2 Today: 1 False 21:42:36 INFO: >>> Current hour: 21 True
21:41:36 WARNING pv_opt: ------------------------------------------------------------ 21:41:36 WARNING pv_opt: Unexpected error running initialize() for pv_opt 21:41:36 WARNING pv_opt: ------------------------------------------------------------ 21:41:36 WARNING pv_opt: Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 162, in initialize_app await utils.run_in_executor(self, init) File "/usr/lib/python3.11/site-packages/appdaemon/utils.py", line 304, in run_in_executor response = future.result() ^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 325, in initialize self.optimise() File "/usr/lib/python3.11/site-packages/appdaemon/adbase.py", line 35, in f_app_lock return f(args, kw) ^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 1358, in optimise self.base_cost = self.contract.net_cost(self.base) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pvpy.py", line 442, in net_cost imp_df = self.imp.to_df(start, end, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pvpy.py", line 230, in to_df newindex = pd.date_range(x.index[0], df.index[-1], freq="30T")
File "/usr/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 5385, in __getitem__
return getitem(key)
^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pandas/core/arrays/datetimelike.py", line 379, in __getitem__
result = cast("Union[Self, DTScalarOrNaT]", super().__getitem__(key))
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pandas/core/arrays/_mixins.py", line 284, in __getitem__
result = self._ndarray[key]
~~~~~~~~~~~~~^^^^^
IndexError: index -1 is out of bounds for axis 0 with size 0
21:41:36 WARNING pv_opt: ------------------------------------------------------------
Not sure if relevant, but in the main I see a warning that it didn't found the solis dependency as it ignored the file?
21:41:31 INFO AppDaemon: Starting API
21:41:31 INFO AppDaemon: Starting Admin Interface
21:41:31 INFO AppDaemon: Starting Dashboards
21:41:32 INFO HASS: Connected to Home Assistant 2024.1.6
21:41:32 INFO MQTT: Connected to Broker at URL core-mosquitto:1883
21:41:32 INFO AppDaemon: Got initial state from namespace mqtt
21:41:32 INFO MQTT: MQTT Plugin initialization complete
21:41:32 INFO AppDaemon: App 'pv_opt' added
21:41:32 INFO AppDaemon: Found 1 active apps
21:41:32 INFO AppDaemon: Found 0 inactive apps
21:41:32 INFO AppDaemon: Found 2 global libraries
21:41:32 INFO AppDaemon: Starting Apps with 1 workers and 1 pins
21:41:32 INFO AppDaemon: Running on port 5050
21:41:33 INFO HASS: Evaluating startup conditions
21:41:33 INFO HASS: Startup condition met: hass state=RUNNING
21:41:33 INFO HASS: All startup conditions met
21:41:33 INFO AppDaemon: Got initial state from namespace default
21:41:34 INFO AppDaemon: Scheduler running in realtime
21:41:34 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/ to module import path
21:41:34 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/pv_opt to module import path
21:41:35 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/pv_opt/config to module import path
21:41:35 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/pv_opt/solis.py - ignoring
21:41:35 INFO AppDaemon: Loading App Module: /homeassistant/appdaemon/apps/pv_opt/pv_opt.py
21:41:35 INFO AppDaemon: Loading Global Module: /homeassistant/appdaemon/apps/pv_opt/pvpy.py
21:41:35 WARNING AppDaemon: Unable to find app solis in dependencies for pv_opt
21:41:35 WARNING AppDaemon: Ignoring app pv_opt
21:41:35 INFO AppDaemon: Loading app pv_opt using class PVOpt from module pv_opt
21:41:35 INFO AppDaemon: Calling initialize() for pv_opt
21:41:36 WARNING AppDaemon: Logged an error to /share/logs/appdaemon/error.log
21:41:36 INFO AppDaemon: App initialization complete
Anyhow as before pvopt sensors are not calculated.
Please can you try 3.7.1 (pre-release). I'm not sure it will fix the issue but it has some additional logging to diagnose.
It looks like it's not loading the Agile prices properly
Looks like just the same unfortunately.
22:59:35 WARNING pv_opt: ------------------------------------------------------------ 22:59:35 WARNING pv_opt: Unexpected error running initialize() for pv_opt 22:59:35 WARNING pv_opt: ------------------------------------------------------------ 22:59:35 WARNING pv_opt: Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 162, in initialize_app await utils.run_in_executor(self, init) File "/usr/lib/python3.11/site-packages/appdaemon/utils.py", line 304, in run_in_executor response = future.result() ^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 324, in initialize self.optimise() File "/usr/lib/python3.11/site-packages/appdaemon/adbase.py", line 35, in f_app_lock return f(args, kw) ^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 1352, in optimise self.base_cost = self.contract.net_cost(self.base) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pvpy.py", line 446, in net_cost imp_df = self.imp.to_df(start, end, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pvpy.py", line 234, in to_df newindex = pd.date_range(x.index[0], df.index[-1], freq="30T")
File "/usr/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 5385, in __getitem__
return getitem(key)
^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pandas/core/arrays/datetimelike.py", line 379, in __getitem__
result = cast("Union[Self, DTScalarOrNaT]", super().__getitem__(key))
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pandas/core/arrays/_mixins.py", line 284, in __getitem__
result = self._ndarray[key]
~~~~~~~~~~~~~^^^^^
IndexError: index -1 is out of bounds for axis 0 with size 0
22:59:35 WARNING pv_opt: ------------------------------------------------------------
22:59:34 INFO: AGILE tariff detected. Rates will update at 16:00 daily
22:59:34 INFO: - Tariffs OK
22:59:34 INFO:
22:59:34 INFO: Solcast forecast loaded OK
22:59:34 INFO: Getting expected consumption data
22:59:34 INFO: - Estimated consumption from sensor.solis_house_load_today loaded OK
22:59:34 INFO: Initial SOC: 15.0
22:59:34 INFO: Calculating Base flows
22:59:34 INFO: >>> Start: 01/02 22:30 End: 01/02 18:30
22:59:34 INFO: >>> 2 1
22:59:35 INFO:
22:59:35 INFO: Retrieved day ahead forecast for period 25/01 23:00 - 02/02 22:00 for tariff E-1R-AGILE-FLEX-22-11-25-N
23:00:34 INFO: >>> Agile Callback Handler
23:00:34 INFO: >>> Contract end day: 2 Today: 1 False
23:00:34 INFO: >>> Current hour: 23 True
But I can see that it’s only loaded the Agile prices to 18.30 today which is odd On 1 Feb 2024 at 23:10 +0000, fboundy/pv_opt @.***>, wrote:
You
Is the Octopus integration loading prices OK? On 1 Feb 2024 at 23:10 +0000, SzosszeNET @.***>, wrote:
Looks like just the same unfortunately. 22:59:35 WARNING pv_opt: ------------------------------------------------------------ 22:59:35 WARNING pv_opt: Unexpected error running initialize() for pv_opt 22:59:35 WARNING pv_opt: ------------------------------------------------------------ 22:59:35 WARNING pv_opt: Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 162, in initialize_app await utils.run_in_executor(self, init) File "/usr/lib/python3.11/site-packages/appdaemon/utils.py", line 304, in run_in_executor response = future.result() ^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 324, in initialize self.optimise() File "/usr/lib/python3.11/site-packages/appdaemon/adbase.py", line 35, in f_app_lock return f(args, kw) ^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 1352, in optimise self.base_cost = self.contract.net_cost(self.base) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pvpy.py", line 446, in net_cost imp_df = self.imp.to_df(start, end, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pvpy.py", line 234, in to_df newindex = pd.date_range(x.index[0], df.index[-1], freq="30T")
File "/usr/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 5385, in getitem return getitem(key) ^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/pandas/core/arrays/datetimelike.py", line 379, in getitem result = cast("Union[Self, DTScalarOrNaT]", super().getitem(key)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/pandas/core/arrays/_mixins.py", line 284, in getitem result = self._ndarray[key] ~~~~~~~~~~~~~^^^^^ IndexError: index -1 is out of bounds for axis 0 with size 0 22:59:35 WARNING pv_opt: ------------------------------------------------------------ 22:59:34 INFO: AGILE tariff detected. Rates will update at 16:00 daily 22:59:34 INFO: - Tariffs OK 22:59:34 INFO: 22:59:34 INFO: Solcast forecast loaded OK 22:59:34 INFO: Getting expected consumption data 22:59:34 INFO: - Estimated consumption from sensor.solis_house_load_today loaded OK 22:59:34 INFO: Initial SOC: 15.0 22:59:34 INFO: Calculating Base flows 22:59:34 INFO: >>> Start: 01/02 22:30 End: 01/02 18:30 22:59:34 INFO: >>> 2 1 22:59:35 INFO: 22:59:35 INFO: Retrieved day ahead forecast for period 25/01 23:00 - 02/02 22:00 for tariff E-1R-AGILE-FLEX-22-11-25-N 23:00:34 INFO: >>> Agile Callback Handler 23:00:34 INFO: >>> Contract end day: 2 Today: 1 False 23:00:34 INFO: >>> Current hour: 23 True — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: ***@***.***>
I believe have no problems with that.
That looks like the Octopus app. Do you use Bottlecap Dave’s OE integration for HA and is it working? On 2 Feb 2024 at 07:54 +0000, SzosszeNET @.***>, wrote:
I believe have no problems with that. Screenshot_20240202-075023.png (view on web) Screenshot_20240202-074941.png (view on web) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Sorry for the confusion, the first screengrab is indeed the octopus app I used for reference. The second screengrab was from HA the price card working with Bottlecap Dave's OE integration loading the prices just fine
Anyhow this gave me an idea and did hard-code my tarrifs
` #octopus_account: !secret octopus_account
octopus_import_tariff_code: E-1R-AGILE-FLEX-22-11-25-N octopus_export_tariff_code: E-1R-OUTGOING-FIX-12M-19-05-13-N`
This did seem to do the trick so you are right it's indeed something around the octopus API integration goes wrong.
Great thanks. I’ll check that On 2 Feb 2024 at 09:11 +0000, SzosszeNET @.***>, wrote:
Anyhow this gave me an idea and did hard-code my tarrifs ` #octopus_account: !secret octopus_account
octopus_api_key: !secret octopus_api_key
The following Can be omitted if either of the above options is working correctly: octopus_import_tariff_code: E-1R-AGILE-FLEX-22-11-25-N octopus_export_tariff_code: E-1R-OUTGOING-FIX-12M-19-05-13-N` This did seem to do the trick so you are right it's indeed something around the octopus API integration goes wrong. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Not sure if this is an issue or not - if you think it is I'll open an other bug for this, but wasn't expecting this charge plan to be generated as there are no prices yet for the 3rd February?
10:35:21 INFO: Iteration 2: Slots added: 0
10:35:21 INFO: >>> Start: 02/02 10:30 End: 03/02 23:30
10:35:21 INFO: >>> 2 3
10:35:21 INFO: >>> Start: 02/02 10:30 End: 03/02 23:30
10:35:22 INFO:
10:35:22 INFO: Checking for Hold SOC slots
10:35:22 INFO:
10:35:22 INFO: Optimal forced charge/discharge slots:
10:35:22 INFO: 02-Feb 14:30 - 02-Feb 15:00 Power: 3000W SOC: 44% -> 72%
10:35:22 INFO: 02-Feb 15:00 - 02-Feb 16:00 Power: 3200W SOC: 72% -> 100%
10:35:22 INFO: 02-Feb 20:30 - 02-Feb 21:00 Power: 1000W SOC: 15% -> 24%
10:35:22 INFO: 02-Feb 21:30 - 02-Feb 23:00 Power: 3200W SOC: 15% -> 100%
10:35:22 INFO: 02-Feb 23:00 - 03-Feb 00:00 Power: -3400W SOC: 100% -> 30%
10:35:22 INFO: 03-Feb 01:30 - 03-Feb 02:00 Power: 3200W SOC: 15% -> 44%
10:35:22 INFO: 03-Feb 02:30 - 03-Feb 03:00 Power: 3200W SOC: 24% -> 53%
10:35:22 INFO: 03-Feb 03:30 - 03-Feb 04:00 Power: 3200W SOC: 35% -> 64%
10:35:22 INFO: 03-Feb 05:00 - 03-Feb 06:30 Power: 3200W SOC: 45% -> 100%
10:35:22 INFO: 03-Feb 07:00 - 03-Feb 07:30 Power: 2900W SOC: 90% -> 100%
10:35:22 INFO: 03-Feb 15:30 - 03-Feb 16:00 Power: 1000W SOC: 100% -> 100% <=
10:35:22 INFO: 03-Feb 20:30 - 03-Feb 21:00 Power: 600W SOC: 15% -> 21%
10:35:22 INFO: 03-Feb 21:30 - 03-Feb 22:00 Power: 900W SOC: 15% -> 23%
10:35:22 INFO: 03-Feb 22:30 - 03-Feb 23:00 Power: 1400W SOC: 15% -> 27%
10:35:22 INFO:
10:35:22 INFO: Plan time: 02-Feb 10:30 - 03-Feb 23:30 Initial SOC: 46.5 Base Cost: 377.53 Opt Cost: 266.56
10:35:22 INFO:
10:35:22 INFO: Optimiser elapsed time 14.6 seconds
10:35:22 INFO:
Or is this to be expected?
No it’s expected. It uses Day Ahead pricing to estimate before Agile is released On 2 Feb 2024 at 10:38 +0000, SzosszeNET @.***>, wrote:
Not sure if this is an issue or not - if you think it is I'll open an other bug for this, but wasn't expecting this charge plan to be generated as there are no prices yet for the 3rd February? 10:35:21 INFO: Iteration 2: Slots added: 0 10:35:21 INFO: >>> Start: 02/02 10:30 End: 03/02 23:30 10:35:21 INFO: >>> 2 3 10:35:21 INFO: >>> Start: 02/02 10:30 End: 03/02 23:30 10:35:22 INFO: 10:35:22 INFO: Checking for Hold SOC slots 10:35:22 INFO: 10:35:22 INFO: Optimal forced charge/discharge slots: 10:35:22 INFO: 02-Feb 14:30 - 02-Feb 15:00 Power: 3000W SOC: 44% -> 72% 10:35:22 INFO: 02-Feb 15:00 - 02-Feb 16:00 Power: 3200W SOC: 72% -> 100% 10:35:22 INFO: 02-Feb 20:30 - 02-Feb 21:00 Power: 1000W SOC: 15% -> 24% 10:35:22 INFO: 02-Feb 21:30 - 02-Feb 23:00 Power: 3200W SOC: 15% -> 100% 10:35:22 INFO: 02-Feb 23:00 - 03-Feb 00:00 Power: -3400W SOC: 100% -> 30% 10:35:22 INFO: 03-Feb 01:30 - 03-Feb 02:00 Power: 3200W SOC: 15% -> 44% 10:35:22 INFO: 03-Feb 02:30 - 03-Feb 03:00 Power: 3200W SOC: 24% -> 53% 10:35:22 INFO: 03-Feb 03:30 - 03-Feb 04:00 Power: 3200W SOC: 35% -> 64% 10:35:22 INFO: 03-Feb 05:00 - 03-Feb 06:30 Power: 3200W SOC: 45% -> 100% 10:35:22 INFO: 03-Feb 07:00 - 03-Feb 07:30 Power: 2900W SOC: 90% -> 100% 10:35:22 INFO: 03-Feb 15:30 - 03-Feb 16:00 Power: 1000W SOC: 100% -> 100% <= 10:35:22 INFO: 03-Feb 20:30 - 03-Feb 21:00 Power: 600W SOC: 15% -> 21% 10:35:22 INFO: 03-Feb 21:30 - 03-Feb 22:00 Power: 900W SOC: 15% -> 23% 10:35:22 INFO: 03-Feb 22:30 - 03-Feb 23:00 Power: 1400W SOC: 15% -> 27% 10:35:22 INFO: 10:35:22 INFO: Plan time: 02-Feb 10:30 - 03-Feb 23:30 Initial SOC: 46.5 Base Cost: 377.53 Opt Cost: 266.56 10:35:22 INFO: 10:35:22 INFO: Optimiser elapsed time 14.6 seconds 10:35:22 INFO: Or is this to be expected? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Anyhow this gave me an idea and did hard-code my tarrifs
` #octopus_account: !secret octopus_account #octopus_api_key: !secret octopus_api_key
The following Can be omitted if either of the above options is working correctly:
octopus_import_tariff_code: E-1R-AGILE-FLEX-22-11-25-N octopus_export_tariff_code: E-1R-OUTGOING-FIX-12M-19-05-13-N`
This did seem to do the trick so you are right it's indeed something around the octopus API integration goes wrong.
Hi - I think I am (again) having the same issue - did you fix by just ‘uncommenting’ the tarrifs directly ?
Cheers,
p
I'm also wondering whether appdaemon is loading things at all - where are you pulling the above logs from ? My appdaemon one is just -
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.9/17.9 MB 9.1 MB/s eta 0:00:00
Installing collected packages: numpy Successfully installed numpy-1.25.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Looking in indexes: https://pypi.org/simple, https://wheels.home-assistant.io/musllinux-index/ Collecting pandas Downloading pandas-2.2.0-cp311-cp311-musllinux_1_1_x86_64.whl.metadata (19 kB) Requirement already satisfied: numpy<2,>=1.23.2 in /usr/lib/python3.11/site-packages (from pandas) (1.25.0) Requirement already satisfied: python-dateutil>=2.8.2 in /usr/lib/python3.11/site-packages (from pandas) (2.8.2) Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3.11/site-packages (from pandas) (2023.3.post1) Collecting tzdata>=2022.7 (from pandas) Downloading https://wheels.home-assistant.io/musllinux-index/tzdata-2023.4-py2.py3-none-any.whl (346 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 346.6/346.6 kB 5.6 MB/s eta 0:00:00 Requirement already satisfied: six>=1.5 in /usr/lib/python3.11/site-packages (from python-dateutil>=2.8.2->pandas) (1.16.0) Downloading pandas-2.2.0-cp311-cp311-musllinux_1_1_x86_64.whl (13.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.9/13.9 MB 8.9 MB/s eta 0:00:00 Installing collected packages: tzdata, pandas Successfully installed pandas-2.2.0 tzdata-2023.4 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv s6-rc: info: service init-appdaemon successfully started s6-rc: info: service appdaemon: starting s6-rc: info: service appdaemon successfully started s6-rc: info: service legacy-services: starting [10:39:15] INFO: Starting AppDaemon... s6-rc: info: service legacy-services successfully started 2024-02-04 10:39:16.272541 INFO AppDaemon: AppDaemon Version 4.4.2 starting 2024-02-04 10:39:16.272642 INFO AppDaemon: Python version is 3.11.6 2024-02-04 10:39:16.272731 INFO AppDaemon: Configuration read from: /config/appdaemon.yaml 2024-02-04 10:39:16.272826 INFO AppDaemon: Added log: AppDaemon 2024-02-04 10:39:16.272904 INFO AppDaemon: Added log: Error 2024-02-04 10:39:16.272954 INFO AppDaemon: Added log: Access 2024-02-04 10:39:16.273003 INFO AppDaemon: Added log: Diag 2024-02-04 10:39:16.350268 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin 2024-02-04 10:39:16.487260 INFO HASS: HASS Plugin Initializing 2024-02-04 10:39:16.487380 WARNING HASS: ha_url not found in HASS configuration - module not initialized 2024-02-04 10:39:16.487468 INFO HASS: HASS Plugin initialization complete 2024-02-04 10:39:16.487593 INFO AppDaemon: Loading Plugin MQTT using class MqttPlugin from module mqttplugin 2024-02-04 10:39:16.520284 INFO MQTT: MQTT Plugin Initializing 2024-02-04 10:39:16.520623 INFO MQTT: Using 'localad/status' as Will Topic 2024-02-04 10:39:16.520708 INFO MQTT: Using 'localad/status' as Birth Topic 2024-02-04 10:39:16.520978 INFO AppDaemon: HTTP is disabled 2024-02-04 10:39:16.526313 INFO HASS: Connected to Home Assistant 2024.1.5 2024-02-04 10:39:16.540788 WARNING AppDaemon: ------------------------------------------------------------ 2024-02-04 10:39:16.540912 WARNING AppDaemon: Unexpected error loading config file: /homeassistant/appdaemon/apps/pv_opt/config/config.yaml 2024-02-04 10:39:16.540979 WARNING AppDaemon: ------------------------------------------------------------ 2024-02-04 10:39:16.542319 WARNING AppDaemon: Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 578, in read_config_file return utils.read_config_file(file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/appdaemon/utils.py", line 586, in read_config_file return read_yaml_config(path) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/appdaemon/utils.py", line 756, in read_yaml_config config = yaml.load(config_file_contents, Loader=yaml.SafeLoader) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/yaml/init.py", line 81, in load return loader.get_single_data() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/yaml/constructor.py", line 51, in get_single_data return self.construct_document(node) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/yaml/constructor.py", line 60, in construct_document for dummy in generator: File "/usr/lib/python3.11/site-packages/yaml/constructor.py", line 413, in construct_yaml_map value = self.construct_mapping(node) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/yaml/constructor.py", line 218, in construct_mapping return super().construct_mapping(node, deep=deep) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/yaml/constructor.py", line 143, in construct_mapping value = self.construct_object(value_node, deep=deep) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/yaml/constructor.py", line 100, in construct_object data = constructor(self, node) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/appdaemon/utils.py", line 676, in _secret_yaml raise ValueError("{} not found in secrets file".format(node.value)) ValueError: octopus_account not found in secrets file
2024-02-04 10:39:16.542403 WARNING AppDaemon: ------------------------------------------------------------ 2024-02-04 10:39:16.544536 WARNING AppDaemon: File '/homeassistant/appdaemon/apps/pv_opt/config/config.yaml' invalid structure - ignoring 2024-02-04 10:39:16.545272 INFO AppDaemon: Found 0 active apps 2024-02-04 10:39:16.545579 INFO AppDaemon: Found 0 inactive apps 2024-02-04 10:39:16.545846 INFO AppDaemon: Found 0 global libraries 2024-02-04 10:39:16.546113 INFO AppDaemon: Starting Apps with 0 workers and 0 pins 2024-02-04 10:39:16.587404 INFO HASS: Evaluating startup conditions 2024-02-04 10:39:16.597469 INFO HASS: Startup condition met: hass state=RUNNING 2024-02-04 10:39:16.600946 INFO HASS: All startup conditions met 2024-02-04 10:39:16.639470 INFO AppDaemon: Got initial state from namespace default 2024-02-04 10:39:16.667677 INFO MQTT: Connected to Broker at URL core-mosquitto:1883 2024-02-04 10:39:17.548272 INFO AppDaemon: Got initial state from namespace mqtt 2024-02-04 10:39:17.548400 INFO MQTT: MQTT Plugin initialization complete 2024-02-04 10:39:19.551005 INFO AppDaemon: Scheduler running in realtime 2024-02-04 10:39:19.551916 INFO AppDaemon: Adding /homeassistant/appdaemon/apps to module import path 2024-02-04 10:39:19.552047 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/pv_opt to module import path 2024-02-04 10:39:19.552166 INFO AppDaemon: Adding /homeassistant/appdaemon/apps/pv_opt/config to module import path 2024-02-04 10:39:19.553080 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/pv_opt/pv_opt.py - ignoring 2024-02-04 10:39:19.553313 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/pv_opt/pvpy.py - ignoring 2024-02-04 10:39:19.553677 WARNING AppDaemon: No app description found for: /homeassistant/appdaemon/apps/pv_opt/solis.py - ignoring 2024-02-04 10:39:19.554183 INFO AppDaemon: App initialization complete
@lazy-pete as the error states something wrong with your secrets?
"ValueError("{} not found in secrets file".format(node.value)) ValueError: octopus_account not found in secrets file"
Are "octopus_account" and " octopus_api_key" defined in your "secrets.yaml"? It's next to your home assistant configuration.yaml
thanks - they were in there, but I must've set it up wrong - removed indents and heading to account and api and got a bit further - now a different issue .... first from HA Logs
Logger: homeassistant.helpers.event Source: helpers/template.py:569 First occurred: 02:07:54 (100 occurrences) Last logged: 12:41:38
Error while processing template: Template<template=(
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 693, in async_render_to_info render_info._result = self.async_render( ^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 569, in async_render raise TemplateError(err) from err homeassistant.exceptions.TemplateError: ZeroDivisionError: division by zero
This from AppDaemon logs
/homeassistant/appdaemon/apps/pv_opt/pvpy.py:208: FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead. extended_index = pd.date_range( /homeassistant/appdaemon/apps/pv_opt/pvpy.py:230: FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead. newindex = pd.date_range(x.index[0], df.index[-1], freq="30T") /homeassistant/appdaemon/apps/pv_opt/pvpy.py:202: FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead. newindex = pd.date_range(df.index[0], end, freq="30T") /homeassistant/appdaemon/apps/pv_opt/pvpy.py:492: FutureWarning: 'T' is deprecated and will be removed in a future version. Please use 'min' instead of 'T'. freq = pd.infer_freq(static_flows.index) / pd.Timedelta("60T") 2024-02-04 12:32:00.678427 INFO pv_opt: 2024-02-04 12:32:00.679675 INFO pv_opt: Discharge net cost delta: -0.0p: < threshold (4.0) => Excluded 2024-02-04 12:32:00.681029 INFO pv_opt: Iteration 2: Slots added: 0 2024-02-04 12:32:00.682443 INFO pv_opt: 2024-02-04 12:32:00.683661 INFO pv_opt: Removing cyclic charge/discharge /homeassistant/appdaemon/apps/pv_opt/pvpy.py:492: FutureWarning: 'T' is deprecated and will be removed in a future version. Please use 'min' instead of 'T'. freq = pd.infer_freq(static_flows.index) / pd.Timedelta("60T") /homeassistant/appdaemon/apps/pv_opt/pvpy.py:209: FutureWarning: 'T' is deprecated and will be removed in a future version. Please use 'min' instead of 'T'. df.index[-1] + pd.Timedelta("30T"), /homeassistant/appdaemon/apps/pv_opt/pvpy.py:210: FutureWarning: 'H' is deprecated and will be removed in a future version. Please use 'h' instead of 'H'. df.index[-1] + pd.Timedelta("24H"), /homeassistant/appdaemon/apps/pv_opt/pvpy.py:208: FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead. extended_index = pd.date_range( /homeassistant/appdaemon/apps/pv_opt/pvpy.py:230: FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead. newindex = pd.date_range(x.index[0], df.index[-1], freq="30T") /homeassistant/appdaemon/apps/pv_opt/pvpy.py:202: FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead. newindex = pd.date_range(df.index[0], end, freq="30T") 2024-02-04 12:32:00.708227 INFO pv_opt: Net cost revised from 314.1p to 348.2p /homeassistant/appdaemon/apps/pv_opt/pvpy.py:209: FutureWarning: 'T' is deprecated and will be removed in a future version. Please use 'min' instead of 'T'. df.index[-1] + pd.Timedelta("30T"), /homeassistant/appdaemon/apps/pv_opt/pvpy.py:210: FutureWarning: 'H' is deprecated and will be removed in a future version. Please use 'h' instead of 'H'. df.index[-1] + pd.Timedelta("24H"), /homeassistant/appdaemon/apps/pv_opt/pvpy.py:208: FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead. extended_index = pd.date_range( /homeassistant/appdaemon/apps/pv_opt/pvpy.py:230: FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead. newindex = pd.date_range(x.index[0], df.index[-1], freq="30T") /homeassistant/appdaemon/apps/pv_opt/pvpy.py:202: FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead. newindex = pd.date_range(df.index[0], end, freq="30T") 2024-02-04 12:32:00.725381 INFO pv_opt: /homeassistant/appdaemon/apps/pv_opt/pv_opt.py:1615: FutureWarning: 'T' is deprecated and will be removed in a future version. Please use 'min' instead of 'T'. x["end"] = x.index + pd.Timedelta("30T") /homeassistant/appdaemon/apps/pv_opt/pv_opt.py:1628: FutureWarning: 'T' is deprecated and will be removed in a future version. Please use 'min' instead of 'T'. x["end"] = x.index + pd.Timedelta("30T") 2024-02-04 12:32:00.736065 INFO pv_opt: Checking for Hold SOC slots /homeassistant/appdaemon/apps/pv_opt/pv_opt.py:1649: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0! You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy. A typical example is when you are setting values in a column of a DataFrame, like:
df["col"][row_indexer] = value
Use df.loc[row_indexer, "col"] = values
instead, to perform the assignment in a single step and ensure this keeps updating the original df
.
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
self.windows["hold_soc"].loc[ /homeassistant/appdaemon/apps/pv_opt/pv_opt.py:1649: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
self.windows["hold_soc"].loc[
2024-02-04 12:32:00.737525 INFO pv_opt:
2024-02-04 12:32:00.738322 INFO pv_opt: Optimal forced charge/discharge slots:
2024-02-04 12:32:00.739444 INFO pv_opt: 04-Feb 12:30 - 04-Feb 13:00 Power: -2900W SOC: 39% -> 15%
2024-02-04 12:32:00.740421 INFO pv_opt: 04-Feb 13:30 - 04-Feb 15:00 Power: 3500W SOC: 15% -> 92%
2024-02-04 12:32:00.741349 INFO pv_opt: 04-Feb 15:30 - 04-Feb 16:00 Power: 1200W SOC: 88% -> 99%
2024-02-04 12:32:00.742266 INFO pv_opt: 04-Feb 20:30 - 04-Feb 21:00 Power: 1200W SOC: 15% -> 26%
2024-02-04 12:32:00.743593 INFO pv_opt: 04-Feb 21:30 - 04-Feb 22:00 Power: 1400W SOC: 15% -> 27%
2024-02-04 12:32:00.744523 INFO pv_opt: 05-Feb 02:00 - 05-Feb 03:00 Power: 2000W SOC: 15% -> 52%
2024-02-04 12:32:00.745447 INFO pv_opt: 05-Feb 03:00 - 05-Feb 04:30 Power: 3500W SOC: 52% -> 100%
2024-02-04 12:32:00.746363 INFO pv_opt: 05-Feb 04:30 - 05-Feb 05:30 Power: 700W SOC: 100% -> 100% <=
2024-02-04 12:32:00.747278 INFO pv_opt: 05-Feb 05:30 - 05-Feb 06:30 Power: 600W SOC: 100% -> 100% <=
2024-02-04 12:32:00.748206 INFO pv_opt: 05-Feb 06:30 - 05-Feb 07:00 Power: 400W SOC: 100% -> 100% <=
2024-02-04 12:32:00.749122 INFO pv_opt: 05-Feb 13:00 - 05-Feb 14:00 Power: 400W SOC: 15% -> 22%
2024-02-04 12:32:00.750032 INFO pv_opt: 05-Feb 14:00 - 05-Feb 14:30 Power: 3500W SOC: 22% -> 54%
2024-02-04 12:32:00.751049 WARNING pv_opt: ------------------------------------------------------------
2024-02-04 12:32:00.751151 WARNING pv_opt: Unexpected error in worker for App pv_opt:
2024-02-04 12:32:00.751223 WARNING pv_opt: Worker Ags: {}
2024-02-04 12:32:00.751289 WARNING pv_opt: ------------------------------------------------------------
2024-02-04 12:32:00.752683 WARNING pv_opt: Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 162, in initialize_app
await utils.run_in_executor(self, init)
File "/usr/lib/python3.11/site-packages/appdaemon/utils.py", line 304, in run_in_executor
response = future.result()
^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, *self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 325, in initialize
self.optimise()
File "/usr/lib/python3.11/site-packages/appdaemon/adbase.py", line 35, in f_app_lock
return f(args, **kw)
^^^^^^^^^^^^^^
File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 1370, in optimise
self._create_windows()
File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 1662, in _create_windows
self.charge_current = self.charge_power / self.get_config("battery_voltage")
TypeError: ufunc 'divide' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
2024-02-04 12:32:00.752788 WARNING pv_opt: ------------------------------------------------------------
2024-02-04 12:32:00.752938 INFO AppDaemon: App initialization complete
2024-02-04 12:32:52.861413 INFO pv_opt: >>> Agile Callback Handler
If I'm reading this right your battery_voltage isn't coming through?
Check your config and search for that parameter
Should map to something like
sensor.{{device}}_battery_voltage if you are using the solax Solis integration.
You might want to check if you have that entity in HA under Settings>Devices & Services>Entities
Ah - I have sensor.solis_battery_voltage_2 Must have failed to delete a previous version - I can’t rename _2 as there seems to be an orphan sensor.solis_battery_voltage in the registry. I’ll have to work out how to get rid of that then rename. Probably easier than finding every reference in the config and changing to _2.
Thanks for helping with this - no idea how to interpret the log files !
It's all right, you might want to check the other sensors, it's possible that every one of them will have an orphaned.
Either works, but indeed the cleanest to delete the orphaned and rename the working one.
If you have a duplicate of all, probably the fastest is to add "_2" to all sensors in the pv-opt config file since they are in one single place.
On Sun, 4 Feb 2024, 17:17 lazy-pete, @.***> wrote:
Ah - I have sensor.solis_battery_voltage_2 Must have failed to delete a previous version - I can’t rename _2 as there seems to be an orphan sensor.solis_battery_voltage in the registry. I’ll have to work out how to get rid of that then rename. Probably easier than finding every reference in the config and changing to _2.
Thanks for helping with this - no idea how to interpret the log files !
— Reply to this email directly, view it on GitHub https://github.com/fboundy/pv_opt/issues/104#issuecomment-1925842903, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH2SRZIIOHBHUJY4QYIBT4DYR67BLAVCNFSM6AAAAABCVQ4N72VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVHA2DEOJQGM . You are receiving this because you authored the thread.Message ID: @.***>
Eureka !
It turns out I have many duplicate entities, but almost all the rest have been 'disabled by integration' and not forced _2 on the 'new' entities. The battery voltage one did led me rename the hidden disabled original to _3 so I could rename the active one to the correct label for PVOpt and NOW IT WORKS !
I haven't worked out how to access the entity register as yet , but I'll have to as I've a real mess of 'disabled by integration' entities I can't delete.
Anyway - the current goal of getting PVOpt running is over the line - thanks again for all your help @SzosszeNET and @fboundy for writng it in the first place.
@fboundy , I have since reverted back to get the tariff via the octopus API and that seems to be working fine now, might been an indentation somewhere... Closing this as it works perfectly. Thank you
``
I'm terribly sorry, been trying to work out in the past two days what's going on, but now I'm at loss...
On version 3.6.0 and as far as loading data everything looks just fine:
20:08:33 INFO: PV Opt v3.6.0 20:08:33 INFO: 20:08:33 INFO: Local timezone set to GB 20:08:33 INFO: Time Zone Offset: 0.0 minutes 20:08:33 INFO: Inverter type: SOLIS_SOLAX_MODBUS: inverter module: solis.py 20:08:33 INFO: Reading arguments from YAML: 20:08:33 INFO: ----------------------------------- 20:08:33 INFO: consumption_history_days = 2 2: value in YAML 20:08:33 INFO: battery_capacity_wh = 5000 5000: value in YAML 20:08:33 INFO: charger_power_watts = 3600 3600: value in YAML 20:08:33 INFO: inverter_power_watts = 3600 3600: value in YAML 20:08:33 INFO: id_solcast_today = sensor.solcast_pv_forecast_forecast_today 0.0: value(s) in YAML 20:08:33 INFO: id_solcast_tomorrow = sensor.solcast_pv_forecast_forecast_tomorrow 1.53035: value(s) in YAML 20:08:33 WARNING: consumption_margin = 10 10: system default. Unable to read from HA entities listed in YAML. No default in YAML. 20:08:33 INFO: octopus_account = * **** YAML default value. No default defined. 20:08:33 INFO: octopus_api_key = **** s*****: YAML default value. No default defined. 20:08:33 INFO: battery_voltage = sensor.solis_battery_voltage 52.1: value in YAML 20:08:33 INFO: update_cycle_seconds = 15 15: value in YAML 20:08:33 INFO: maximum_dod_percent = number.solis_battery_minimum_soc 15.0: value in YAML 20:08:33 INFO: id_consumption_today = sensor.solis_house_load_today 22.6: value(s) in YAML 20:08:33 INFO: id_grid_import_today = sensor.solis_grid_import_today 19.2: value(s) in YAML 20:08:33 INFO: id_grid_export_today = sensor.solis_grid_export_today 0.3: value(s) in YAML 20:08:33 INFO: id_battery_soc = sensor.solis_battery_soc 15.0: value(s) in YAML 20:08:33 INFO: id_timed_charge_start_hours = number.solis_timed_charge_start_hours 20.0: value(s) in YAML 20:08:33 INFO: id_timed_charge_start_minutes = number.solis_timed_charge_start_minutes 30.0: value(s) in YAML 20:08:33 INFO: id_timed_charge_end_hours = number.solis_timed_charge_end_hours 21.0: value(s) in YAML 20:08:33 INFO: id_timed_charge_end_minutes = number.solis_timed_charge_end_minutes 0.0: value(s) in YAML 20:08:33 INFO: id_timed_charge_current = number.solis_timed_charge_current 30.0: value(s) in YAML 20:08:33 INFO: id_timed_discharge_start_hours = number.solis_timed_discharge_start_hours 0.0: value(s) in YAML 20:08:33 INFO: id_timed_discharge_start_minutes = number.solis_timed_discharge_start_minutes 0.0: value(s) in YAML 20:08:33 INFO: id_timed_discharge_end_hours = number.solis_timed_discharge_end_hours 0.0: value(s) in YAML 20:08:33 INFO: id_timed_discharge_end_minutes = number.solis_timed_discharge_end_minutes 0.0: value(s) in YAML 20:08:33 INFO: id_timed_discharge_current = number.solis_timed_discharge_current 60.0: value(s) in YAML 20:08:33 INFO: id_timed_charge_discharge_button = button.solis_update_charge_discharge_times 2024-02-01T16:30:20.738670+00:00: value(s) in YAML 20:08:33 INFO: id_inverter_mode = select.solis_energy_storage_control_switch Timed Charge/Discharge: value(s) in YAML 20:08:33 INFO: id_daily_solar = sensor.solis_power_generation_today 2.9: value(s) in YAML 20:08:33 INFO: 20:08:33 INFO: Checking config: 20:08:33 INFO: ----------------------- 20:08:33 WARNING: forced_charge = True True: system default. Not in YAML. 20:08:33 WARNING: forced_discharge = True True: system default. Not in YAML. 20:08:33 WARNING: read_only = True True: system default. Not in YAML. 20:08:33 WARNING: allow_cyclic = False False: system default. Not in YAML. 20:08:33 WARNING: optimise_frequency_minutes = 10 10: system default. Not in YAML. 20:08:33 WARNING: slot_threshold_p = 1.0 1.0: system default. Not in YAML. 20:08:33 WARNING: day_of_week_weighting = 0.5 0.5: system default. Not in YAML. 20:08:33 WARNING: pass_threshold_p = 4.0 4.0: system default. Not in YAML. 20:08:33 WARNING: octopus_auto = True True: system default. Not in YAML. 20:08:33 WARNING: inverter_efficiency_percent = 97 97: system default. Not in YAML. 20:08:33 WARNING: charger_efficiency_percent = 91 91: system default. Not in YAML. 20:08:33 WARNING: inverter_loss_watts = 100 100: system default. Not in YAML. 20:08:33 WARNING: solar_forecast = Solcast Solcast: system default. Not in YAML. 20:08:33 WARNING: consumption_grouping = mean mean: system default. Not in YAML. 20:08:33 WARNING: forced_power_group_tolerance = 100 100: system default. Not in YAML. 20:08:33 WARNING: id_battery_charge_power = sensor.solis_battery_input_energy 0.0: system default. Not in YAML. 20:08:33 WARNING: id_inverter_ac_power = sensor.solis_active_power -90.0: system default. Not in YAML. 20:08:33 WARNING: supports_hold_soc = True True: system default. Not in YAML. 20:08:33 WARNING: id_backup_mode_soc = number.solis_backup_mode_soc 100.0: system default. Not in YAML. 20:08:33 INFO: 20:08:33 INFO: Syncing config with Home Assistant: 20:08:33 INFO: ----------------------------------- 20:08:33 INFO: 20:08:33 INFO: Config Item HA Entity Current State 20:08:33 INFO: ----------- --------- ------------- 20:08:33 INFO: forced_charge switch.pvopt_forced_charge on 20:08:33 INFO: forced_discharge switch.pvopt_forced_discharge on 20:08:33 INFO: read_only switch.pvopt_read_only on 20:08:33 INFO: allow_cyclic switch.pvopt_allow_cyclic off 20:08:33 INFO: optimise_frequency_minutes number.pvopt_optimise_frequency_minutes 10 20:08:33 INFO: slot_threshold_p number.pvopt_slot_threshold_p 1.0 20:08:33 INFO: day_of_week_weighting number.pvopt_day_of_week_weighting 0.5 20:08:33 INFO: pass_threshold_p number.pvopt_pass_threshold_p 4.0 20:08:33 INFO: battery_capacity_wh number.pvopt_battery_capacity_wh 5000 20:08:33 INFO: inverter_efficiency_percent number.pvopt_inverter_efficiency_percent 97 20:08:33 INFO: charger_efficiency_percent number.pvopt_charger_efficiency_percent 91 20:08:33 INFO: charger_power_watts number.pvopt_charger_power_watts 3600 20:08:33 INFO: inverter_power_watts number.pvopt_inverter_power_watts 3600 20:08:33 INFO: inverter_loss_watts number.pvopt_inverter_loss_watts 100 20:08:33 INFO: solar_forecast select.pvopt_solar_forecast Solcast 20:08:33 INFO: consumption_history_days number.pvopt_consumption_history_days 2 20:08:33 INFO: consumption_margin number.pvopt_consumption_margin 10 20:08:33 INFO: consumption_grouping select.pvopt_consumption_grouping mean 20:08:33 INFO: forced_power_group_tolerance number.pvopt_forced_power_group_tolerance 100 20:08:33 INFO: 20:08:33 INFO: Loading Contract: 20:08:33 INFO: ----------------- 20:08:33 INFO: Trying to auto detect Octopus tariffs: 20:08:33 INFO: Found import entity event.octopus_energyelectricity**_current_day_rates 20:08:33 INFO: Found export entity event.octopus_energyelectricity***_export_current_day_rates 20:08:34 INFO: Contract tariffs loaded OK 20:08:34 INFO: Import: E-1R-AGILE-FLEX-22-11-25-N Start: 2024-01-23 13:00:00+0000 End: 2024-02-02 23:00:00+0000 20:08:34 INFO: Export: E-1R-OUTGOING-FIX-12M-19-05-13-N Start: 2019-05-15 23:00:00+0000 End: N/A 20:08:34 INFO: AGILE tariff detected. Rates will update at 16:00 daily 20:08:34 INFO: 20:08:34 INFO: 20:08:34 INFO: Found Octopus Savings Events entity: event.octopus_energya*_octoplus_saving_session_events 20:08:34 INFO: 20:08:34 INFO: No upcoming Octopus Saving Events detected or joined: 20:08:34 INFO: Finished loading contract 20:08:34 INFO: 20:08:34 INFO: Running initial Optimisation: 20:08:34 INFO: 20:08:34 INFO: 20:08:34 INFO: Found Octopus Savings Events entity: event.octopus_energy_a_a2720466_octoplus_saving_session_events 20:08:34 INFO: 20:08:34 INFO: No upcoming Octopus Saving Events detected or joined: 20:08:34 INFO: 20:08:34 INFO: Starting Opimisation with discharge enabled 20:08:34 INFO: ------------------------------------------- 20:08:34 INFO: 20:08:34 INFO: Checking tariffs: 20:08:34 INFO: ----------------- 20:08:34 INFO: Import: E-1R-AGILE-FLEX-22-11-25-N Start: 2024-01-23 13:00:00+0000 End: 2024-02-02 23:00:00+0000 20:08:34 INFO: Export: E-1R-OUTGOING-FIX-12M-19-05-13-N Start: 2019-05-15 23:00:00+0000 End: N/A 20:08:34 INFO: AGILE tariff detected. Rates will update at 16:00 daily 20:08:34 INFO: - Tariffs OK 20:08:34 INFO: 20:08:34 INFO: Solcast forecast loaded OK 20:08:34 INFO: Getting expected consumption data 20:08:34 INFO: - Estimated consumption from sensor.solis_house_load_today loaded OK 20:08:34 INFO: Initial SOC: 15.0 20:08:34 INFO: Calculating Base flows 20:08:35 INFO: 20:08:35 INFO: Retrieved day ahead forecast for period 25/01 23:00 - 02/02 22:00 for tariff E-1R-AGILE-FLEX-22-11-25-N 20:09:34 INFO: >>> Agile Callback Handler
and on the error log I see
20:08:35 WARNING pv_opt: ------------------------------------------------------------ 20:08:35 WARNING pv_opt: Unexpected error running initialize() for pv_opt 20:08:35 WARNING pv_opt: ------------------------------------------------------------ 20:08:35 WARNING pv_opt: Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 162, in initialize_app await utils.run_in_executor(self, init) File "/usr/lib/python3.11/site-packages/appdaemon/utils.py", line 304, in run_in_executor response = future.result() ^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 321, in initialize self.optimise() File "/usr/lib/python3.11/site-packages/appdaemon/adbase.py", line 35, in f_app_lock return f(args, kw) ^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 1322, in optimise self.base_cost = self.contract.net_cost(self.base) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pvpy.py", line 442, in net_cost imp_df = self.imp.to_df(start, end, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/homeassistant/appdaemon/apps/pv_opt/pvpy.py", line 230, in to_df newindex = pd.date_range(x.index[0], df.index[-1], freq="30T")