Home Assistant custom integration for KOSTAL PIKO inverters with battery support.
This integration reads the fixed inverter XML endpoints and creates sensors that are ready for Lovelace and the Energy Dashboard.
- UI setup via host or IP
- Optional YAML setup
- Automatic use of
/all.xmland/measurements.xml - PV, battery, grid and household consumption sensors
- Battery state of charge and charge/discharge power
- Built-in cumulative energy sensors (
kWh) for Energy Dashboard - Device grouping in Home Assistant device registry
- Home Assistant
- Network access to the inverter
- KOSTAL PIKO inverter with reachable web interface
- Open HACS.
- Go to
Integrations. - Open the menu and choose
Custom repositories. - Add
https://github.com/Multigestern/Kostal-Piko-Solar-Monitor. - Select category
Integration. - Install
Kostal Piko Solar Monitor. - Restart Home Assistant.
Copy the integration folder to:
config/custom_components/ha_kostal_piko_solar_monitor/
Then restart Home Assistant.
- Open
Settings -> Devices & Services -> Add Integration. - Select
Kostal Piko Solar Monitor. - Enter inverter host or IP.
- Optionally set a display name.
sensor:
- platform: ha_kostal_piko_solar_monitor
host: "inverter.local"
device_name: "Kostal Piko"Recommended mapping:
- Solar production:
..._solar_production_energy - Grid import:
..._grid_import_energy - Grid export:
..._grid_export_energy - Battery charged:
..._battery_charging_energy - Battery discharged:
..._battery_discharging_energy
Battery state of charge is available as:
..._battery_state_of_charge
Raw inverter measurements include examples like:
..._ac_power..._bms_bat_soc..._gridpower..._produced_yield
Derived sensors include:
..._battery_charging_power..._battery_discharging_power..._house_consumption_power..._solar_production_power
Built-in cumulative energy sensors include:
..._battery_charging_energy..._battery_discharging_energy..._grid_import_energy..._grid_export_energy
If battery/grid energy sensors are not selectable, check:
Developer Tools -> Statisticsfor unit issues.- Repair invalid statistics metadata (for example
NonetokWh). - Wait a few minutes after repair for statistics to be generated.
Some Grid* values can remain unknown if no compatible external meter is connected to the inverter, or if the meter communication is unavailable.
Install dependencies:
pip install -r requirements.txtOptional syntax check:
python -m py_compile custom_components/ha_kostal_piko_solar_monitor/*.py- Integration domain:
ha_kostal_piko_solar_monitor - HACS metadata:
hacs.json - Main component files:
custom_components/ha_kostal_piko_solar_monitor/ - Keep manifest version in sync with release tags
- Issues:
https://github.com/Multigestern/Kostal-Piko-Solar-Monitor/issues - Repository:
https://github.com/Multigestern/Kostal-Piko-Solar-Monitor
MIT. See LICENSE.