Integration of Luxra SK-L 4200 (solar inverter)

Hi,

I successfully integrated a Luxra SK-L 4200 solar inverter with FW 3.75 and “Kommunikationsboard 1”.
It is similar to Kostal Piko; unfortunately, there is no API.
Unfortunately, neither Luxra nor Kostal is able to provide a FW update.

My attempt to use the built-in scrape integration failed - I assume that the solar inverter is unable to handle so many scrape attempts at once.

I assume that the solar inverter is reachable via 192.168.178.50 and that its login data are set to default (pvserver / pvwr).

Here is how the integration succeeded:

multiscrape:
  # Wechselrichter-Sensoren:
  # Die ausgelesenen Sensoren-Werte werden mittels "float" nochmals verarbeitet, um nicht-numerische Werte ("x x x") auszufiltern:
  - resource: !secret pv_link_settings
    authentication: basic
    username: !secret pv_username
    password: !secret pv_password
    scan_interval: 900
    sensor:
      # Firmware-Version:
      - name: Wechselrichter - Firmware-Version
        select: "body > form > font > table > tr:nth-child(1) > td:nth-child(3)"
        value_template: "{{ value.split('ver ')[1] }}"        
      # Seriennummer:
      - name: Wechselrichter - Seriennummer
        select: "body > form > font > table > tr:nth-child(2) > td:nth-child(3)"    
      # Artikelnummer:
      - name: Wechselrichter - Artikelnummer
        select: "body > form > font > table > tr:nth-child(3) > td:nth-child(3)"
        
  - resource: !secret pv_link_values
    authentication: basic
    username: !secret pv_username
    password: !secret pv_password
    scan_interval: 900
    sensor:
      # AC-Leistung - aktuell:
      - name: Wechselrichter - AC-Leistung - aktuell
        select: "body > form > font > table:nth-child(2) > tr:nth-child(4) > td:nth-child(3)"
        value_template: "{{ ((value.split('&')[0] | float) | round (0) )}}" 
        unit_of_measurement: "W"
      # AC-Leistung - Status:
      - name: Wechselrichter - AC-Leistung - Status
        select: "body > form > font > table:nth-child(2) > tr:nth-child(8) > td:nth-child(3)"
      # Gesamtenergie:
      - name: Wechselrichter - Gesamtenergie
        select: "body > form > font > table:nth-child(2) > tr:nth-child(4) > td:nth-child(6)"
        unit_of_measurement: "kWh"
        state_class: measurement
        device_class: energy
      # Tagesenergie:
      - name: Wechselrichter - Tagesenergie
        select: "body > form > font > table:nth-child(2) > tr:nth-child(6) > td:nth-child(6)"
        unit_of_measurement: "kWh"
        state_class: measurement
        device_class: energy
      # PV-Generator - String 1 - Spannung:
      - name: Wechselrichter - PV-Generator - String 1 - Spannung
        select: "body > form:nth-child(1) > font:nth-child(2) > table:nth-child(2) > tr:nth-child(14) > td:nth-child(3)"
        value_template: "{{ ((value.split('&')[0] | float) | round (0) )}}" 
        unit_of_measurement: "V"
      # PV-Generator - String 1 - Strom:
      - name: Wechselrichter - PV-Generator - String 1 - Strom
        select: "body > form:nth-child(1) > font:nth-child(2) > table:nth-child(2) > tr:nth-child(16) > td:nth-child(3)"  
        value_template: "{{ ((value.split('&')[0] | float) | round (0) )}}" 
        unit_of_measurement: "A"
      # PV-Generator - String 2 - Spannung:
      - name: Wechselrichter - PV-Generator - String 2 - Spannung
        select: "body > form:nth-child(1) > font:nth-child(2) > table:nth-child(2) > tr:nth-child(19) > td:nth-child(3)"
        value_template: "{{ ((value.split('&')[0] | float) | round (0) )}}" 
        unit_of_measurement: "V"
      # PV-Generator - String 2 - Strom:
      - name: Wechselrichter - PV-Generator - String 2 - Strom
        select: "body > form:nth-child(1) > font:nth-child(2) > table:nth-child(2) > tr:nth-child(21) > td:nth-child(3)"
        value_template: "{{ ((value.split('&')[0] | float) | round (0) )}}" 
        unit_of_measurement: "A"
      # Ausgangsleistung - L1 - Spannung:
      - name: Wechselrichter - Ausgangsleistung - L1 - Spannung
        select: "body > form:nth-child(1) > font:nth-child(2) > table:nth-child(2) > tr:nth-child(14) > td:nth-child(6)"
        value_template: "{{ ((value.split('&')[0] | float) | round (0) )}}" 
        unit_of_measurement: "V"
      # Ausgangsleistung - L1 - Leistung:
      - name: Wechselrichter - Ausgangsleistung - L1 - Leistung
        select: "body > form:nth-child(1) > font:nth-child(2) > table:nth-child(2) > tr:nth-child(16) > td:nth-child(6)"
        value_template: "{{ ((value.split('&')[0] | float) | round (0) )}}" 
        unit_of_measurement: "W"
      # Ausgangsleistung - L2 - Spannung:
      - name: Wechselrichter - Ausgangsleistung - L2 - Spannung
        select: "body > form:nth-child(1) > font:nth-child(2) > table:nth-child(2) > tr:nth-child(19) > td:nth-child(6)"
        value_template: "{{ ((value.split('&')[0] | float) | round (0) )}}" 
        unit_of_measurement: "V"
      # Ausgangsleistung - L2 - Leistung:
      - name: Wechselrichter - Ausgangsleistung - L2 - Leistung
        select: "body > form:nth-child(1) > font:nth-child(2) > table:nth-child(2) > tr:nth-child(21) > td:nth-child(6)"
        value_template: "{{ ((value.split('&')[0] | float) | round (0) )}}" 
        unit_of_measurement: "W"
      # Ausgangsleistung - L3 - Spannung:
      - name: Wechselrichter - Ausgangsleistung - L3 - Spannung
        select: "body > form:nth-child(1) > font:nth-child(2) > table:nth-child(2) > tr:nth-child(24) > td:nth-child(6)"
        value_template: "{{ ((value.split('&')[0] | float) | round (0) )}}" 
        unit_of_measurement: "V"
      # Ausgangsleistung - L3 - Leistung:
      - name: Wechselrichter - Ausgangsleistung - L3 - Leistung
        select: "body > form:nth-child(1) > font:nth-child(2) > table:nth-child(2) > tr:nth-child(26) > td:nth-child(6)"
        value_template: "{{ ((value.split('&')[0] | float) | round (0) )}}" 
        unit_of_measurement: "W"
  • add the following lines to secret.yaml :
pv_link_values: http://192.168.178.50/index.fhtml
pv_link_settings: http://192.168.178.50/Solar2.fhtml
pv_username: pvserver
pv_password: pvwr

Have fun!

David

Thank you very much.
You saved me a lot of time.
Great und thanks again.

(No other Kostal Piko component was working with my Piko 8.3 from 2011.)

Hello,

is it secret.yaml or secrets.yaml, because there isn’t an secret.yaml??

Best regards