Kostal PIKO and Kostal PIKO IQ support

Thanks for the fast developing, but sadly it didn’t worked the first time. :frowning_face_with_open_mouth:

I tried the new Integration but no difference, still I see all Entities, but they are unavailable.

I tried with providing Login credentials and without.

what could I provide to fix the problem?

Hey Bastian,

you have to replace “IP_OF_MY_INVERTER” with the IP Address from your Inverter. (The IP you use so access the Web interface)

If you already have, and I misunderstand your message, I am sure Stefan can help you.

@Maaarc Can you please check the logs at setzings → settings → logs?

@bastian first my repo does not support HACS yet. Can you try copying the files manually as described? I guess you have also reported this issue at guthub, right?
Currently I have no clue why the IDs should not be unique.
Do you see the kostal_piko entities twice?

Hi @Maaarc ,

thanks - yes my message was probably not 100% clear. I used the (fixed) IP adress but did not want to show it here :wink:

Best
Bastian

Hi @sla89,

thanks and apologies - I am pretty new to all of this and am trying to get up to spead - I thought pasting the link into customary depositories in HACS would have been copying, but will read through the description and give it another go in the next days and update you thereafter.

I have not reported the issue anywhere else until now - if it helps happy to do so.

I do not see any entities twice.

Again thanks so much for all your efforts and help!
Best
Bastian

Hey here is the Log post:

Log Details (ERROR)

This error originated from a custom integration.

Logger: custom_components.kostal_piko.sensor
Source: custom_components/kostal_piko/sensor.py:87
Integration: kostal_piko
First occurred: June 26, 2022 at 10:34:52 PM (93509 occurrences)
Last logged: 6:19:02 PM

  • Failed updating sensor Kostal PIKO Home Consumption Battery: JSONDecodeError(‘Expecting value: line 1 column 1 (char 0)’)
  • Failed updating sensor Kostal PIKO Home Consumption Grid: JSONDecodeError(‘Expecting value: line 1 column 1 (char 0)’)
  • Failed updating sensor Kostal PIKO Home Consumption Phase 1: JSONDecodeError(‘Expecting value: line 1 column 1 (char 0)’)
  • Failed updating sensor Kostal PIKO Home Consumption Phase 2: JSONDecodeError(‘Expecting value: line 1 column 1 (char 0)’)
  • Failed updating sensor Kostal PIKO Home Consumption Phase 3: JSONDecodeError(‘Expecting value: line 1 column 1 (char 0)’)

@bastian you are welcome. Let me know if it works for you or if you need further instructions. :slight_smile:

@Maaarc okay, there is a decoding issue. The message received from the inverter has a different format than expected or maybe the API has changed and nothing fits anymore… or simply the authentication does not work :sweat_smile:
I will add some additional log output so we can debug this. Is that okay for you? It can be a little bit cumbersome from now on… just that I have mentioned it… :sweat_smile: Are you willing to go that path? Just asking before I put additional effort in it.

1 Like

Yes, In any case, I’m ready to trubbleshoot it.

I’m very grateful for you applying that much effort!

Hi @sla89,

I deleted everythign from HASC and simply copy pasted it plus adjusted the configuration.yaml. However I still get the same issue that when I look in the entities it says sensor.kostal_xxx has no unique ID so it can’t be managed via the UI. Additionally I get the following error in the log file:
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.kostal_piko.sensor
Source: custom_components/kostal_piko/sensor.py:87
Integration: kostal_piko (documentation, issues)
First occurred: 09:56:11 (6560 occurrences)
Last logged: 11:18:00

Failed updating sensor Kostal PIKO Home Consumption Battery: JSONDecodeError(‘Expecting value: line 1 column 1 (char 0)’)
Failed updating sensor Kostal PIKO Home Consumption Grid: JSONDecodeError(‘Expecting value: line 1 column 1 (char 0)’)
Failed updating sensor Kostal PIKO Home Consumption Phase 1: JSONDecodeError(‘Expecting value: line 1 column 1 (char 0)’)
Failed updating sensor Kostal PIKO Home Consumption Phase 2: JSONDecodeError(‘Expecting value: line 1 column 1 (char 0)’)
Failed updating sensor Kostal PIKO Home Consumption Phase 3: JSONDecodeError(‘Expecting value: line 1 column 1 (char 0)’)

Any idea what I am doing wrong here? Thanks a lot for your help - truely appreciated.

Best
Bastian

@bastian it looks like the same issue as Maarc has.
@Maaarc do you also see the issue with the unique ids when you open one of the entities?

