# SolarEast PowerCool BMS for Home Assistant Local (Modbus TCP) integration for the SolarEast **PowerCool-LFP-HV** stacked high-voltage battery. It reads the battery's own Wi-Fi module directly; no cloud account is involved. The register map is **reverse-engineered** from one 5-pack stack and checked against the manufacturer's app. Nothing here comes from vendor documentation. The integration only ever *reads* registers. ## Install Copy `custom_components/solareast_bms` into your Home Assistant `config/custom_components/` folder and restart Home Assistant (or add this repository to HACS as a custom repository). ## Setup * **Automatic** – the Wi-Fi module announces itself with the hostname `espressif`. Home Assistant's DHCP discovery picks it up, the integration asks the device whether it is a SolarEast battery and, if so, offers it under *Settings → Devices & services*. * **Manual** – *Add integration → SolarEast PowerCool BMS → Enter the IP address*. * **Scan** – the same dialog can scan the local network for Modbus devices that identify as a SolarEast battery. ### Wi-Fi setup is not supported The integration does not configure the battery's Wi-Fi. The battery has to be connected to your network first, with the manufacturer's app (hold the WIFI Reset button on the control box for 5 seconds, then follow the app). The integration only reads from a battery that is already reachable on the LAN. ## Slow by design The Wi-Fi module answers about **one request every 30 seconds** and stops answering when asked faster. The integration therefore reads one register block per 30 s in rotation: | Data | Refreshed about every | |---|---| | Voltage, current, SOC, highest/lowest cells and temperatures, alarms | 1 minute | | Energy counters, cycle count, bus voltage | 4 minutes | | All individual cell voltages | 4 minutes | | All individual temperature sensors | 4 minutes | | Maximum currents | 4 minutes | After adding the battery it takes about four minutes until every entity has a value. **Do not run a second Modbus client against the battery at the same time.** Besides slowing everything down, the Wi-Fi module can then deliver an answer to the wrong client. The integration tags its requests and discards answers that are not its own or that are physically impossible, but the other client has no such protection. The interval can be changed under *Configure*. ## Entities * Pack and bus voltage, current, power, battery state * State of charge as reported by the BMS, state of health * **State of charge (estimated)** – see below * Highest / lowest / average cell voltage and the difference, with cell and pack number * Highest / lowest / average cell temperature and the difference * BMS circuit board temperature and supply voltage * Cycle count, accumulated charging / discharging energy, single charging energy * Single discharging energy * Maximum charge / discharge current (fixed configuration values; the *live* limits the BMS sends to the inverter are not available over Modbus as far as is known) * Every cell voltage and every temperature sensor (diagnostic entities, created once the pack size is known) * Alarms – see below * `Battery overview` – feeds the dashboard card * Unconfirmed and unknown registers as diagnostic entities, most of them disabled by default ## Battery card The integration ships its own dashboard card and loads it automatically; no resource has to be added by hand. ![Battery card](docs/card.png) Add it from the card picker (**SolarEast battery**) or in YAML: ```yaml type: custom:solareast-battery-card # all optional: entity: sensor._battery_overview title: Battery scale: 1.1 # size of text and graphics; 1 = compact, default 1.1 language: pl # en or pl; default is Home Assistant's language min_width: 420 # pixels; narrower than this the card scrolls sideways instead of squeezing max_width: 700 # pixels or e.g. "60%"; the card stops growing there and is centred ``` * The battery symbol is filled to the state of charge reported by the **BMS**; the dashed line marks the voltage-based **estimate**, and a note appears when the two disagree by 15 points or more. * One tile per pack with its voltage, state of charge, temperature range and a bar for each of its cells. All bars share one scale, so packs can be compared; the outlined bars are the lowest and highest cell of the stack. * Alarms are listed under the gauge. A pack with a problem gets a coloured edge and background, and each cell is coloured by its own voltage against the BMS's cell limits (amber, orange, red for 1st, 2nd, 3rd class). ![Battery card with an alarm](docs/card-alarm.png) The screenshots are rendered from test data (the alarm one is simulated). After updating the integration, reload the browser page once so the new card version is loaded. **Light version:** `type: custom:solareast-battery-card-light` shows only the gauge, the figures and any alarms, without the pack tiles. It takes the same options; `details: false` on the normal card does the same. The card reads everything from the `Battery overview` sensor, whose large attributes are excluded from the recorder. ## Alarms The registers that hold the BMS's own alarm flags have **not** been identified. Alarms are therefore *computed*: the integration reads the thresholds stored in the BMS (three classes per protection, each with a release value) and compares the live values with them, with the same hysteresis. * `Alarm` (binary sensor) – on while any alarm is active * `Active alarms` – text list, e.g. `Pack under-voltage (class 1)` * one sensor per protection with the state *No alarm / 1st / 2nd / 3rd class alarm* and the thresholds as attributes Because they are computed from one-minute samples, they can differ from what the BMS itself decides. Cell temperature limits exist for charging, discharging and standing; which stored set belongs to which state is an assumption (the strictest low-temperature set is used while charging). ## Estimated state of charge The BMS counts current to track its SOC and that counter can drift a long way (this integration exists because a stack reported 91 % while it was nearly empty). The estimate works independently of that counter: 1. The average cell voltage is corrected for the current flowing (`effective cell resistance`, default 2.5 mΩ) to approximate the resting voltage. 2. An LFP voltage curve turns that into a plausible SOC **band**. 3. Between updates the estimate follows the measured current (`battery capacity`, default 98 Ah); whenever it leaves the band it is pulled back to the band's edge. LFP voltage is nearly flat between about 20 % and 90 %, so the band is wide there (the attributes `band_low` / `band_high` show it) and the estimate is only rough. Near empty and near full the band is narrow and the estimate is good. Temperature is not compensated. ## Register map (input registers, function 4) | Address | Meaning | Status | |---|---|---| | 0 | heartbeat counter | observed | | 4–6 | clock h / m / s | observed | | 8 | pack voltage, 0.1 V | confirmed | | 9, 22 | current, 0.1 A, offset 30000, + = charging | confirmed | | 11, 12 | SOC %, SOH % | confirmed | | 14–19 | six half-pack voltages, 0.1 V | guess | | 20, 21 | insulation resistance + / − | guess | | 24–27 | control box temperatures, 0.1 °C | guess | | 28 | BMS circuit board temperature, (x−1000)/10 °C | confirmed | | 29 | BMS circuit board voltage, 0.1 V | confirmed | | 30–34 / 35–39 / 40–44 | five highest cells: mV / cell no. / pack no. | confirmed | | 45–59 | same for the five lowest cells | confirmed | | 60 | average cell voltage, mV | confirmed | | 61–91 | same top-5 / bottom-5 / average layout for temperature | confirmed | | 92–153 | same layout for pack SOC and SOH | observed | | 181 | cycle count | confirmed | | 182, 184 | accumulated charge / discharge energy, 0.1 kWh | confirmed | | 154, 155 | cell voltage difference (mV), temperature difference (0.1 °C) | observed | | 178 | power, 0.1 kW | observed | | 186 | energy of the current charge, 0.1 kWh (resets when a discharge starts) | confirmed | | 187 | energy of the current discharge, 0.1 kWh | observed | | 189, 190 | pack voltage, bus voltage, 0.1 V | observed | | 1000… | individual cell voltages, mV | confirmed | | 1512… | individual temperatures, (x−1000)/10 °C | confirmed | | 2024… | state of charge per cell, % (not read by the integration) | observed | | 2536… | state of health per cell, % (not read by the integration) | observed | | 9000–9007 | version numbers, one byte per part: 0x0201 0x0206 = 2.1.2.6 (not read by the integration) | first pair confirmed | Holding registers (function 3): 1138 / 1139 maximum charge / discharge current, 0.01 A (fixed values: they stayed at 50 A while the live charge limit seen by the inverter fell from 50 A to 0 A at the end of a charge); 1400–1472 alarm thresholds and 1600–1672 their release values, in groups of three (1st / 2nd / 3rd class): pack over/under-voltage, cell over/under-voltage, three sets of cell over/under-temperature, hardware temperatures, charge/discharge over-current, low SOC, cell voltage difference, temperature difference. **Security note:** the low holding registers of the Wi-Fi module contain sensitive network configuration, including the Wi-Fi password, in plain text and readable by anyone on the LAN. This integration deliberately reads only the identity string (218–254) from that area. ## Tests `python3 tests/test_decoder.py` runs the decoder, alarm and SOC logic against registers captured from a real stack. ## License Copyright (C) 2026 Mateusz Ryczko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. It is distributed without any warranty; see [LICENSE](LICENSE). This project is not affiliated with or endorsed by SolarEast.