From a2e078b939f81f620c719df7376cb89c62648bc7 Mon Sep 17 00:00:00 2001 From: David Rapan Date: Sat, 17 Aug 2024 00:49:50 +0200 Subject: [PATCH] refactor: Seventh batch of name standardization Renamed sofar_ktlxg3 to sofar_tlx-g3 kstar_hybrid.yaml: - Cumulative* to Total* - *Consumption to *Load Consumption zcs_azzurro-ktl-v3.yaml: - Lx prefixed with Load --- .../inverter_definitions/kstar_hybrid.yaml | 22 +- .../{sofar_ktlxg3.yaml => sofar_tlx-g3.yaml} | 263 +++++++++--------- .../zcs_azzurro-ktl-v3.yaml | 18 +- 3 files changed, 156 insertions(+), 147 deletions(-) rename custom_components/solarman/inverter_definitions/{sofar_ktlxg3.yaml => sofar_tlx-g3.yaml} (81%) diff --git a/custom_components/solarman/inverter_definitions/kstar_hybrid.yaml b/custom_components/solarman/inverter_definitions/kstar_hybrid.yaml index c5e4590..1c751a1 100644 --- a/custom_components/solarman/inverter_definitions/kstar_hybrid.yaml +++ b/custom_components/solarman/inverter_definitions/kstar_hybrid.yaml @@ -126,7 +126,8 @@ parameters: registers: [3040, 3039] icon: "mdi:solar-power" - - name: "Cumulative Production" + - name: "Total Production" + alt: "Cumulative Production" update_interval: 30 class: "energy" state_class: "total" @@ -139,7 +140,8 @@ parameters: - group: Power Grid items: # Should this be the sum of the 3 phases "Meter Power"? - - name: "Total Grid Power" + - name: "Grid Power" + alt: "Total Grid Power" realtime: class: "power" state_class: "measurement" @@ -242,7 +244,8 @@ parameters: - group: Electricity Consumption items: # Should this be the sum of the 3 phases "Load Power"? - - name: "Total Consumption Power" + - name: "Load Power" + alt: "Total Consumption Power" update_interval: 30 class: "power" state_class: "measurement" @@ -264,7 +267,7 @@ parameters: registers: [3147] icon: "mdi:home-lightning-bolt" - - name: "Monthly Consumption" + - name: "Monthly Load Consumption" update_interval: 30 class: "energy" state_class: "total_increasing" @@ -274,7 +277,7 @@ parameters: registers: [3149, 3148] icon: "mdi:home-lightning-bolt" - - name: "Yearly Consumption" + - name: "Yearly Load Consumption" update_interval: 30 class: "energy" state_class: "total_increasing" @@ -284,7 +287,7 @@ parameters: registers: [3151, 3150] icon: "mdi:home-lightning-bolt" - - name: "Cumulative Consumption" + - name: "Total Load Consumption" update_interval: 30 class: "energy" state_class: "total" @@ -296,7 +299,7 @@ parameters: - group: Battery items: - - name: "Battery Type" + - name: "Battery Control Mode" update_interval: 300 class: "" state_class: "measurement" @@ -374,7 +377,7 @@ parameters: min: 10 max: 95 - - name: "Battery Radiator Temperature" + - name: "Battery Temperature" update_interval: 30 class: "temperature" state_class: "measurement" @@ -708,7 +711,8 @@ parameters: uom: "" scale: 1 rule: 5 - registers: [3228, 3229, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238] + registers: + [3228, 3229, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238] icon: "mdi:wrench" - group: Inverter diff --git a/custom_components/solarman/inverter_definitions/sofar_ktlxg3.yaml b/custom_components/solarman/inverter_definitions/sofar_tlx-g3.yaml similarity index 81% rename from custom_components/solarman/inverter_definitions/sofar_ktlxg3.yaml rename to custom_components/solarman/inverter_definitions/sofar_tlx-g3.yaml index e0cdcb4..c147981 100644 --- a/custom_components/solarman/inverter_definitions/sofar_ktlxg3.yaml +++ b/custom_components/solarman/inverter_definitions/sofar_tlx-g3.yaml @@ -3,26 +3,12 @@ info: manufacturer: Sofar - model: KTLX-G3 + model: TLX-G3 default: update_interval: 5 digits: 6 -requests: - - start: 0x0404 - end: 0x042E - mb_functioncode: 0x03 - - start: 0x0484 - end: 0x04BC - mb_functioncode: 0x03 - - start: 0x0584 - end: 0x0589 - mb_functioncode: 0x03 - - start: 0x0684 - end: 0x069B - mb_functioncode: 0x03 - parameters: - group: PV items: @@ -33,7 +19,7 @@ parameters: scale: 10 rule: 1 registers: [0x0586] - icon: 'mdi:solar-power-variant' + icon: "mdi:solar-power-variant" - name: "PV2 Power" class: "power" @@ -42,7 +28,7 @@ parameters: scale: 10 rule: 1 registers: [0x0589] - icon: 'mdi:solar-power-variant' + icon: "mdi:solar-power-variant" - name: "PV1 Voltage" class: "voltage" @@ -51,7 +37,7 @@ parameters: scale: 0.1 rule: 1 registers: [0x0584] - icon: 'mdi:alpha-v-circle-outline' + icon: "mdi:alpha-v-circle-outline" - name: "PV2 Voltage" class: "voltage" @@ -60,7 +46,7 @@ parameters: scale: 0.1 rule: 1 registers: [0x0587] - icon: 'mdi:alpha-v-circle-outline' + icon: "mdi:alpha-v-circle-outline" - name: "PV1 Current" class: "current" @@ -69,7 +55,7 @@ parameters: scale: 0.01 rule: 1 registers: [0x0585] - icon: 'mdi:alpha-a-circle-outline' + icon: "mdi:alpha-a-circle-outline" - name: "PV2 Current" class: "current" @@ -78,7 +64,7 @@ parameters: scale: 0.01 rule: 1 registers: [0x0588] - icon: 'mdi:alpha-a-circle-outline' + icon: "mdi:alpha-a-circle-outline" - group: Device items: @@ -90,28 +76,38 @@ parameters: scale: 1 rule: 1 registers: [0x0404] - icon: 'mdi:information' + icon: "mdi:information" range: min: 0 max: 7 - options: ["Waiting", "Detection", "Grid-Connected", "Emergency Power Supply", "Recoverable Fault", "Permanent Fault", "Upgrade", "Self-charging"] + options: + [ + "Waiting", + "Detection", + "Grid-Connected", + "Emergency Power Supply", + "Recoverable Fault", + "Permanent Fault", + "Upgrade", + "Self-charging", + ] lookup: - - key: 0 - value: "Waiting" - - key: 1 - value: "Detection" - - key: 2 - value: "Grid-Connected" - - key: 3 - value: "Emergency Power Supply" - - key: 4 - value: "Recoverable Fault" - - key: 5 - value: "Permanent Fault" - - key: 6 - value: "Upgrade" - - key: 7 - value: "Self-charging" + - key: 0 + value: "Waiting" + - key: 1 + value: "Detection" + - key: 2 + value: "Grid-Connected" + - key: 3 + value: "Emergency Power Supply" + - key: 4 + value: "Recoverable Fault" + - key: 5 + value: "Permanent Fault" + - key: 6 + value: "Upgrade" + - key: 7 + value: "Self-charging" - group: Meter items: @@ -122,7 +118,8 @@ parameters: scale: 1 rule: 2 registers: [0x0418] - icon: 'mdi:thermometer' + icon: "mdi:thermometer" + - name: "Module Temperature" class: "temperature" state_class: "measurement" @@ -130,7 +127,8 @@ parameters: scale: 1 rule: 2 registers: [0x0420] - icon: 'mdi:thermometer' + icon: "mdi:thermometer" + - name: "Radiator Temperature" class: "temperature" state_class: "measurement" @@ -138,7 +136,8 @@ parameters: scale: 1 rule: 2 registers: [0x041A] - icon: 'mdi:thermometer' + icon: "mdi:thermometer" + - name: "Insulation Resistance" class: "none" uom: "kohm" @@ -155,12 +154,12 @@ parameters: uom: "Hz" scale: 0.01 rule: 1 - icon: 'mdi:sine-wave' + icon: "mdi:sine-wave" registers: [0x0484] - - group: Grid + - group: Load items: - - name: "Total Active Power Output" + - name: "Load Power" class: "energy" uom: "kW" scale: 0.01 @@ -168,14 +167,15 @@ parameters: registers: [0x0485] icon: "mdi:solar-power" - - name: "Grid L1 Voltage" + - name: "Load L1 Voltage" class: "voltage" uom: "V" scale: 0.1 rule: 1 registers: [0x048D] icon: "mdi:alpha-v-circle-outline" - - name: "Grid L1 Current" + + - name: "Load L1 Current" class: "current" uom: "A" scale: 0.01 @@ -183,14 +183,15 @@ parameters: registers: [0x048E] icon: "mdi:alpha-a-circle-outline" - - name: "Grid L2 Voltage" + - name: "Load L2 Voltage" class: "voltage" uom: "V" scale: 0.1 rule: 1 registers: [0x0498] icon: "mdi:alpha-v-circle-outline" - - name: "Grid L2 Current" + + - name: "Load L2 Current" class: "current" uom: "A" scale: 0.01 @@ -198,14 +199,15 @@ parameters: registers: [0x0499] icon: "mdi:alpha-a-circle-outline" - - name: "Grid L3 Voltage" + - name: "Load L3 Voltage" class: "voltage" uom: "V" scale: 0.1 rule: 1 registers: [0x04A3] icon: "mdi:alpha-v-circle-outline" - - name: "Grid L3 Current" + + - name: "Load L3 Current" class: "current" uom: "A" scale: 0.01 @@ -222,16 +224,18 @@ parameters: uom: "kWh" scale: 0.01 rule: 3 - registers: [0x0685,0x0684] - icon: 'mdi:solar-power' + registers: [0x0685, 0x0684] + icon: "mdi:solar-power" + - name: "Total Production" class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 3 - registers: [0x0687,0x0686] - icon: 'mdi:solar-power' + registers: [0x0687, 0x0686] + icon: "mdi:solar-power" + - name: "Today Load Consumption" friendly_name: Today's Load Consumption class: "energy" @@ -239,16 +243,17 @@ parameters: uom: "kWh" scale: 0.01 rule: 3 - registers: [0x0689,0x0688] - icon: 'mdi:lightning-bolt-outline' + registers: [0x0689, 0x0688] + icon: "mdi:lightning-bolt-outline" + - name: "Total Load Consumption" class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 3 - registers: [0x068B,0x068A] - icon: 'mdi:solar-power' + registers: [0x068B, 0x068A] + icon: "mdi:solar-power" - group: Alert items: @@ -281,89 +286,89 @@ parameters: scale: 1 rule: 1 registers: [0x0405] - icon: 'mdi:wrench' + icon: "mdi:wrench" isstr: true lookup: - - key: 0 - value: "No error" - - key: 1 - value: "ID01 Grid Over Voltage Protection" - - key: 2 - value: "ID02 Grid Under Voltage Protection" - - key: 4 - value: "ID03 Grid Over Frequency Protection" - - key: 8 - value: "ID04 Grid Under Frequency Protection" - - key: 16 - value: "ID05 Leakage current fault" - - key: 32 - value: "ID06 High penetration error" - - key: 64 - value: "ID07 Low penetration error" - - key: 128 - value: "ID08 Islanding error" - - key: 256 - value: "ID09 Grid voltage transient value overvoltage 1" - - key: 512 - value: "ID10 Grid voltage transient value overvoltage 2" - - key: 1024 - value: "ID11 Grid line voltage error" - - key: 2048 - value: "ID12 Inverter voltage error" - - key: 4096 - value: "ID13 Anti-backflow overload" - - key: 8192 - value: "ID14" - - key: 16384 - value: "ID15" - - key: 32768 - value: "ID16" + - key: 0 + value: "No error" + - key: 1 + value: "ID01 Grid Over Voltage Protection" + - key: 2 + value: "ID02 Grid Under Voltage Protection" + - key: 4 + value: "ID03 Grid Over Frequency Protection" + - key: 8 + value: "ID04 Grid Under Frequency Protection" + - key: 16 + value: "ID05 Leakage current fault" + - key: 32 + value: "ID06 High penetration error" + - key: 64 + value: "ID07 Low penetration error" + - key: 128 + value: "ID08 Islanding error" + - key: 256 + value: "ID09 Grid voltage transient value overvoltage 1" + - key: 512 + value: "ID10 Grid voltage transient value overvoltage 2" + - key: 1024 + value: "ID11 Grid line voltage error" + - key: 2048 + value: "ID12 Inverter voltage error" + - key: 4096 + value: "ID13 Anti-backflow overload" + - key: 8192 + value: "ID14" + - key: 16384 + value: "ID15" + - key: 32768 + value: "ID16" - name: "Fault 2" class: "" state_class: "" uom: "" scale: 1 rule: 1 - icon: 'mdi:wrench' + icon: "mdi:wrench" isstr: true registers: [0x0406] lookup: - - key: 0 - value: "No error" - - key: 1 - value: "ID17 Grid current sampling error" - - key: 2 - value: "ID18 Grid current DC component sampling error (AC side)" - - key: 4 - value: "ID19 Grid voltage sampling error (DC side)" - - key: 8 - value: "ID20 Grid voltage sampling error (AC side)" - - key: 16 - value: "ID21 Leakage current sampling error (DC side)" - - key: 32 - value: "ID22 Leakage current sampling error (AC side)" - - key: 64 - value: "ID23 Load voltage DC component sampling error" - - key: 128 - value: "ID24 DC input current sampling error" - - key: 256 - value: "ID25 DC component sampling error of grid current (DC side)" - - key: 512 - value: "ID26 DC input branch current sampling error" - - key: 1024 - value: "ID27" - - key: 2048 - value: "ID28" - - key: 4096 - value: "ID29 Leakage current consistency error" - - key: 8192 - value: "ID30 Grid voltage consistency error" - - key: 16384 - value: "ID31 DCI consistency error" - - key: 32768 - value: "ID32" + - key: 0 + value: "No error" + - key: 1 + value: "ID17 Grid current sampling error" + - key: 2 + value: "ID18 Grid current DC component sampling error (AC side)" + - key: 4 + value: "ID19 Grid voltage sampling error (DC side)" + - key: 8 + value: "ID20 Grid voltage sampling error (AC side)" + - key: 16 + value: "ID21 Leakage current sampling error (DC side)" + - key: 32 + value: "ID22 Leakage current sampling error (AC side)" + - key: 64 + value: "ID23 Load voltage DC component sampling error" + - key: 128 + value: "ID24 DC input current sampling error" + - key: 256 + value: "ID25 DC component sampling error of grid current (DC side)" + - key: 512 + value: "ID26 DC input branch current sampling error" + - key: 1024 + value: "ID27" + - key: 2048 + value: "ID28" + - key: 4096 + value: "ID29 Leakage current consistency error" + - key: 8192 + value: "ID30 Grid voltage consistency error" + - key: 16384 + value: "ID31 DCI consistency error" + - key: 32768 + value: "ID32" - name: "Fault 3" class: "" state_class: "" diff --git a/custom_components/solarman/inverter_definitions/zcs_azzurro-ktl-v3.yaml b/custom_components/solarman/inverter_definitions/zcs_azzurro-ktl-v3.yaml index a6c1793..18e2beb 100644 --- a/custom_components/solarman/inverter_definitions/zcs_azzurro-ktl-v3.yaml +++ b/custom_components/solarman/inverter_definitions/zcs_azzurro-ktl-v3.yaml @@ -98,9 +98,9 @@ parameters: registers: [0x0588] icon: "mdi:solar-power" - - group: Grid + - group: Load items: - - name: "Grid Frequency" + - name: "Inverter Frequency" class: "frequency" state_class: "measurement" uom: "Hz" @@ -109,7 +109,7 @@ parameters: registers: [0x0484] icon: "mdi:home-lightning-bolt" - - name: "Active Power Output Total" + - name: "Load Power" class: "power" state_class: "measurement" uom: "W" @@ -118,7 +118,7 @@ parameters: registers: [0x0485] icon: "mdi:home-lightning-bolt" - - name: "L1 Voltage" + - name: "Load L1 Voltage" class: "voltage" state_class: "measurement" uom: "V" @@ -127,7 +127,7 @@ parameters: registers: [0x048D] icon: "mdi:solar-power" - - name: "L1 Current" + - name: "Load L1 Current" class: "current" state_class: "measurement" uom: "A" @@ -136,7 +136,7 @@ parameters: registers: [0x048E] icon: "mdi:solar-power" - - name: "L2 Voltage" + - name: "Load L2 Voltage" class: "voltage" state_class: "measurement" uom: "V" @@ -145,7 +145,7 @@ parameters: registers: [0x0498] icon: "mdi:solar-power" - - name: "L2 Current" + - name: "Load L2 Current" class: "current" state_class: "measurement" uom: "A" @@ -154,7 +154,7 @@ parameters: registers: [0x0499] icon: "mdi:solar-power" - - name: "L3 Voltage" + - name: "Load L3 Voltage" class: "voltage" state_class: "measurement" uom: "V" @@ -163,7 +163,7 @@ parameters: registers: [0x04A3] icon: "mdi:solar-power" - - name: "L3 Current" + - name: "Load L3 Current" class: "current" state_class: "measurement" uom: "A"