Testers needed for redesigned Kostal Inverter binding

Hi!

  Great to see that you got values, I will take a closer look asap,

but I am afraid it will not be until next week.

I am in a little hurry this weekend, sorry for that :slight_smile:

//Basse

Hi!

  This is a very good question, and I hope that I have an answer. I

have messed up the day and total values for some posts. Sorry for
that.

So, Please, try the latest binding at [https://github.com/basse04/Openhab-Kostal-Piko-NewGen

  ](https://github.com/basse04/Openhab-Kostal-Piko-NewGen)

and just let me know if and how it works.

Best Regards Basse

Hello,
the latest version does not work for me.
Says “Status: UNINITIALIZED - HANDLER_MISSING_ERROR” in PaperUI->Configuration->Things

This is in the log:
2019-06-09 21:26:09.326 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler KostalInverterPikoNewGenHandler of thing kostalinverterpikonewgen:kostalinverterpikonewgen:inverter tried updating channel ownConsumption_Total although the handler was already disposed.

2019-06-09 21:26:09.328 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler KostalInverterPikoNewGenHandler of thing kostalinverterpikonewgen:kostalinverterpikonewgen:inverter tried updating channel totalOperatingTime although the handler was already disposed.

2019-06-09 21:26:09.331 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler KostalInverterPikoNewGenHandler of thing kostalinverterpikonewgen:kostalinverterpikonewgen:inverter tried updating channel current although the handler was already disposed.

2019-06-09 21:26:09.333 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler KostalInverterPikoNewGenHandler of thing kostalinverterpikonewgen:kostalinverterpikonewgen:inverter tried updating channel currentDir although the handler was already disposed.

2019-06-09 21:26:09.335 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler KostalInverterPikoNewGenHandler of thing kostalinverterpikonewgen:kostalinverterpikonewgen:inverter tried updating channel chargeCycles although the handler was already disposed.

2019-06-09 21:26:09.337 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler KostalInverterPikoNewGenHandler of thing kostalinverterpikonewgen:kostalinverterpikonewgen:inverter tried updating channel temperature although the handler was already disposed.

2019-06-09 21:26:09.340 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler KostalInverterPikoNewGenHandler of thing kostalinverterpikonewgen:kostalinverterpikonewgen:inverter tried updating channel loginterval although the handler was already disposed.

2019-06-09 21:26:09.342 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler KostalInverterPikoNewGenHandler of thing kostalinverterpikonewgen:kostalinverterpikonewgen:inverter tried updating channel s0InPulseCnt although the handler was already disposed.

2019-06-09 21:26:09.343 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler KostalInverterPikoNewGenHandler tried updating the thing status although the handler was already disposed.

Hi!

  I have seen this also, I will have a closer look, but I will

remember that I have found the fault in the demo.items file.

I will be back asap.

//Basse

After a restart of my Raspberry Pi, the binding does not show up in PaperUI at all.
The log now shows this:

2019-06-09 21:46:52.906 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.kostalinverternewgen-2.5.0.jar

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.kostalinverterpikonewgen [213]

Unresolved requirement: Import-Package: com.google.gson; version=“2.8.2”

at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]

at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]

at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]

at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]

at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [10:org.apache.felix.fileinstall:3.6.4]

at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [10:org.apache.felix.fileinstall:3.6.4]

at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]

at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]

Thank’s i will be back, I know what this depends on.

Hi,

  I am a little confused about com.google.gson, earlier it has to

be attached to the binding but it should be there in this binding.

Please, have a try, there is a new version at https://github.com/basse04/Openhab-Kostal-Piko-NewGen

//Basse

Hello,
this version is working again.
I also had a look at the statistics values now.
There is an error in some values with the comma:

example:
webpage: Home-consumption day 9.2kWh
binding: Home Consumption Day 9200.72 kWh

Best Regards
Bernd

Hi!

  Great, I do not have the possibilities to scrape this values, so

it’s really good to have your feedback. Please, try the latest: https://github.com/basse04/Openhab-Kostal-Piko-NewGen

  And then some questions, what equipment do you have to measure

the values for Home and Self-consumption?

  I have read about BA Sensor, is this the thing to have or do you

maybe have some other?

  I don't have batteries either, the Swedish Government give you

like 0.06 Euro for each kWh you sell to the Grid-companys up to
your own consumption, so these days is it not so necessary to have
batteries, but I have understand that they are more common in
Germany.

  Do you have batteries ?, I ask due to that the next version of