Not sure but maybe I find some time tomorrow evening to provide some special debug version to you two guys.

yes, i also have the issue with the unique ids.

but as far as I know you can (in general) still use the sensors even if the unique id is missing

@Maaarc @bastian @Larnak can you please tell me your inverter type (piko 5.5, piko 17,…) and your firmware version?

Didnt had time yet, sorry guys. :frowning:

Of course

-Inverter Type: PIKO 4.2.
-firmware version: ver 3.74

Also, maybe you could easier find the problem, when you’re troubleshooting on my PC, via AnyDesk, TeamViewer or Discord…
Because it’s probably hard to figure out what doesn’t work if you don’t have it yourself.

I don’t have much idea how to go about solving such a problem, but maybe that would help you.

I also saw that you addressed a German user forum about this Integration on GitHub.

Could you maybe post a link to it? danke :smiley:

Thanks. I have added your version for now to the incompatibility list of the readme.

@Maaarc here the link to the german user forum: Kostal in Home Assistant integrieren - KOSTAL - Wechselrichterkommunikation / Monitoring - Photovoltaikforum
But it is more generic about how to integrate Kostal inverters into HA.

I had again a look at your video and I am afraid that your inverter does not support exposing any data via API…
It should have looked something like that:

The only way to get the data is by scraping the web interface provided by the inverter. This is done by this integration: https://github.com/rcasula/kostalpiko-homeassistant

@bastian if you do the same as Maaarc did in his post Kostal PIKO and Kostal PIKO IQ support - #56 by Maaarc - does it look the same on the right pane?
I think you must also try this integration: https://github.com/rcasula/kostalpiko-homeassistant

@pazo2303 any news from your side?

@TwIXx can you please tell me your inverter type and firmware version so that I can add it to the supported list at github? Thanks.

@joachimdissing any news from your side? Which inverter and firmware are you using?

@Larnak and @Larnak23 any news from your side? Can you please also tell me your inverter and firmware version.

Thank you all.

Thanks for the Link to the other integration.

Do you know, by any chance, how to set this up because I could not find instructions?
I did the same steps as with your integration, and it did not work.

I didn’t try it out but I guess it works the same as with my integration. Copy the files from the custom_components folder from github to your HA instance.

Then add to you configuration.yaml just one line:

kostal:

Its not a sensor so it must be on root level.

the rest should work out of the box and you should be able to configure the integration from the integrations view.

Moin,

want to confirm that the integration is working with a Piko 20 / FW 6.17 / UI 06.53.

Since I do not have the KSEM due to availability I am using the EDL21 Integration with a optical sensor on my main power meter (Norax 3D) to record current power (W) and total positive / negative energy (Wh).

Dashboard Flow-Diagramm

I will use the above mentioned calculation to create a template/sensor with my Home Consumption for Grafana. Just want to say thank you for the great work / the integration.

1 Like

You are welcome :slight_smile: Thank you for the feedback :slight_smile:

Since above calculations wont work for me here what I used now and added it to the configuration.yaml. Name of second sensor is a bit misleading. Actually I have calculated my current home power usage and not only the PV-Power usage.

template:
  - sensor:
      - name: "Total Own PV-Energy-Consumption"
        unit_of_measurement: "kWh"
        state: >
          {% set wr_prod = states('sensor.kostal_piko_yield_total') | float %}
          {% set sz_out = states('sensor.stromzahler_negative_active_energy_total') | float %}

          {{ ((wr_prod - (sz_out/1000)))  }}

      - name: "Total Own PV-Power Current"
        unit_of_measurement: "kW"
        state: >
          {% set wr_prod_current = states('sensor.kostal_piko_grid_output_power') | float %}
          {% set sz_active = states('sensor.stromzahler_sum_active_instantaneous_power') | float %}

          {{ ((wr_prod_current - (-sz_active/1000)))  }}

Had to divide the Power Meter reading by 1000 since it is handed over in Wh / W and the piko 20 is handing over in kWh / kW.

WIth this template sensor I was now able to create a graph for Home Consumption (green) in relation to PV-Output (yellow). Autoarchy was not too good today evening ;).

pv graph

I came across this thread because I also have the old Kostal Piko 4.2 and I would love to try it too by taking data from the web interface.

I went through the discussion and found a link to the integration you posted above: GitHub - rcasula/kostalpiko-homeassistant.

Unfortunately I’m not such expert; could you please share some hints how to install the integration?
Thank you in advance.