Read data from Kostal inverter using TCP Modbus and Python

Robert Diers
1 min readAug 7, 2022

Here you can find the code to read the actual data from Kostal inverter (in use with Kostal Plenticore Plus 10):

You just need to know IP and port (typically 1502):, 1502)

You can get this attributes:

consumptionbat: consumption from battery (W)
consumptiongrid: consumption from grid (W)
consumptionpv: consumption from panels (W)
consumption_total: full consumption (W)
inverter: inverter output (W)
batteryamp: ampere battery (A)
batteryvolt: voltage battery (V)
powerToBattery: load/unload battery (W)
batteryflag: 0 = discharge, 0.5 = idle, 1 = charge
batterypercent: state of charge battery (%)
dc1: production line 1 (W)
dc2: production line 2 (W)
dc3: production line 3 (W)
generation: full production (W)
powerToGrid: power to grid (W)
surplus: surplus production (W)
dailyyield: daily power production (kWh)