thanks for sharing this!
I am sort of in a similar position. A while back I built a custom integration for my Kostal PIKO 8.0 BA.
The code is certainly not up to the quality required to get this into Home Assistant Core, but the energy dashboard gave me some motivation to eventually achieve that.
While building this there has been some confusion about the apis through which the inverters are accessible. In this case it seems like we’re both on the same api. Those dxs.jsons look oddly familiar.
Most of the stuff I did was trying to reverse-engineer the content of the inverters website, as its using the api itself.
I am wondering how to get this going properly:
Would this be a new integration or an extension to the Kostal Plenticore integration, eventually leading to a Kostal integration?
Side note: Has anyone checked the variety of python packages (see a list here) available for the PIKO line of inverters?
thanks for letting me know, that you already have a working custom component. I will definitely check it out. It is funny, I took quite some time, to check if there are available components or libraries, but I was not able to find it.
My goal is the same as yours, getting the Kostal Piko to work with the energy dashboard and calculating the correct figures for it. If it is ok for you, I would like to contribute to your custom component.
In regards to the integration topic, I would suggest to focus on a separate integration first. The reason is simple, I don’t own a Plenticore inverter and if we would merge Piko and Plenticore API, we need to distinguish them from each other in an automated way. That is not easily achieveable with the lack of actual hardware. Maybe this would be a later step, as soon as the integration is on a good quality level!?
I had a brief look at the libraries. Most of them are focused on either the HTML scrapping integration for “old” Piko versions or on Plenticore integrations. Only the DAMEK86/pykostal: Python library for kostal piko devices (github.com) library is using the dxs.json API. Maybe we can use it as a base for an official integration.
good point with the two apis. I fully agree, its probably best to keep them separate for now.
The library you’ve linked does look like its doing most of the stuff required.
I will check it out further and compare the IDs I have found to the ones provided by the library.
In case there are some missing, I’d contribute it to the library before removing it from the custom component.
Next up would be checking out the docs and other similar integrations that already support the energy dashboard. It should just be a matter of using a different library while keeping the overall structure the same as other integrations
Good news, I just checked the library: All of the ids I figured out are also in the library, so we are good to use it (also from the license perspective).
Potentially there are even more in the lib (I only checked in one direction).
Will start working on embedding this into a component hopefully soon.
I setup my dev environment as well. Looking now into your custom component to make it running with my Piko as well.
In parallel I check the setup of the Plenticore integration. I hope that we can use the same parameter logic for populating the energy dashboard.
How should we align our parallel developments? Should I fork from your custom component?
Just a quick heads up: Since I am working more on the project and its probably going to be used with other Piko inverters, I have renamed the repository:
Hi, this is a great discussion.
I just got my Piko 8.5 installed and now I’m really curious to see if there is a good integration with Home Assistant.
Is there already a public version for this?
Thanks a lot and thanks for your efforts with this!
I think the issue comes from the IP address, that should match your Inverter IP address. “192.168.178” is wrong and should be replaced with your local IP.
we are working on a official integration which is still in an early development stage. You can find a first draft in the pull request with scheidtdav’s repository:
sorry for the long inactivity with this project. Hope to come back to it soon!
Life is really busy right now.
If you feel adventurous, you can try out an older version of the repository which I have been running for quite some time now.
To install, copy and paste the project into your custom_components folder and set it up in the configuration.yaml (told you its adventurous) as described in the usage section of the README.
Hope that helps!
Edit: Finally have figured out how to enable proper notifications for this thread, I hope to see replies quicker now.
Hi @scheidtdav , thanks for the integration. I would like to test it, but I am quite new here and I am not sure what to add to my configuration.yaml for getting it to work.
I downloaded the Integration from Git and copied the kostal_piko folder to the custom_components.
To the configuration.yaml I added:
kostal_piko:
host: http://192.168.178.31/
But I get: Integration error: kostal_piko - Integration ‘kostal_piko’ not found.
When checking the yaml.
I guess the user and passtwort are optional paremters, right?
the integration does not require you to do anything in the configuration.yaml (as long as you did download a current version).
Once installed successfully, you can just configure it like any other integration.
Username and password are not optional.
I just fixed a couple of issues with the existing code so it might be worth giving it another try.
Please see the github page and issues for more detail.
this may sound like a silly question, but is this exactl what you typed in for the host?
That’s not a valid ip address, so I cannot work like this. Username and password are required.
ok, it will definitely not work with xyz, because it is not a valid address. The system puts it there as an example value.
Please take the address of your inverters built-in website. It should look something like http://192.168.178.122. Make sure that it starts with http://.
use the username and password you use for logging in to the inverters website.
Finally, would you mind sharing your firmware and UI version? I have it tested on a Piko 8 BA and there might be differences in the interfaces.
This may explain why it is not working, if everything else (ip address, username, password) is correct.