Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save raivisdejus/edbcd33372949aa0bd8b122ca19f7339 to your computer and use it in GitHub Desktop.

Select an option

Save raivisdejus/edbcd33372949aa0bd8b122ca19f7339 to your computer and use it in GitHub Desktop.
Home Assistant configuration for Kostal PIKO 3.0-2 MP plus

If your Kostal Pico MP inverter provides data on http://your-inverter-ip/measurements.xml

Install https://github.com/danieldotnl/ha-multiscrape and use the following configuration to get the data to Home Assistant

Add this to the configuration.yaml and change the inverter IP from 192.168.0.90 used in the example to whatever is your inverter IP.

# Kostal inverter    
multiscrape:
  - resource: http://192.168.0.90/measurements.xml
    scan_interval: 60
    parser: lxml
    sensor:
      - unique_id: kostal_ac_power
        name: "AC Power"
        select: "measurement[type='AC_Power']"
        attribute: "value"
        unit_of_measurement: "W"
        on_error:
          value: "default"
          default: 0.0
      - unique_id: kostal_ac_voltage
        name: "AC Voltage"
        select: "measurement[type='AC_Voltage']"
        attribute: "value"
        unit_of_measurement: "V"
        on_error:
          value: "default"
          default: 0.0
      - unique_id: kostal_ac_current
        name: "AC Current"
        select: "measurement[type='AC_Current']"
        attribute: "value"
        unit_of_measurement: "A"
        on_error:
          value: "default"
          default: 0.0        
      - unique_id: kostal_ac_frequency
        name: "AC Frequency"
        select: "measurement[type='AC_Frequency']"
        attribute: "value"
        unit_of_measurement: "Hz"
      - unique_id: kostal_dc_voltage
        name: "DC Voltage"
        select: "measurement[type='DC_Voltage']"
        attribute: "value"
        unit_of_measurement: "V"
        on_error:
          value: "default"
          default: 0.0
      - unique_id: kostal_dc_current
        name: "DC Current"
        select: "measurement[type='DC_Current']"
        attribute: "value"
        unit_of_measurement: "A"
        on_error:
          value: "default"
          default: 0.0
      - unique_id: kostal_link_voltage
        name: "Link Voltage"
        select: "measurement[type='LINK_Voltage']"
        attribute: "value"
        unit_of_measurement: "V"
        on_error:
          value: "default"
          default: 0.0
      - unique_id: kostal_derating
        name: "Derating"
        select: "measurement[type='Derating']"
        attribute: "value"
        unit_of_measurement: "%"
@raivisdejus
Copy link
Author

Updated version that uses lxml-xml parser. This avoids warnings in logs.

# Kostal inverter    
multiscrape:
  - resource: http://192.168.0.90/measurements.xml
    scan_interval: 60
    parser: lxml-xml
    sensor:
      - unique_id: kostal_ac_power
        name: "AC Power"
        select: "Measurement[Type='AC_Power']"
        attribute: "Value"
        unit_of_measurement: "W"
        on_error:
          value: "default"
          default: 0.0
      - unique_id: kostal_ac_voltage
        name: "AC Voltage"
        select: "Measurement[Type='AC_Voltage']"
        attribute: "Value"
        unit_of_measurement: "V"
        on_error:
          value: "default"
          default: 0.0
      - unique_id: kostal_ac_current
        name: "AC Current"
        select: "Measurement[Type='AC_Current']"
        attribute: "Value"
        unit_of_measurement: "A"
        on_error:
          value: "default"
          default: 0.0        
      - unique_id: kostal_ac_frequency
        name: "AC Frequency"
        select: "Measurement[Type='AC_Frequency']"
        attribute: "Value"
        unit_of_measurement: "Hz"
      - unique_id: kostal_dc_voltage
        name: "DC Voltage"
        select: "Measurement[Type='DC_Voltage']"
        attribute: "Value"
        unit_of_measurement: "V"
        on_error:
          value: "default"
          default: 0.0
      - unique_id: kostal_dc_current
        name: "DC Current"
        select: "Measurement[Type='DC_Current']"
        attribute: "Value"
        unit_of_measurement: "A"
        on_error:
          value: "default"
          default: 0.0
      - unique_id: kostal_link_voltage
        name: "Link Voltage"
        select: "Measurement[Type='LINK_Voltage']"
        attribute: "Value"
        unit_of_measurement: "V"
        on_error:
          value: "default"
          default: 0.0
      - unique_id: kostal_derating
        name: "Derating"
        select: "Measurement[Type='Derating']"
        attribute: "Value"
        unit_of_measurement: "%"

# Logger, uncomment if needed
# logger:
#   default: debug
#   logs:
#     custom_components.multiscrape: debug

@Lucifero87
Copy link

Lucifero87 commented Feb 17, 2026

Buongiorno a tutti,
ho uno smart meter a monte, al quale è collegato un inverter Piko 3.6-2 MP PL connesso a 22 kW di accumulatori, e un inverter aggiuntivo Piko 3.0-2 MP PL. Grazie alle vostre indicazioni sono riuscito a integrare tutti i sensori nell’assistente domestico tramite il file configuration.yaml.
Tuttavia, sono mesi che cerco a intermittenza, una soluzione per capire come vadano configurati i sensori nella scheda di monitoraggio.

Screenshot 2026-02-17 124922 Screenshot 2026-02-17 124802

Riuscite cortesemente a darmi un aiuto?
Grazie mille in anticipo

@azmoa
Copy link

azmoa commented Feb 19, 2026

Hi Lucifero87, if you are referring to energy dashboard, them you need to create some sensors in Helpers area /settings/devices & services/helpers, but to be honest is better to ask on Home Assistant forum and them sher with us. PS: you know that HA is collecting info from KSEM and Inverter right!
Screenshot From 2026-02-19 11-43-40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment