Kostal not working via config file

Tags: #<Tag:0x00007f38735976f0> #<Tag:0x00007f3873597560> #<Tag:0x00007f38735973f8>

I cannot get the kostal binding to work via the config files.
http://docs.openhab.org/addons/bindings/kostalinverter/readme.html#thing-configuration

I installed the binding by adding kostalinverter to addons.cfg.

Via PaperUI I successfully added the Thing and the Items.

But I want to use the config files.

I deleted the entries in the PaperUI and created a kostal.things with the following content, like described in the Wiki.

Thing kostalpico:kostalpico:inverter [ url="http://pvserver:****@192.168.0.128" ]

I also tried this:

Thing kostalpico:kostalpico:inverter [ url="http://192.168.0.128", userName="pvserver", password="*****" ]

The Karaf console and the PaperUI do not list this thing.

I started debugging:

openhab> log:set TRACE org.openhab.binding.kostalinverter

But I get no ERROR in openhab.log.

btw: This is the third out of four bindings I cannot get working via config files.
Really frustrating. :disappointed:

I have this configuration which works without any problem:

Thing kostalinverter:kostalinverter:Piko "PV-Umrichter" @ "Heizung" [url="http://192.168.xx.yy", userName="user", password="pass", refreshInterval=60]

Maybe the documentation isn’t right as the info text at the binding states:

Supported Things
Kostal Inverter

kostalinverter:kostalinverter

Kostal Inverter

Thanks.
You are right.
It works now with your configuration (kostalinverter:kostalinverter).

I created an issue: https://github.com/openhab/openhab2-addons/issues/1893

Hi!
Just a question, what is your type of inverter?
I do have an Kostal Piko 8.5, and this one is almost 1 year old.
I have had a lot of problem with the bundle at https://github.com/openhab/openhab2-addons/tree/master/addons/binding/org.openhab.binding.kostalinverter

It was not possible to get it ONLINE in openHAB due to that the bundle doesn’t get the info. in the right syntax.
It seems like the last delivered inverters sends the information in an totally different manner then the older ones.

I have now redesigned the existing bundle, so it’s now possible for me to catch up the data from my kostal and even deliver it to openHAB.
I have tested it for a couple of weeks and it seems like it work as expected. Well, I’'m no professional programmer, but if someone has the same or equal kostal-hw as me, might you test it, and get this new bundle to work maybe even better.

Just let me now!

//Basse

It’s a Piko 8.3, according to the Webinterface.

I can see that Kostal has different categorys of 8.3 PIKO-Wechselrikter, die bewährte generation and 8.5 ,die neue generation.
Don’t now if there are any differences between them regarding to openHAB, but my version-info is like:
UI06.11
FW05.35
HW0100
PAR02.49

Anyhow, I think that you will have to try with the existing bundle and see if it works, and if it doesn’t, we can try with mine.

//Basse

Like I said, it is working now. :slight_smile:

Great,
and I’m right now sure that I found the reason why mine Kostal doesn’t work with this bundle, even though I use the very same syntax as you are.

Hi,

I run into the same problem. My Kostal (2x) with V5.44 (bewährte Generation) are not getting online with 2.1 or 2.2 on a Windows VM. I can connect to the via there webUI, but the item line that was working fine with 2.0 is now producing a thing that has a communication error. Is there something changed on the Kostal Binding because of the new Kostal inverter generation and do I have to connect via http or an older binding?

Thanks.

Hi,
just to be shure, I have not done any changes with this bundle.
The bundle I am relating to earlier in this topic is still just running locally in my very own system. If I manage to make it work as wanted it might some day be finished for public use, but I am really not there yet.

I had to redesign because my Kostal inverter is an PIKO Inverters - the new generation, PIKO Wechselrichter - die neue generation and they have then, for a year ago, a totally different communication due to PIKO Inverters - the proven generation, PIKO Wechselrichter - die bewährte generation.

I am right now in a little hurry, but I will do my best asap to see if I somehow can try to figure out som way for you to check if there is the very same communication for your inverter as to mine in these days. I will remember that you can see differences in the source code.
Try to right-click when you are connected to the webUI and then CTRL+U. I do think that we then can compare our code and maybe then find some useful info, or at least some differences or not.

Regards Örjan

Hi,

yes I´m in contact with Kostal because of my Apple network and at the beginning this wasn’t´t working because of a not implemented bonjour.
Till this I´m a tester for there software.

The “bewährte Generation” will stay/frozen at 5.44. There will be no updates anymore and Version 6 is not supported anymore on this generation. They had problems with the software on this and had to replace the motherboard at all users who are fast enough to install it before they could revoke it from there website.

So there must be in the future a old and a new binding. The old one can´t be removed because of all old inverters won´t get the new 6 UI structure.

Regards

Jens

To the topic that the binding wasn’t working in the Windows VM: Thats right. Had to install a Unix VM (CentOS) and install openhab2 new and the binding works like it should.

Or make it backwards compatible with a special configuration option like:

kostal.things

support_old_devices = true

I just think we dont want two binding kostal_old and kostal_new.
Since these devices will be running for many years and properbly not see any update after a few years there will be many more devices in the future that cannot be updated to the latest version.

Maybe the binding will need special support for every major version.

kostal.things

software_version = 5.44
# or
software_version = 6.0
# or
software_version = 7.x

just my 2 cents. :wink:

Hi!
I have now managed to redesign the bundle for kostal.
The new one is working with the inverters regarding to New Generation, as is the type I have. I have not done any changes to the existing code for the older inverters.