this binding will have possibilities to change values regarded to
the battery, this new one is under construction and test.

Best Regards Basse

Hello, I have just the Kostal Piko 6.0 BA with 4.8kw battery from Kostal.
The consumption values can be read from the web interface.

That you don’t have a battery explains why the binding does not show how full the battery is charged :wink:

Hi!
I see, I have an Kostal Piko 12, and it’s not possible to connect a battery to this one and I do have to have an external BA sensor to measure this values.

//Basse

Hello Basse,
you have uploaded your binding to GitBub, but not the source code.
Any plans on making this open source, so that other can contribute?

Regards
Bernd

Hi!

Sorry for the delayed answer, I have been on holiday.

  I am in progress to redesign the binding for Kostal Inverter Piko

New Gen, the new version will be with options to do configuration
changes, ex. regarded to battery usage.

At https://github.com/basse04/Kostal-Inverter-Piko-Newgen-Conf/blob/master/org.openhab.binding.kostalinverterpikonewgenconf-2.5.0.jar
you can download a very beta- version of this binding. There is
also code attached in this *.jar.

  This one has a lot of differences regarded to channels etc. so if

you like to try it, be aware to do changes in the configuration
files, or maybe even better, make new ones.

  My next step with this binding is to have it tested, there has

been tests done and it seems so far to work as expected. Then make
it compatible with the new bnd-maven build system that openhab
bindings will adept to.

  So I think that there is no use in the future for the old

binding, better to develop the one described above, they are
actually the same but with some improvements in the newer one.

Best Regards Basse

Hello Basse,
I don’t know if it is of any use, but I did analyze the webinterface of my Kostal and have written down which values you can get, in which unit and how to get them via JSON:

