Home Assistant custom component for Pylontech (high voltage) BMS. Accessed via BMS' RS232 console port exposed over WIFI and cheap ESP8266/ESP32 hardware.
Component is developed on Pylontech's SC1000 BMS with H48050 BMU's but should also with SC0500 BMS or other PowerCube X1/X2 configurations.
Any cheap ESP8266 or ESP32 microcontroller and a RS232 transciever like MAX3232 could be used to construct the necessary hw.
See Pylontech Battery Monitoring via WiFi for schematics example, use the RJ45 connector version.
The ESP8266/32 microcontroller should be programmed and connected to Home Assistant via ESPHome and its custom component Pylontech BMS console server for ESPHome.
Install this component using HACS by adding custom repository https://github.com/mletenay/home-assistant-pylontech and searching for Pylontech in the Integrations.
The component requires the host/IP and the port where the Pylontech BMS console server for ESPHome is listening.
The integration connects to BMS in regular intrervals (default 30s) and executes pwr, unit and bat console commands to read and report current state (charge, voltage, current, temperature, state, error code etc.) of BMS itself as well as its individual BMUs and their cells.
The management console lists units (in info command) from top to bottom - the first unit connected right after the BMS is named BMU #0. However, the unit command lists them in reverse order - the bottom unit (farthest from BMS) has number 1 there. Same applies for the bat output - the cells are numbered bottom-up - bottom's units cells have number 0-14.
The integration takes care of this and even tries to maintain stable order of units (in case they are reshuffled in rack for any reason). To find out which unit is which, the position sensor provides physical index in chain - the topmost position is 1.