Kostal not working via config file

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