Migration of Novelan/Luxtronic binding to OpenHAB2

Tags: #<Tag:0x00007f174e2c5a58> #<Tag:0x00007f174e2c5968> #<Tag:0x00007f174e2c5850>

I have also compiled the addon for the stable version of openHAB3:
https://scholzbande.de/openhab/org.openhab.binding.luxtronik-3.0.0.jar

Hi,
how to install the binding in OH3.0.0 ?
I add the .jar in /usr/share/openhab/addons but did not get it in the binding-list of UI.

After you copied the file to the add-on directory you should be able to add a Luxtronic Thing by pressing + in the Thing dialog.
The binding will not appear in the list of bindings.

Hm. I actually started doing a reimplementation of the novelanheatpump binding a couple of days ago. Didn’t check this post the last days, but at least when I started no one was already working on it. Didn’t mention that here earlier, as I actually didn’t do any Java in the last 20 years, so wasn’t sure how far I would get :see_no_evil:

Nevertheless I have meanwhile written most parts of the binding. The names of available channels actually completely differs from those of the original plugin, as I use the names that are used by the Java Applet, the internal heatpump webserver serves.

I still had some stuff on my TODO for the implementation, but it is already working correctly on my local environment.

Not sure if it makes sense to create another PR for the same binding.

@ChaosKid42 did you plan to further improve your PR with additional channels or features? Let me know if it makes sense to further work on my implementation. Be happy to provide a PR if useful.

If anyone else is interested you can find my implementation here:

Hi ChaosKid42,
first of all, thanks a lot for your binding.
But I the Luxtronik Thing go in Status OFFLINE on my OH3.0.0 with follow Debug Info

2021-01-02 22:13:08.009 [DEBUG] [luxtronik.internal.HeatpumpConnector] - Heatpump connect
2021-01-02 22:13:08.113 [DEBUG] [.luxtronik.internal.LuxtronikHandler] - Unexpected error for thing luxtronik:heatpump:4b9b29e0fa
java.lang.ArrayIndexOutOfBoundsException: Index 182 out of bounds for length 174
at org.openhab.binding.luxtronik.internal.LuxtronikHandler.refresh(LuxtronikHandler.java:463) [bundleFile:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]

@sgiehl It’s a pity that multiple people started on this roughly at the same time. I did not plan to add more channels to it although I made the approach of the plugin much more generic today in order to make it easy to add new stuff.
I looked at your code and I like your approach which to me seems to be completely different from mine (encoding the types in all those enums vs. using a bunch of maps). Your aproach seems to be quite sophisticated.
So in the end I wouldn’t mind you from continuing your work if you like. As your version of the addon seems to me more complete I might simply close my PR after you submitted yours.
Regerads,

Christoph

I uploaded a new version of the plugin some minutes ago. Please try this one. As there’s now a bounds check in place I believe your probem is probably fixed.

Hi Christoph,
the new version of the plugin ist working very well, thanks a lot for your great work.

Juergen

Ok. Will create a PR for my changes later

Just created it [LuxtronicHeatpump] Adds new binding for integrating heat pumps based on a Luxtronic control unit by sgiehl · Pull Request #9669 · openhab/openhab-addons · GitHub

Hi Christoph, your Binding works perfectly. Thanks for your great work!

1 Like

Hi,

sgiehl how can I get the compiled addon file for the stable version of openHAB3 of your new binding for testing?

best regards René

Guess it can be downloaded from the build artifact server here: JFrog

Btw. Which kind of heat pump do you have? I’m only able to test with a heat pump that has capabilites for heating and hot water. I’m not able to say if everything works proper for heat pumps with capabilities for cooling, ventilation or swimming pool.

Hi,

I also own an Siemens Novelan LIC10e. So the same as in your case. Thanks for the download location. Do you have an description for the text based setup?

best regards René

For the thing itself, it’s somthing like

Thing luxtronikheatpump:heatpump:heatpumpid   "Wärmepumpe"  @  "Technik" [
    ipAddress="192.168.178.23",
    port="8889",
    refresh="300"
]

If you want to see all channels, and not only those that are detected as available you can add showAllChannels="true" to the thing config.

A list of all channels that might be available can be found in the readme: openhab-addons/README.md at 626a486cd05b15acb2b597032b5dfcb259f58319 · openhab/openhab-addons · GitHub

Perfect thanks,

looks good I am connected ;-). Do you also have the plan to add the states and mode control from the old binding?
:

String HeatPump_State   "Status [%s]"   <temperature> (gHeatpump) { novelanheatpump="state" }
String HeatPump_Erweiterter_Status       "Siemens LIC 10E [%s]"            <temperature>                      { channel="extended_state" }
Number HeatPump_heating_operation_mode   "Heizung Betriebsart"             <betriebsart>                      { channel="heating_operation_mode" }
Number HeatPump_heating_temperature      "Heizung Temperatur [%.1f °C]"    <temperature>                      { channel="heating_temperature" }
Number HeatPump_warmwater_operation_mode "Warmwasser Betriebsart"          <betriebsart>                      { channel="warmwater_operation_mode" }
Number HeatPump_warmwater_temperature    "Warmwasser Temperatur [%.1f °C]" <temperature>                      { channel="warmwater_temperature" }

best regards René

The state is currently split up into multiple channels as the heatpump serves it that way. See the channels HauptMenuStatus_Zeile1, HauptMenuStatus_Zeile2, HauptMenuStatus_Zeile3 and HauptMenuStatus_Zeit

The other ones should be available already. The list of channels is spillted into read-only and writable. The second part should also contain operation modes and temperatures

Thanks for the explaination. In OH3 the number item is translated to the actual status string. But how do I get this as string? As I need to forward the string information to the CometVisu UI?

best regards René

Didn’t find a way for that yet either. Not sure if that is (already) possible as it is only defined in the channel definitions.
Maybe someone else has an idea for that.
If it’s not directly possible I might add additional channels that hold the (translated) text version.

Thanks that would make it much easier without external translation for ohter UIs. That would be great. Thanks again for your effort as the binding is already wonderful.

Best regards René