From e2e4bba36f4415e1d2696d1b7fc88c8e2a770c61 Mon Sep 17 00:00:00 2001 From: maslyankov Date: Sun, 29 Dec 2024 00:16:54 +0200 Subject: [PATCH] Enhance HVFaultSensor with additional fault definitions for improved diagnostics --- src/sunsynk/sensors.py | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/sunsynk/sensors.py b/src/sunsynk/sensors.py index 4f6d3f1f..e0244a9c 100644 --- a/src/sunsynk/sensors.py +++ b/src/sunsynk/sensors.py @@ -266,27 +266,55 @@ def reg_to_value(self, regs: RegType) -> ValType: """Decode HV Inverter faults.""" faults = { 1: "DC Inversed Failure", + 2: "DC insula�on impedance permanent fault", + 3: "DC leakage current fault", + 4: "Ground fault GFDI", + 5: "Read the memory error", + 6: "Write the memory error", 7: "DC START Failure", + 8: "GFDI grounding touch failure", + 9: "IGBT damaged by excessive drop voltage", + 10: "Auxiliary power supply failure", + 11: "AC main contactor errors", + 12: "AC auxiliary contactor errors", 13: "Working mode change", + 14: "DC over current SW Failure", 15: "AC over current SW Failure", - 10: "Aux Power Board Failure", 16: "DC Ground Leakage current fault", 18: "AC over current TZ", + 19: "All hardware failure synthesis", 20: "DC over current", 21: "DC HV Bus over current", 22: "Remote Emergency stop", 23: "AC leakage current is transient over current", 24: "DC insulation impedance", + 25: "DC feedback fault", 26: "DC busbar imbalanced", - 29: "Parallel comms cable", + 27: "DC end insula�on error", + 28: "Inverter 1 DC high fault", + 29: "Parallel comms cable/AC load switch failure", + 30: "AC main contactor failure", + 31: "Relay open circuit fault", + 32: "Inverter 2 dc high fault", + 33: "AC Overcurrent", 34: "AC Overload (backup)", 35: "No AC grid", + 36: "AC grid phase error", + 37: "AC three-phase voltage unbalance failure", + 38: "AC three-phase current unbalance failure", + 39: "AC over current (one cycle)", + 40: "DC over current", 41: "Parallel system stopped", 42: "AC line low voltage", + 43: "AC Line V,W over voltage", + 44: "AC Line V,W low voltage", + 45: "AC Line U,V over voltage", 46: "Battery 1 fault", - 49: "Battery 2 fault", 47: "AC grid freq too high", 48: "AC grid freq too low", + 49: "Battery 2 fault", + 50: "V phase grid current DC component over current", + 51: "W phase grid current DC component over current", 52: "DC voltage too high", 53: "DC voltage too low", 54: "battery 1 voltage high", @@ -294,6 +322,9 @@ def reg_to_value(self, regs: RegType) -> ValType: 56: "battery 1 voltage low", 57: "battery 2 voltage low", 58: "bms communication lost", + 59: "AC grid V over current", + 60: "AC grid W over current", + 61: "Reactor A phase over current", 62: "DRM stop activated", 63: "ARC fault", 64: "Heat sink tempfailure",