# # KSTAR Hybrid Inverter # Modbus information taken from "MODBUS RS485 Communication Protocol V2.5" document provided by KSTAR # # This inverter exposes its data in the following registers (although not all of them are used by this definition file): # # - INPUT_REGISTERS 3000 - 3792 decimal, 0x0BB8 - 0x0ED0 hexadecimal, 0x04 function code # - HOLDING_REGISTERS 3200 - 3246 decimal. 0x0C80 - 0x0CAE hexadecimal, 0x03 function code # info: manufacturer: KSTAR model: Hybrid Inverter default: update_interval: 60 code: 0x04 digits: 6 parameters: - group: PV update_interval: 5 items: - name: "PV1 Voltage" class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3000] icon: "mdi:solar-power" - name: "PV2 Voltage" class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3001] icon: "mdi:solar-power" - name: "PV1 Current" class: "current" state_class: "measurement" uom: "A" scale: 0.01 rule: 2 registers: [3012] icon: "mdi:solar-power" - name: "PV2 Current" class: "current" state_class: "measurement" uom: "A" scale: 0.01 rule: 2 registers: [3013] icon: "mdi:solar-power" # PV - The combined power of Input 1 & 2 (L:1W, H:10W) - name: "PV Power" description: Combined power of all inputs class: "power" state_class: "measurement" uom: "W" rule: 1 digits: 0 registers: [3024, 3025] sensors: - signed: registers: [3024] - signed: registers: [3025] icon: "mdi:solar-power-variant" - name: "PV1 Power" class: "power" state_class: "measurement" uom: "W" rule: 2 registers: [3024] icon: "mdi:solar-power" - name: "PV2 Power" class: "power" state_class: "measurement" uom: "W" rule: 2 registers: [3025] icon: "mdi:solar-power" - name: "Today Production" friendly_name: Today's Production update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 1 registers: [3036] icon: "mdi:solar-power" - name: "Monthly Production" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3038, 3037] icon: "mdi:solar-power" - name: "Yearly Production" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3040, 3039] icon: "mdi:solar-power" - name: "Total Production" alt: "Cumulative Production" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 3 registers: [3042, 3041] icon: "mdi:solar-power" validation: min: 0.1 - group: Power Grid items: # Should this be the sum of the 3 phases "Meter Power"? - name: "Grid Power" alt: "Total Grid Power" update_interval: 5 class: "power" state_class: "measurement" uom: "W" rule: 2 registers: [3100] icon: "mdi:transmission-tower" - name: Today Energy Import alt: Daily Energy Purchased friendly_name: Today's Energy Import update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 1 registers: [3109] icon: "mdi:transmission-tower-export" - name: Monthly Energy Import alt: Monthly Energy Purchased update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3111, 3110] icon: "mdi:transmission-tower-export" - name: Yearly Energy Import alt: Yearly Energy Purchased update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3113, 3112] icon: "mdi:transmission-tower-export" - name: Total Energy Import alt: Cumulative Energy Purchased update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 3 registers: [3115, 3114] icon: "mdi:transmission-tower-export" validation: min: 0.1 - name: Today Energy Export alt: Daily Energy Feed-In friendly_name: Today's Energy Export update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 1 registers: [3116] icon: "mdi:transmission-tower-import" - name: Monthly Energy Export alt: Monthly Energy Feed-In update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3118, 3117] icon: "mdi:transmission-tower-import" - name: Yearly Energy Export alt: Yearly Energy Feed-In update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3120, 3119] icon: "mdi:transmission-tower-import" - name: Total Energy Export alt: Cumulative Grid Feed-In update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 3 registers: [3122, 3121] icon: "mdi:transmission-tower-import" validation: min: 0.1 - group: Electricity Consumption items: # Should this be the sum of the 3 phases "Load Power"? - name: "Load Power" alt: "Total Consumption Power" update_interval: 30 class: "power" state_class: "measurement" uom: "W" rule: 1 registers: [3144] icon: "mdi:home-lightning-bolt" - name: Today Load Consumption alt: Daily Consumption friendly_name: Today's Load Consumption update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 1 registers: [3147] icon: "mdi:home-lightning-bolt" - name: "Monthly Load Consumption" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3149, 3148] icon: "mdi:home-lightning-bolt" - name: "Yearly Load Consumption" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3151, 3150] icon: "mdi:home-lightning-bolt" - name: "Total Load Consumption" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 3 registers: [3153, 3152] icon: "mdi:home-lightning-bolt" validation: min: 0.1 - group: Battery items: - name: "Battery Type" update_interval: 300 class: "enum" rule: 1 registers: [3062] icon: "mdi:battery" lookup: - key: 1 value: "Lead-Acid" - key: 6 value: "LFP" - name: "Battery Voltage" update_interval: 5 class: "voltage" state_class: "measurement" uom: "V" scale: 0.01 rule: 1 registers: [3063] icon: "mdi:battery-charging" - name: "Battery Current" update_interval: 5 class: "current" state_class: "measurement" uom: "A" scale: 0.1 rule: 2 registers: [3064] icon: "mdi:battery-charging-10" - name: "Battery Power" update_interval: 5 class: "power" state_class: "measurement" uom: "W" rule: 2 registers: [3065] icon: "mdi:battery-charging-high" - name: "Battery" update_interval: 5 class: "battery" state_class: "measurement" uom: "%" scale: 0.1 rule: 1 registers: [3066] - name: "Battery 1" update_interval: 5 state_class: "measurement" uom: "%" rule: 1 registers: [3450] icon: "mdi:battery" - name: "Battery 2" update_interval: 5 state_class: "measurement" uom: "%" rule: 1 registers: [3494] icon: "mdi:battery" - name: "Battery 3" update_interval: 5 state_class: "measurement" uom: "%" rule: 1 registers: [3538] icon: "mdi:battery" - name: "Battery Temperature" update_interval: 30 class: "temperature" state_class: "measurement" uom: "°C" scale: 0.1 rule: 2 registers: [3067] icon: "mdi:battery-heart-outline" - name: "Battery Discharge Capacity Depth" update_interval: 300 state_class: "measurement" uom: "%" rule: 1 registers: [3068] icon: "mdi:battery-20" validation: min: 10 max: 95 - name: "Battery Heatsink Temperature" update_interval: 30 class: "temperature" state_class: "measurement" uom: "°C" scale: 0.1 rule: 2 registers: [3056] icon: "mdi:battery-heart-outline" - name: "Battery SOH" state_class: "measurement" uom: "%" scale: 0.1 rule: 1 digits: 2 registers: [3075] icon: "mdi:battery-heart" - name: Total Battery Discharge alt: Battery Total Discharge update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3293, 3292] icon: "mdi:battery-minus-variant" validation: min: 0.1 - name: "Today Battery Discharge" alt: Battery Daily Discharge friendly_name: Today's Battery Discharge update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 1 registers: [3294] icon: "mdi:battery-minus-variant" - name: "Total Battery Charge" alt: "Battery Total Charge" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3300, 3299] icon: "mdi:battery-minus-variant" validation: min: 0.1 - name: "Today Battery Charge" alt: Battery Daily Charge friendly_name: Today's Battery Charge update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 1 registers: [3301] icon: "mdi:battery-plus-variant" - group: Losses update_interval: 30 items: - name: Today Losses alt: Daily Losses friendly_name: Today's Losses description: Includes today's consumption of the inverter device itself as well AC/DC conversion losses update_interval: 30 class: "energy" state_class: "total_increasing" ensure_increasing: uom: "kWh" rule: 1 digits: 1 scale: 0.1 registers: [3109, 3036, 3294, 3116, 3147, 3301] uint: enforce sensors: - registers: [3109] - registers: [3036] - registers: [3294] - operator: subtract registers: [3116] - operator: subtract registers: [3147] - operator: subtract registers: [3301] - name: Total Losses description: Includes total consumption of the inverter device itself as well AC/DC conversion losses update_interval: 30 class: "energy" state_class: "total_increasing" ensure_increasing: uom: "kWh" rule: 3 digits: 1 scale: 0.1 registers: [ 3115, 3114, 3042, 3041, 3293, 3292, 3122, 3121, 3153, 3152, 3300, 3299, ] uint: enforce sensors: - registers: [3115, 3114] - registers: [3042, 3041] - registers: [3293, 3292] - operator: subtract registers: [3122, 3121] - operator: subtract registers: [3153, 3152] - operator: subtract registers: [3300, 3299] validation: min: 1 - group: Inverter Information items: - name: "Inverter Working Mode" update_interval: 300 class: "enum" rule: 1 registers: [3044] lookup: - key: 0 value: "Self Consumption" - key: 1 value: "Peak Shift" - key: 2 value: "Battery Priority" icon: "mdi:wrench" - name: "Inverter Model" update_interval: 600 class: "enum" rule: 1 registers: [3045] lookup: # Single-phase models - key: 0 value: "KSE-2K-048S" - key: 1 value: "KSE-3K-048S" - key: 2 value: "KSE-3.6K-048S" - key: 3 value: "KSE-4.6K-048S" - key: 4 value: "KSE-5K-048S" - key: 5 value: "KSE-3.6K-048" - key: 6 value: "KSE-4.6K-048" - key: 7 value: "KSE-5K-048" - key: 8 value: "KSE-6K-048" - key: 9 value: "BluE-S 3680D" - key: 11 value: "BluE-S 5000D" - key: 12 value: "BluE-S 6000D" - key: 14 value: "KSE-3K-048S M1" - key: 15 value: "BluE-S 3680D M1" - key: 17 value: "BluE-S 5000D M1" - key: 18 value: "BluE-S 6000D M1" # Three-phase models - key: 32 value: "E10KT" - key: 33 value: "E8KT" - key: 34 value: "E12KT" icon: "mdi:wrench" - name: "System status" update_interval: 30 class: "enum" rule: 1 registers: [3046] lookup: - key: 0 value: "Initialize" - key: 1 value: "Standby" - key: 2 value: "Hybrid Grid" - key: 3 value: "Off-Network" - key: 4 value: "Mains Charging" - key: 5 value: "PV Charging" - key: 6 value: "Mains Bypass" - key: 7 value: "Fault" - key: 8 value: "Debug" - key: 9 value: "Forced Charge" - key: 10 value: "Power on the device separately from the" - key: 11 value: "DSP Burn" - key: 12 value: "MCU Burn" - key: 13 value: "Permanent Error" icon: "mdi:wrench" - name: "Inverter Status" update_interval: 30 class: "enum" rule: 1 registers: [3047] lookup: - key: 0 value: "Standby" - key: 1 value: "Off-Grid" - key: 2 value: "On-Grid" - key: 3 value: "Off-Grid to On-Grid" - key: 4 value: "On-Grid to Off-Grid" icon: "mdi:wrench" - name: "DCDC Status" update_interval: 30 class: "enum" rule: 1 registers: [3048] lookup: - key: 0 value: "Standby" - key: 1 value: "Soft Boot" - key: 2 value: "Charging Mode" - key: 3 value: "Discharging Mode" icon: "mdi:wrench" - name: "DSP Alarm Code" update_interval: 30 rule: 6 registers: [3050, 3049] icon: "mdi:wrench" - name: "DSP Error Code" update_interval: 30 rule: 6 registers: [3052, 3051] icon: "mdi:wrench" - name: "Grid Standard" update_interval: 600 class: "enum" rule: 1 registers: [3193] lookup: - key: 0 value: "China" - key: 1 value: "Germany" - key: 2 value: "Australia" - key: 3 value: "Italy" - key: 4 value: "Spain" - key: 5 value: "UK" - key: 6 value: "Hungary" - key: 7 value: "Belgium" - key: 8 value: "West Australia" - key: 9 value: "Greece" - key: 10 value: "France" - key: 11 value: "Bangkok" - key: 12 value: "Thailand" - key: 13 value: "South Africa" - key: 14 value: "EN50549" - key: 15 value: "Brazil" - key: 16 value: "VDE0126" - key: 17 value: "Ireland" - key: 18 value: "Israel" - key: 19 value: "Poland" - key: 20 value: "Chile" - key: 21 value: "Local" icon: "mdi:wrench" - name: "Inverter Model Name" update_interval: 600 rule: 5 registers: [3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207] code: 0x03 icon: "mdi:wrench" - name: "Inverter Battery Name" update_interval: 600 rule: 5 registers: [3208, 3209, 3210, 3211, 3212, 3213, 3214, 3215] code: 0x03 icon: "mdi:wrench" # ARM AND DSP version numbers ("VX.Y.Z") are set in the two bytes on each register. The first byte contains the # X.Y part (scale 0.1), and the second by contains the Z part. How should we transform these values from a number # to a parsed string? - name: "ARM Version Number" update_interval: 600 rule: 1 registers: [3216] code: 0x03 icon: "mdi:wrench" - name: "DSP Version Number" update_interval: 600 rule: 1 registers: [3217] code: 0x03 icon: "mdi:wrench" - name: "Device Serial Number" update_interval: 600 rule: 5 registers: [3228, 3229, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238] icon: "mdi:wrench" - group: Inverter items: - name: "Inverter Bus Voltage" update_interval: 5 class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3053] icon: "mdi:home-lightning-bolt" - name: "Inverter DC Bus Voltage" update_interval: 5 class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3054] icon: "mdi:home-lightning-bolt" - name: "Inverter Radiator Temperature" update_interval: 30 class: "temperature" state_class: "measurement" uom: "°C" scale: 0.1 rule: 2 registers: [3055] icon: "mdi:thermometer" - name: "Chassis Internal Temperature" update_interval: 30 class: "temperature" state_class: "measurement" uom: "°C" scale: 0.1 rule: 2 registers: [3057] icon: "mdi:battery-heart-outline" # Different phases for 3-phase inverters. Only some models have 3 phases, see "Inverter Model" item # - R: Referent # - S: Secondary # - T: Tertiary - group: R Phase update_interval: 5 items: - name: "R-phase Grid Voltage" class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3097] icon: "mdi:home-lightning-bolt" - name: "R-phase Grid Frequency" class: "frequency" state_class: "measurement" uom: "Hz" scale: 0.01 rule: 1 registers: [3098] icon: "mdi:sine-wave" - name: "R-phase Meter Current" class: "current" state_class: "measurement" uom: "A" scale: 0.001 rule: 2 registers: [3099] icon: "mdi:home-lightning-bolt" - name: "R-phase Grid Power" class: "power" state_class: "measurement" uom: "W" rule: 2 registers: [3100] icon: "mdi:home-lightning-bolt" - name: "R-phase Inverter Voltage" class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3123] icon: "mdi:home-lightning-bolt" - name: "R-phase Inverter Current" class: "current" state_class: "measurement" uom: "A" scale: 0.01 rule: 2 registers: [3124] icon: "mdi:home-lightning-bolt" - name: "R-phase Inverter Frequency" class: "frequency" state_class: "measurement" uom: "Hz" scale: 0.01 rule: 1 registers: [3125] icon: "mdi:sine-wave" - name: "R-phase Inverter Power" class: "power" state_class: "measurement" uom: "W" rule: 2 registers: [3126] icon: "mdi:home-lightning-bolt" - name: "R-phase Backup Voltage" class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3135] icon: "mdi:home-lightning-bolt" - name: "R-phase Backup Current" class: "current" state_class: "measurement" uom: "A" scale: 0.01 rule: 1 registers: [3136] icon: "mdi:home-lightning-bolt" - name: "R-phase Backup Power" class: "power" state_class: "measurement" uom: "W" rule: 1 registers: [3137] icon: "mdi:home-lightning-bolt" - name: "R-phase Load Power" class: "power" state_class: "measurement" uom: "W" rule: 1 registers: [3144] icon: "mdi:home-lightning-bolt" - name: "Power losses" description: Includes consumption of the inverter device itself as well AC/DC conversion losses class: "power" state_class: "measurement" uom: "W" rule: 1 digits: 0 registers: [3024, 3025, 3065, 3126] uint: enforce sensors: - signed: registers: [3024] - signed: registers: [3025] - signed: registers: [3065] - operator: subtract signed: registers: [3126]