I have done an switch in the code so it’s possible to make a change in x.things as below to use the very same bundle for both type’s.
kostalinverter:kostalinverter:inverter [ url=“http://192.168.1.x”,type=“new_generation”]

or
kostalinverter:kostalinverter:inverter [ url=“http://192.168.1.x”,type=“proven_generation”]

To test if an inverter will remain to the new_generation it’s possible to in an web-browser send the following link to the actual inverter,
http://192.168.1.x/api/dxs.json?dxsEntries=67109120&dxsEntries=251658753&dxsEntries=251658754&dxsEntries=16780032

and the inverter should then answer as,
{“dxsEntries”:[{“dxsId”:67109120,“value”:7811.751465},{“dxsId”:251658753,“value”:5933.915527},{“dxsId”:251658754,“value”:16414.169922},{“dxsId”:16780032,“value”:3}],“session”:{“sessionId”:0,“roleId”:0},“status”:{“code”:0}}

which is as I understand an JSON-object.

Then finally an question, I am now trying to make this code to an official bundle as described in “Include the Binding in the Build and the Distro” but I have then turned in to some trouble.
When I do the command mvn clean install I got an answer like:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.24.0:compile (default-compile) on project org.openhab.binding.kostalinverter: Compilation failure: Compilation failure:
[ERROR] /home/basse/openhab2-master/git/openhab2-addons/addons/binding/org.openhab.binding.kostalinverter/src/main/java/org/openhab/binding/kostal/inverter/WebscrapeHandler.java:[19]
[ERROR] import java.util.Base64;
[ERROR] ^^^^^^^^^^^^^^^^
[ERROR] The import java.util.Base64 cannot be resolved
[ERROR] /home/basse/openhab2-master/git/openhab2-addons/addons/binding/org.openhab.binding.kostalinverter/src/main/java/org/openhab/binding/kostal/inverter/WebscrapeHandler.java:[183]
[ERROR] String base64login = new String(Base64.getEncoder().encode(login.getBytes()));
[ERROR] ^^^^^^
[ERROR] Base64 cannot be resolved
[ERROR] 2 problems (2 errors)
[ERROR] -> [Help 1]

I have no faultmessages or whatever in the IDE and the bundle works when I start it from there, and I have even moved it to another openHAB2 system running on an another laptop and everything works as expected.

So I do need som help with this issue!

Regards Basse

1 Like

Hi,

yesterday we have installed my new PIKO 2.5 MP.
I am running Openhabian with OH2.2
I copied https://github.com/basse04/openHAB-Kostal-Inverter-New-Generation/blob/master/org.openhab.binding.kostal.inverter/target/org.openhab.binding.kostalinverter-2.3.2-SNAPSHOT.jar to my adons folder,
and this Kostal.Things file:

Thing kostalinverter:kostalinverter:inverter [ url="http://192.168.178.53",type="new_generation"]

I also tried with User/PW

Thing kostalinverter:kostalinverter:inverter [ url="http://192.168.178.53",userName="pvserver", password="pvwr",type="new_generation"]

but I don’t get it online :frowning:
I always get Thin Kostal Inverter uninitialized

What is wrong? Does this new binding not work together with OH2.2?

Holger

Hi,

I copied the above linked …2.3.2 Snapshot into the addons folder and for me the overworked binding works perfect. Thanks a lot for it!

However, I have in addition an BYD energy storage connected to the Kostal inverter and from there some additional parameters for charging/discharging the battery, the voltage, the charging level, …

Is there any chance to read in those parameters also?

Greets,
Tobias

Hi,
Thanks, nice that you like it.
I will remember that I had some problems to add more then 23 different ID’s(dxsEntries)
But It should be possible to change some of them.

Today are the following entries:
dxsEntries[0] = “67109120”;
dxsEntries[1] = “251658753”;
dxsEntries[2] = “251658754”;
dxsEntries[3] = “33555202”;
dxsEntries[4] = “33555201”;
dxsEntries[5] = “33555203”;
dxsEntries[6] = “33555458”;
dxsEntries[7] = “33555457”;
dxsEntries[8] = “33555459”;
dxsEntries[9] = “33555714”;
dxsEntries[10] = “33555713”;
dxsEntries[11] = “33555715”;
dxsEntries[12] = “67109378”;
dxsEntries[13] = “67109377”;
dxsEntries[14] = “67109379”;
dxsEntries[15] = “67109634”;
dxsEntries[16] = “67109633”;
dxsEntries[17] = “67109635”;
dxsEntries[18] = “67109890”;
dxsEntries[19] = “67109889”;
dxsEntries[20] = “67109891”;
dxsEntries[21] = “16780032”;
dxsEntries[22] = “251658496”;

If you will try to catch the different values from your inverter, you can do as:
http://kostal.ip/api/dxs.json?dxsEntries=251658754&dxsEntries=251658753

and then just change the dxsEntries as you like from below.

I myself does not have any battery so if you test and let me know if it works as expected.
And if it does, maybe we can switch some entries to the ones that are more needed.

Below is a list with different dxsEntries that as I suppose, it will be possible to use.

Rad dxsId
16855 kbApp.navigation, kbApp.navigation.services, kbApp.navigation.controllers, kbApp.navigation.directives, kbApp.pages.current-values.analog-inputs. http://‘inverter-ip’/#/current-values/analog-inputs
16857 Analog1 167772417
16859 Analog2 167772673
16861 Analog3 167772929
16863 Analog4 167773185

kbApp.pages.current-values.battery, current-values-batteryCtrl
16874 Charge 33556229
16876 Current 33556238
16878 CurrentDir 33556230
16880 ChargeCycles 33556228
16882 Temperature 33556227

16889 kbApp.pages.current-values.grid,kbAppProperties. http://‘inverter-ip’/#/current-values/grid
16892 GridOutputPower 67109120 AC Power, TD = 4
16893 GridFreq 67110400
16895 GridCosPhi 67110656
16897 GridLimitation 67110144
16899 GridVoltageL1 67109378
16901 GridCurrentL1 67109377
16903 GridPowerL1 67109379
16905 GridVoltageL2 67109634
16907 GridCurrentL2 67109633
16909 GridPowerL2 67109635
16911 GridVoltageL3 67109890
16913 GridCurrentL3 67109889
16915 GridPowerL3 67109891

16922 kbApp.pages.current-values.home. http://‘inverter-ip’/#/current-values/home
16924 AktHomeConsumptionSolar 83886336
16926 AktHomeConsumptionBat 83886592
16928 AktHomeConsumptionGrid 83886848
16930 PhaseSelHomeConsumpL1 83887106
16932 PhaseSelHomeConsumpL2 83887362
16934 PhaseSelHomeConsumpL3 83887618

16941 kbApp.pages.current-values.pv-generator, kbAppProperties http://‘inverter-ip’/#/current-values/pv-generator
16943 dc1Voltage 33555202
16945 dc1Current 33555201
16947 dc1Power 33555203
16949 dc2Voltage 33555458
16951 dc2Current 33555457
16953 dc2Power 33555459
16955 dc3Voltage 33555714
16957 dc3Current 33555713
16959 dc3Power 33555715

16966 kbApp.pages.current-values.s0-in http://‘inverter-ip’/#/current-values/s0-in
16968 S0InPulseCnt 184549632
16970 Loginterval 150995968

16990 kbApp.pages.home, kbAppProperties http://‘inverter-ip’/#/home
16992 dcPowerPV 33556736
16994 acPower 67109120 AC Power, TD = 4
16998 ownConsumption 33556229
17000 batStateOfCharge 16780032 Solar Status, TD = 13

17067 kbApp.pages.info.versions http://‘inverter-ip’/#/info/versions
17069 VersionUI 16779267
17071 VersionFW 16779265
17073 VersionHW 16779266
17075 VersionPAR 16779268
17077 SerialNumber 16777728
17079 ArticelNumber 16777472
17081 CountrySettingsName 16779522
17083 CountrySettingsVersion 16779521

17159 kbApp.pages.settings.battery-configuration, kbAppPageService
17163 chargeTimeEnd 33556240
17165 maintenanceCharge 33556236
17167 feedInSetting 33556237

17192 kbApp.pages.settings.communication.inverter-address, kbAppPageService, kbAppProperties http://‘inverter-ip’/#/settings/communication/inverter-address
17194 inverterAddress 117441025

17211 kbApp.pages.settings.communication.modem, kbAppPageService, kbAppProperties
17213 publicLineNum 117441282
17215 gsmPin 117441283
17218 gsmSigQual 117441284

17261 kbApp.pages.settings.communication.network, kbAppPageService http://‘inverter-ip’/#/settings/communication/network
17263 settingIpAuto 117440769
17265 settingIp1 117440770
17267 settingIp2 117440771
17269 settingIp3 117440772
17271 settingIp4 117440773
17273 settingSubnetmask1 117440774
17275 settingSubnetmask2 117440775
17277 settingSubnetmask3 117440776
17279 settingSubnetmask4 117440777
17281 settingGateway1 117440779
17283 settingGateway2 117440780
17285 settingGateway3 117440781
17287 settingGateway4 117440782
17289 settingExtGateway 117440778
17291 dns2_1 117440787
17291 dns2_2 117440788
17291 dns2_3 117440789
17291 dns2_4 117440790
17299 netInfoIp1 117440791
17301 netInfoIp2 117440792
17303 netInfoIp3 117440793
17305 netInfoIp4 117440794
17307 netInfoSubnetmask1 117440795
17309 netInfoSubnetmask2 117440796
17311 netInfoSubnetmask3 117440797
17313 netInfoSubnetmask4 117440798
17315 netInfoGateway1 117440799
17317 netInfoGateway1 117440800
17319 netInfoGateway1 117440801
17321 netInfoGateway1 117440802
17323 netInfoDns1_1 117440803
17325 netInfoDns1_2 117440804
17327 netInfoDns1_3 117440805
17329 netInfoDns1_4 117440806
17331 netInfoDns2_1 117440807
17333 netInfoDns2_2 117440808
17335 netInfoDns2_3 117440809
17337 netInfoDns2_4 117440810

17358 kbApp.pages.settings.communication.rs485, kbAppPageService, kbAppProperties. http://‘inverter-ip’/#/settings/communication/rs485
17339 netInfoMacAddress 117440811
17360 inverterAddress 117441025
17362 rs485Termination 117441027
17364 rs485Preload 117441026
17368 rs485Baudrate 117441029
17411 selLoginterval 150995968

17428 kbApp.pages.settings.general.date-time, kbAppPageService. http://‘inverter-ip’/#/settings/general/date-time
17430 unixTimestamp 268436225

17457 kbApp.pages.settings.general.inverter-name, kbAppPageService, kbAppProperties. http://‘inverter-ip’/#/settings/general/inverter-name
17459 InverterName 16777984

17493 kbApp.pages.settings.portal-configuration, kbAppPageService. http://‘inverter-ip’/#/settings/portal-configuration
17495 portalCode 117441537
17498 portalExport 117441539
17500 portalName 117441538
17502 lastPortalCon 117441542

17521 kbApp.pages.settings.string-configuration, kbAppPageService.
17523 parallelConnection 33556481

17540 kbApp.pages.settings.switching-output, kbAppPageService, kbAppProperties
17542 S0Function 201326848
17544 OwnConsumpCtrlFunction 201327105
17546 DelayError 201327113
17548 DelayErrorEnable 201327106
17550 Fc1PowerThreshold 201327107
17552 Fc1ExceedTime 201327108
17554 Fc1Runtime 201327109
17556 Fc1MaxActivationsDay 201327110
17558 Fc2ThresholdOn 201327111
17560 Fc2ThresholdOff 201327112
17562 UseBattery 201327114

17591 kbApp.pages.statistics.day, kbAppProperties. http://‘inverter-ip’/#/statistics/day
17593 Yield 251658754 Solar Energy Day, TD = 10.
17595 HomeConsumption 251659010
17597 OwnConsumption 251659266
17599 OwnConsRate 251659278
17601 AutonomyDegree 251659279

17621 kbApp.pages.statistics.total, kbAppProperties. http://‘inverter-ip’/#/statistics/total
17623 Yield 251658753 Solar Total Energy, TD = 7.
17625 OperatingTime 251658496
17627 HomeConsumption 251659009
17629 OwnConsumption 251659265
17631 OwnConsRate 251659280
17633 AutonomyDegree 251659281

Best Regards Basse

Hi Basse,

Thanks for sharing this interesting overview. All queries I tested worked very well and were correct.

However, it seems that I´m interested in quite different values. I would like to read out the following parameters:

  • 16874 Charge 33556229
  • 16876 Current 33556238
  • 16878 CurrentDir 33556230
  • 16882 Temperature 33556227
  • 16892 GridOutputPower 67109120 AC Power, TD = 4
  • 16924 AktHomeConsumptionSolar 83886336
  • 16926 AktHomeConsumptionBat 83886592
  • 16928 AktHomeConsumptionGrid 83886848
  • 16992 dcPowerPV 33556736
  • 17000 batStateOfCharge 16780032 Solar Status, TD = 13
  • 17593 Yield 251658754 Solar Energy Day, TD = 10.
  • 17595 HomeConsumption 251659010
  • 17597 OwnConsumption 251659266
  • 17599 OwnConsRate 251659278
  • 17601 AutonomyDegree 251659279
  • 17623 Yield 251658753 Solar Total Energy, TD = 7.
  • 17625 OperatingTime 251658496
  • 17627 HomeConsumption 251659009
  • 17629 OwnConsumption 251659265
  • 17631 OwnConsRate 251659280
  • 17633 AutonomyDegree 251659281

Are the parameters hardcoded which can be read by the binding or is it possible to change a reference table by myself to get it out?

With best regards,
Tobias

Hi!
They are today hardcoded, but to have them configureable from an config-file is in my todolist, and I have right know started to implement this option in the binding.
So I will be back asap, this is not my profession but of course will I do my very best to have it ready soon.
Best Regards Basse

1 Like

Thank you for the revision of the binding. Now I can also query my Kostal inverters.
Good job! :grin: