diff --git a/packages/helpermodules/create_debug.py b/packages/helpermodules/create_debug.py index 8c95b03813..973230e13e 100644 --- a/packages/helpermodules/create_debug.py +++ b/packages/helpermodules/create_debug.py @@ -281,15 +281,28 @@ def get_parsed_cp_data(cp: Chargepoint) -> str: except Exception: currents = "Keine Daten" voltages = "Keine Daten" - - parsed_data += (f"### LP{cp.num} ###\n" - f"CP_Type: {cp.chargepoint_module.config.type}\n" + try: + ct_id = cp.data.config.template + max_current_single_phase = data.data.cp_template_data.get(f"cpt{ct_id}").data.max_current_single_phase + max_current_multi_phases = data.data.cp_template_data.get(f"cpt{ct_id}").data.max_current_multi_phases + except Exception: + ct_id = None + max_current_single_phase = None + ev_fn = data.data.ev_data.get(f'ev{cp.data.config.ev}').data.name + + parsed_data += f"### LP{cp.num} ###\n" + if cp.chargepoint_module.config.type == "external_openwb": + parsed_data += (f"CP_Current_Branch: {cp.data.get.current_branch}\n" + f"CP_Version: {cp.data.get.version}\n") + parsed_data += (f"CP_Type: {cp.chargepoint_module.config.type}\n" f"CP_FN: {cp.chargepoint_module.config.name}\n" f"{mode}" f"CP_Phase_Switch_HW: {cp.data.config.auto_phase_switch_hw}\n" f"CP_Control_Pilot_HW: {cp.data.config.control_pilot_interruption_hw}\n" f"CP_IP: {ip}\n" f"CP_Set_Current: {cp.data.set.current} A\n" + f"CPT_Max_Current_Single_Phase: {max_current_single_phase} A\n" + f"CPT_Max_Current_Multi_Phases: {max_current_multi_phases} A\n" f"Meter_Power: {cp.data.get.power} W\n" f"Meter_Voltages: {cp.data.get.voltages} V\n" f"Meter_Currents: {cp.data.get.currents} A\n" @@ -308,6 +321,10 @@ def get_parsed_cp_data(cp: Chargepoint) -> str: # CP_SW_VERSION: 2.1.7-Patch.2 # CP_FIRMWARE: 1.2.3 (bei Pro bzw. Satellit) # CP_SIGNALING_PRO: basic iec61851 iso11518 + f"Connected_Vehicle: {ev_fn} (ID: {cp.data.config.ev})\n" + f"Charge_Template: {cp.data.set.charge_template.data.name}" + f"(ID: {cp.data.set.charge_template.data.id})\n" + # f"EV_FN2: {cp.chargepoint_module.get.connected_verhicle.info.name}\n" f"CP_Error_State: {cp.data.get.fault_str}\n" f"Additional_Meter_Voltages: \n{voltages}" f"Additional_Meter_Currents: \n{currents}\n") @@ -433,7 +450,7 @@ def write_to_file(file_handler, func, default: Optional[Any] = None): timeout=10) log.info("***** cleanup...") - os.remove(debug_file) + # os.remove(debug_file) log.info("***** debug log end") except Exception as e: log.exception(f"Error creating debug log: {e}")