givenergy-modbus / BatterySnapshot
Interface: BatterySnapshot
Defined in: src/model/battery-snapshot.ts:15
Battery snapshot — decoded state of a single GivEnergy battery module.
Data is read from the battery slave address space (IR 60–115) via the battery's own BMS (battery management system).
These values come from a different source than the inverter-level battery fields in InverterSnapshot (stateOfCharge, batteryVoltage, batteryCurrent, batteryTemperature). The inverter measures battery state at its DC bus, while these come from the BMS inside each battery module. In a multi-battery system, each module reports independently here.
Reference: GivTCP/givenergy_modbus_async/model/battery.py
Properties
cellVoltages
cellVoltages:
number[]
Defined in: src/model/battery-snapshot.ts:51
16 individual cell voltages in V — from IR(60-75) via toMilli
chargeEnergyTotalKwh
chargeEnergyTotalKwh:
number
Defined in: src/model/battery-snapshot.ts:37
Battery charge energy total in kWh — from IR(106) via toDeci
cycleCount
cycleCount:
number
Defined in: src/model/battery-snapshot.ts:49
Number of charge/discharge cycles from IR(96)
dischargeEnergyTotalKwh
dischargeEnergyTotalKwh:
number
Defined in: src/model/battery-snapshot.ts:35
Battery discharge energy total in kWh — from IR(105) via toDeci
serialNumber
serialNumber:
string
Defined in: src/model/battery-snapshot.ts:17
10-character serial number from IR(110-114)
stack?
optionalstack:number
Defined in: src/model/battery-snapshot.ts:57
HV battery stack index — identifies which BCU (Battery Control Unit) this module belongs to. Present only for HV systems; undefined for LV batteries. Modules with the same stack value belong to the same physical battery pack.
stateOfCharge
stateOfCharge:
number
Defined in: src/model/battery-snapshot.ts:25
State of charge 0-100% from the BMS (IR 100).
This may differ slightly from InverterSnapshot.stateOfCharge (IR 59), which is the inverter's own reading. In a multi-battery system, the inverter reports a combined SOC while each module reports its own here.
temperatureMax
temperatureMax:
number
Defined in: src/model/battery-snapshot.ts:45
Maximum cell temperature in °C — from IR(103) via toDeci.
The BMS reports both min and max cell temperatures across its pack. Compare with InverterSnapshot.batteryTemperature (IR 56), which is a single reading from the inverter's own temperature sensor.
temperatureMin
temperatureMin:
number
Defined in: src/model/battery-snapshot.ts:47
Minimum cell temperature in °C — from IR(104) via toDeci
voltage
voltage:
number
Defined in: src/model/battery-snapshot.ts:33
Voltage in V — sum of all cell voltages from IR(80) via toMilli.
This is measured by the BMS inside the battery module. It may differ slightly from InverterSnapshot.batteryVoltage (IR 50), which is measured at the inverter's DC bus and includes cable losses.