Kostal PIKO and Kostal PIKO IQ support

Yes, its working. It was my mistake when I tried to set it up.
I’m using your plugin and also the other one for the old Piko. They can work both together.

1 Like

Hi Stefan,

hope all well on your end?
I´m quite new in that community and came across this channel as I´m trying to get my Kostal Piko IQ integrated into HA. Well, its not as easy as i thought…looks like the Piko Iq os not supporting “dxsId”. Took me hours to get to that point :slight_smile: A question I got to you: You`ve mentioned you got a Kostal Piko IQ integration ready? Would you mind and share that with me? My approaches using the REST API i.e. https://192.168.178.x/api/v1/processdata failed so far :slight_smile:

Thanks for your help,
Patrick

Hey Patrick,

of course, I will upload it to https://github.com/sla89/hassio-kostal-piko-iq this weekend. :slight_smile:

I will let you know when it is there.

Update
I have uploaded the sources and some instructions. Can you please try it out? It works on my HA instance. If you need any additional sensor data let me know - I can add them for you. Currently it only supports a small set of values because I saw no need in querying everything that is possible. Next my inverter does not know anything about how much my house consumes and how much flows back into the grid. If you need that let me know.
You can use Kostal Yield Day sensor in the energy dashboard. :slight_smile:

@pazo2303 Welcome to Home Assistant :slight_smile: Let me know if you need anything else.

Hello,
I am using @sla89 s Integration, and i have the Entitys, but they are just “Unavailable”.

Maybe I have to define the Password?

-I have a PIKO 4.2 SWAG running
-The webinterface just looks like the one from pergola.fabio

if someone could help me i would be very grateful :smiley:

@Maaarc can you please do the following:

  • Open chrome or edge browser
  • open the developer console in Google Chrome/edge: open the menu in the upper-right-hand corner of the browser window and select More Tools > Developer Tools .
  • Select the network tab
  • Open the webinterface of your inverter

Now please check the network view and look for the api calls, like the one you have tried to open.

I dont know the swag edition. Have googled if it exposes the data by dxs.json or rest api? When you have tested my instructions above we know more :slight_smile:

Maybe we need an extra layer of authetication in sour case. So far I only know that this is necessary for IQ and Plenticore Plus inverters.

Hey @sla89 ,
I uploaded a Video to show all Information I get, because i am not quite sure for what we are looking.

Also, as said, i had/have to insert my password and username when opening the Website.

I hope i providet all information, you need.

Okay, I see.

Do you know if there are some default credentials?

I think adding authentication isnt a big deal.
Would you test my implementation since I have no device I can use for testing ^^

Yes there are default credentials, which I use to login into the Webinterface.

Username: pvserver
Password: pvwr
Btw. password can be changed in the Settings.

Or do you mean other credentials?

And of course I would like to test your implemetation :slight_smile:

Thanks, so I can use them in my code too for those that don’t change the password.

I think I will have some time till the end of the week.

1 Like

@Maaarc I have implemented the authentication mechanism in a branch. Can you give it a try please?

Simply copy the code as you have already done it.

Here is the code: https://github.com/sla89/hassio-kostal-piko/tree/add_authentication

Hi @sla89,

first of all - thanks a lot for all the work you are putting into this, really great and highly appreciated!

I downloaded the repository via HACS, restarted and eddited the configuration.yaml with

sensor:
- platform: kostal_piko
host: IP_OF_MY_INVERTER

If I search for “Piko” in the entities I now find quite a number of them, however, they all show as status that they do not have a unique ID and hence cannot be accessed.

Any idea what I am doing wrong here?

Thanks a lot fro your help in advance.
Best
Bastian

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