Pylontech Pylontech Pylontech Modbus RTU template

Pylontech Pylontech

Pylontech lithium iron phosphate battery systems are modular residential and commercial energy storage units, widely deployed in solar self-consumption and backup-power installations. This template communicates over Modbus RTU via the RS485 port on the master Pylontech battery. It reads state of charge, state of health, pack voltage and current, system and per-cell temperature, per-cell and per-module voltage extremes, BMS charge and discharge limits, cycle count, daily and lifetime throughput counters, and BMS status flags including charge-forbidden and discharge-forbidden marks. One write register allows remote sleep or wake control. The result is full BMS visibility inside your ModbusCloud portal without any additional converter hardware.

Protocol
Modbus RTU
Connection
RS485
Registers
45, read and write
Last updated

Registers (45)

44 read, 1 write

NameUnitAccessAddress (Hidden until you enter your email)Function (hidden)Type (hidden)
pylontech_internal_version_numberRead
system_number_of_parallel_pilescountRead
voltageVRead
currentARead
system_temperature°CRead
soc%Read
cycle_timescountRead
charge_max_voltageVRead
bp_charge_bmsWRead
discharge_min_voltageVRead
bp_discharge_bmsWRead
max_cell_voltagemVRead
min_cell_voltagemVRead
max_voltage_cell_numberRead
min_voltage_cell_numberRead
max_cell_temperature°CRead
min_cell_temperature°CRead
max_temperature_cell_numberRead
min_temperature_cell_numberRead
max_module_voltageVRead
min_module_voltageVRead
max_voltage_module_numberRead
min_voltage_module_numberRead
max_module_temperature°CRead
min_module_temperature°CRead
max_temperature_module_numberRead
min_temperature_module_numberRead
soh%Read
remaining_capacityRead
charge_capacityRead
discharge_capacityRead
daily_accumulated_charge_capacityRead
daily_accumulated_discharge_capacityRead
historical_accumulated_charge_capacityRead
historical_accumulated_discharge_capacityRead
request_force_charge_markRead
request_balance_charge_markRead
number_of_piles_in_parallelcountRead
number_of_modules_in_series_per_pilecountRead
number_of_cells_in_series_per_pilecountRead
charge_forbidden_markRead
discharge_forbidden_markRead
insulation_resistanceΩRead
insulation_resistance_error_levelRead
sleep_wake_channelWrite

Loading registers…

Send your device list

If a device is not in the library yet, we build the template for free as soon as we have the register data.

Number of installations (optional)

Use cases

  • Monitor state of charge and state of health over time to detect gradual capacity fade across seasons.
  • Track the spread between max_cell_voltage and min_cell_voltage to identify cells drifting out of balance.
  • Alert on charge_forbidden_mark or discharge_forbidden_mark activating to catch BMS protection events immediately.
  • Compare daily_accumulated_charge_capacity against daily_accumulated_discharge_capacity to verify round-trip efficiency per day.
  • Report lifetime historical_accumulated_discharge_capacity to asset owners for warranty and degradation records.

Installation

  1. Confirm the Pylontech Modbus RTU interface is active: on the master battery the RS485 port is the RJ45 connector labelled RS485, and the first DIP switch must be in the off position to set 9600 baud for Modbus; verify the unit ID assigned to the master pile.

  2. Wire the RS485-A and RS485-B lines from the master battery's RS485 RJ45 port (pins 7 and 8) to the ModbusCloud Gateway RS485 terminal, matching polarity; use a shielded twisted-pair cable and add a 120-ohm termination resistor at the far end of the bus.

  3. In the ModbusCloud portal, add a new Gateway, import the Pylontech template, and set the Modbus unit ID to match the address configured on the master battery; set baud rate to 9600, 8N1.

  4. Verify the connection by spot-checking the soc register (address 4359) and voltage register (address 4355) in the live data view; confirm the values match the battery's front-panel display before putting the monitoring into production.

Things to watch for

All register reads return errors. What should I check first?

Confirm the RS485 wiring uses the correct port: the Pylontech RS485 RJ45 connector, not the Link port used for inter-battery communication. Check that the A and B lines are not swapped. Verify baud rate is 9600 and the unit ID in the portal matches the address set on the battery. A missing or wrong termination resistor on longer cable runs can also cause consistent read failures.

The historical accumulated capacity counters occasionally jump by huge amounts. Is this a scaling issue?

This is a known BMS firmware behaviour: the lifetime charge and discharge counters in Pylontech systems can occasionally increment by unrealistic amounts in a single update cycle. The daily counters are similarly affected. Cross-check against the daily registers and treat sudden large jumps as firmware artefacts rather than real throughput. Do not use these counters for billing-grade metering without independent verification.

The charge_forbidden_mark or discharge_forbidden_mark is set. What triggered it?

These flags are set by the BMS when a protection condition is active, such as a cell voltage out of range, over-temperature, or insulation resistance fault. Check the insulation_resistance and insulation_resistance_error_level registers alongside the min and max cell voltage and temperature registers to locate the specific condition. Clearing the fault requires resolving the underlying issue; the BMS will lower the flag automatically once conditions return to normal.

Is it safe to write to the sleep_wake_channel register during normal operation?

Use the sleep_wake_channel write register with caution. Sending a sleep command while the battery is actively charging or discharging can interrupt the inverter control loop and may trigger inverter protection. Only write to this register during planned maintenance windows, confirm with your Pylontech integration documentation what values are valid, and ensure the connected inverter is in a safe state before issuing the command.

Want to see how it works?

Electrician working in an open distribution board