Home
|
|-Power Values
-Total DC input [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=33556736
-Output power [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67109120
-Self-consumption [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=83888128
|
|-Battery
-Charging status [%][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=33556229
|
|-Status
-Operating status [integer] --> http://192.168.178.21/api/dxs.json?dxsEntries=16780032

Current values
|
|-PV Generator
|-DC input 1
-Voltage [V][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=33555202
-Current [A][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=33555201
-Power [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=33555203
|-DC input 2
-Voltage [V][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=33555458
-Current [A][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=33555457
-Power [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=33555459
|
|-Battery
-Voltage [V][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=33556226
-Charging status [%][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=33556229
-Charging [A][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=33556238
Note: Charge/discharge status is 0=charge,1=discharge [integer] --> http://192.168.178.21/api/dxs.json?dxsEntries=33556230
-Charge cycles [integer] --> http://192.168.178.21/api/dxs.json?dxsEntries=33556228
-Temperature [degree celcius][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=33556227
|
|-House
|-Home consumption covered by
-Solar generator [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=83886336
-Battery [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=83886592
-Grid [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=83886848
|-Phase selective home consumption
-Phase 1 [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=83887106
-Phase 2 [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=83887362
-Phase 3 [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=83887618
|
|-Grid
|-Grid parameters
-Output power [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67109120
-Grid frequency [Hz][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67110400
-Cos φ [double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67110656
-Limitation on [%][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67110144
|-Phase 1
-Voltage [V][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67109378
-Current [A][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67109377
-Power [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67109379
|-Phase 2
-Voltage [V][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67109634
-Current [A][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67109633
-Power [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67109635
|-Phase 3
-Voltage [V][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67109890
-Current [A][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67109889
-Power [W][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=67109891
|
|-Analog inputs
-Analoginput 1 [V][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=167772417
-Analoginput 2 [V][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=167772673
-Analoginput 3 [V][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=167772929
-Analoginput 4 [V][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=167773185
|
|-S0 input
-Number of energy pulses (S0-in) [no unit/s][integer/integer] --> http://192.168.178.21/api/dxs.json?dxsEntries=184549632&dxsEntries=150995968

Statistics
|
|-Day
-Yield [Wh][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=251658754
-Home-consumption [Wh][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=251659010
-Self-consumption [Wh][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=251659266
-Self-consumption rate [%][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=251659278
-Degree of self-sufficiency [%][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=251659279
|
|-Total
-Yield [kWh][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=251658753
-Home-consumption [kWh][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=251659009
-Self-consumption [kWh][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=251659265
-Self-consumption rate [%][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=251659280
-Degree of self-sufficiency [%][double] --> http://192.168.178.21/api/dxs.json?dxsEntries=251659281
-Operation time [h][integer] --> http://192.168.178.21/api/dxs.json?dxsEntries=251658496

Best Regards
Bernd

Hi Bernd,

  Thank's for your help. I will fulfill with some of the values you

described, in the ongoing new binding. I can’t say when I will
have time to release it, there is an ongoing construction work on
my house, which need some time of me. But I will do my very best
and let you know when it’s time for a new test.

  I have got some input from another member of the community as is

using the newest ongoing binding and it seems like it works as
expected so far, this one is with possibilities to change some
values ex. Smart Home Control.

Best Regards Basse

Hi,

I tried your Kostal Binding with my Plenticore Plus 10.0
The Binding starts with going to “Online” but then ends with an exception and going to “Offline”. (see below)
Do you have any idea? Is something missing?
Thanks.

Regards
Frank

2019-11-11 17:58:43.305 [hingStatusInfoChangedEvent] - 
'kostalinverterpikonewgen:kostalinverterpikonewgen:inverter' changed from UNINITIALIZED to 
INITIALIZING
2019-11-11 17:58:43.335 [hingStatusInfoChangedEvent] - 
'kostalinverterpikonewgen:kostalinverterpikonewgen:inverter' changed from INITIALIZING to             
UNKNOWN
2019-11-11 17:58:43.344 [hingStatusInfoChangedEvent] - 
'kostalinverterpikonewgen:kostalinverterpikonewgen:inverter' changed from UNKNOWN to ONLINE

2019-11-11 17:58:43.671 [hingStatusInfoChangedEvent] - 
'kostalinverterpikonewgen:kostalinverterpikonewgen:inverter' changed from ONLINE to OFFLINE     
(COMMUNICATION_ERROR): java.lang.RuntimeException:Exception while calling 
URL:http://192.168.178.67/api/dxs.json?dxsEntries=67109120&dxsEntries=251658754&dxsEntries=251658753&dxsEntries=16780032&dxsEntries=67109378&dxsEntries=67109377&dxsEntries=67109379&dxsEntries=67109634&dxsEntries=67109633&dxsEntries=67109635&dxsEntries=67109890&dxsEntries=67109889&dxsEntries=67109891&dxsEntries=33556736&dxsEntries=33555202&dxsEntries=33555201&dxsEntries=33555203&dxsEntries=33555458&dxsEntries=33555457&dxsEntries=33555459&dxsEntries=33555714&dxsEntries=33555713&dxsEntries=33555715

Hi!
Thank you for trying this Binding. But I think I will have to give you an not so nice answer.
This Binding is for Model Piko New Gen. There is another Binding as ‘org.openhab.kostalinverter’ and this one is for Proven Generation(I do think this is the right name for this model).
I have seen something regarding progress of an Binding for Plenticore, but I am not involved so Please keep on searching.

Just some thoughts, you can if you like send the link in an Web-browser as:
http://192.168.178.67/api/dxs.json?dxsEntries=67109120&dxsEntries=251658754&dxsEntries=251658753&dxsEntries=16780032&dxsEntries=67109378&dxsEntries=67109377&dxsEntries=67109379&dxsEntries=67109634&dxsEntries=67109633&dxsEntries=67109635&dxsEntries=67109890&dxsEntries=67109889&dxsEntries=67109891&dxsEntries=33556736&dxsEntries=33555202&dxsEntries=33555201&dxsEntries=33555203&dxsEntries=33555458&dxsEntries=33555457&dxsEntries=33555459&dxsEntries=33555714&dxsEntries=33555713&dxsEntries=33555715

and post me the result. I’m just curios to see if I can see some similarities with the answer I get from my inverter.

BR Basse

Thank you Basse,

I didn´t known that there are different Bindings neccessary for the Kostal product lines. With the pre-installed Kostal binding I also had some exceptions. That´s why I´ve found yours. :wink:

When I send the link above to my webbrowser I only got 404 - Not found.

Regards
Frank

Hi,
I was afraid of that, I have had a lot of trying before I found out how to scrape the Inverter type New Generation, the link you tried response with an JSON-string including the actual values for each dxsEntrie, representing a specific post. Ex. GridOutputPower etc.

Br Basse

Before doing a pull request for the Readme, here for others to read on how to correct http no response error.