Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[kermi] Initial contribution #16329

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

[kermi] Initial contribution #16329

wants to merge 16 commits into from

Conversation

KaaNee
Copy link

@KaaNee KaaNee commented Jan 26, 2024

New Binding for Kermi Heat Pumps

Similar implementation like modbus e3dc binding, this is a simple modbus binding for kermi heat pumps with modbus-tcp connection activated.

It's an easier integration for a kermi heat pump, preventing creating modbus-things and items manually, which is some really annoying click-work and confusing with bridges, pollers, data-things and items for each single value.

Just create a Modbus TCP-Bridge, create a kermi x-center thing attached to this modbus-bridge and you're fine. Finally adding items to the desired channels.

OH community-thread: https://community.openhab.org/t/kermi-modbus-binding/153385?u=kane

@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/kermi-modbus-binding/153385/1

@lolodomo lolodomo added the new binding If someone has started to work on a binding. For a new binding PR. label Jan 27, 2024
@lolodomo
Copy link
Contributor

What's the difference with #15687 ?

@KaaNee
Copy link
Author

KaaNee commented Jan 27, 2024

@lolodomo This is a modbus binding and works without any authentication, the other type of binding is different. it uses an api endpoint, which i don't know that it may exist. But from my talks with kermi (manufacturer) the only way to get all the specific data is a modbus interface.
I could not find the specific Parameters of the heatpump in the other binding.
and: damit, i didn't find the other binding before.

By the way i contacted col-panic for exchange our knowledge, but currently i think both bindings are useful, maybe they work on different models.

@col-panic
Copy link

@lolodomo This is a modbus binding and works without any authentication, the other type of binding is different. it uses an api endpoint, which i don't know that it may exist. But from my talks with kermi (manufacturer) the only way to get all the specific data is a modbus interface. I could not find the specific Parameters of the heatpump in the other binding. and: damit, i didn't find the other binding before.

By the way i contacted col-panic for exchange our knowledge, but currently i think both bindings are useful, maybe they work on different models.

As described in my contribution, I reverse-enginered the binding by analysing the web-interface of the kermi heatpump's x-center. It is not as elegant as this solution, which by the way seems to be supported by the producer kermi - who never reacted to my mails - but it does not require a modbus binding. (I don't know modbus enough - that is, i only know the 2-wire modbus connections where you have to have special hardware, with my binding you don't need this).

Still, as this seems to be in some way supported by the producer, I'd be in favor of this binding!

@KaaNee
Copy link
Author

KaaNee commented Jan 29, 2024

@col-panic Hi, thanks for your participation to explain the difference.

So #15687 is a binding, which connects to the WebBackend in the cloud, which is normally used by the kermi-(mobile)-app.

This binding is for non-cloud / local access to the current values, it works with modbus TCP, so only local network access is requiered. For other (older) versions of the heatpump, additional hardware (converter from modbus RTU to modbus TCP) may be needed, which uses to connect by 2-wire-connection.
I described this in the readme of this binding.

@col-panic
Copy link

@col-panic Hi, thanks for your participation to explain the difference.

So #15687 is a binding, which connects to the WebBackend in the cloud, which is normally used by the kermi-(mobile)-app.

This binding is for non-cloud / local access to the current values, it works with modbus TCP, so only local network access is requiered. For other (older) versions of the heatpump, additional hardware (converter from modbus RTU to modbus TCP) may be needed, which uses to connect by 2-wire-connection. I described this in the readme of this binding.

No, not in the cloud! I use it to directly connect to the x-center in my local network!

@KaaNee KaaNee marked this pull request as ready for review February 12, 2024 18:47
@KaaNee KaaNee requested a review from a team as a code owner February 12, 2024 18:47
@lsiepel
Copy link
Contributor

lsiepel commented Feb 19, 2024

We should prevent two bindings that have a very high overlap. Could we somehow intetgrate both binding proposals into one?
If i understand correctly both PR's have some sort of the same channels / functionality, and connect to the same x-center device. Only difference is the connection by modbus vs webapi?

What would be the best way of moving this forward @KaaNee and @col-panic ?

@col-panic
Copy link

This binding seems to be definitely the better one, as there seems to be at least some support by the manufacturer! I don't think that the code I have written can contribute anything to the functionality implemented in this PR.

It seems like @KaaNee did directly mail Kermi about opening the ModbusTCP - I will have to find out, whether this approach is feasible with my franchised version of Heizbösch. But It would be nice, if you could elaborate more on the mail exchange with Kermi. Did they enable this feature remotely?

Don't consider #15687 anymore - consider it the be virtually closed.

@lsiepel
Copy link
Contributor

lsiepel commented Feb 22, 2024

@col-panic can you perform some kind of review ? check if all the channels and use-cases that you had covered are available here. Maybe if there is a (small) gap, this can be implemented right away by @KaaNee

@KaaNee
Copy link
Author

KaaNee commented Feb 22, 2024

We should prevent two bindings that have a very high overlap. Could we somehow intetgrate both binding proposals into one? If i understand correctly both PR's have some sort of the same channels / functionality, and connect to the same x-center device. Only difference is the connection by modbus vs webapi?
What would be the best way of moving this forward @KaaNee and @col-panic ?

Hi @lsiepel. yes, you're right. both are nearly the same, having the difference in their connection.
one should be available in OH, not two.

My binding requires manual remote-settings from Kermi, which maybe can be a blocker for some users, if kermi (or similar manufacturer) isn't that supportive, maybe difficult to "force" them to add these settings in every users heating-central. The other binding from @col-panic is just working out of the box, maybe for more devices-types, we don't know.
On the other way, i think modbus is more reliable because they won't change any adresses in their products, or very unlikely that this will happen.

Long Story short: @col-panic Maybe you can publish your addon in the addon-store that your work won't be lost and used by every user which does not succeed or don't want the changes by kermi.

@col-panic can you perform some kind of review ? check if all the channels and use-cases that you had covered are available here. Maybe if there is a (small) gap, this can be implemented right away by @KaaNee
Some Settings are not implemented yet, these are just routine work to add them. I have the documentation for them.
This version is a "first cut" to have the basic and most important settings.

@col-panic If you disagree, than i could publish this on the addon-marketplace - the other way round. I'm fine with both solutions.

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First review pass. Looked at the first 20 files mainly focused on the things, channels and structure. The comments i made apply to all channels and channel types, so please also look at other occurences in the other xml files.

@KaaNee
Copy link
Author

KaaNee commented May 7, 2024

@lsiepel Thanks for your review. I corrected / improved the code. Please re-review.

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still need to look at the handler, bu don't want to hold back these comments. Most of the code looks solid. Also had a quick peek at the readme and noticed the channels need to be aligned with the thing xml files.

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran out of time, don;t want to hold back the comments so far. The last two files we have to look at, so getting closer.

@lsiepel lsiepel changed the title [kermi] Initial contribution of Modbus Kermi Binding [kermi] Initial contribution Jun 2, 2024
@lsiepel
Copy link
Contributor

lsiepel commented Sep 7, 2024

Gentle ping @KaaNee did you see the latest review comments?

@solid80
Copy link

solid80 commented Oct 15, 2024

@KaaNee I'm using this binding since a couple of weeks. It works quite well, good job. However, there are a few fixes needed. And the additional heat storage tank is a TODO but it's a quite important feature for me. I'm willing to implement myself the fixes and the new features, just let me know if it's OK for you. In addition, if there is already a new version not yet submitted, please let me have it, so that I can implement my changes on top of that.

KaaNee and others added 9 commits October 15, 2024 22:06
Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>

Update bundles/org.openhab.binding.modbus.kermi/src/main/java/org/openhab/binding/modbus/kermi/internal/dto/AlarmDTO.java

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: KaiNative <github@kaineuhaus.com>

Update bundles/org.openhab.binding.modbus.kermi/src/main/resources/OH-INF/thing/xcenter-chargingcircuit-channel-types.xml

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: KaiNative <github@kaineuhaus.com>

Update bundles/org.openhab.binding.modbus.kermi/src/main/resources/OH-INF/thing/xcenter-chargingcircuit-channel-types.xml

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: KaiNative <github@kaineuhaus.com>

Update bundles/org.openhab.binding.modbus.kermi/src/main/resources/OH-INF/thing/xcenter-power-channel-groups.xml

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: KaiNative <github@kaineuhaus.com>

Update bundles/org.openhab.binding.modbus.kermi/src/main/resources/OH-INF/thing/xcenter-energysource-channel-types.xml

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: KaiNative <github@kaineuhaus.com>

Update bundles/org.openhab.binding.modbus.kermi/src/main/resources/OH-INF/thing/xcenter-chargingcircuit-channel-types.xml

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: KaiNative <github@kaineuhaus.com>
…d code

Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
…emperatures at all), improved README.md

Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
@KaaNee
Copy link
Author

KaaNee commented Oct 15, 2024

Hi @solid80,
i hope to get some free time soon to implement the missing device (i also own a heat storage).

KaaNee and others added 6 commits October 15, 2024 23:38
Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
…nhab/binding/modbus/kermi/internal/handler/KermiXcenterThingHandler.java

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: KaiNative <github@kaineuhaus.com>
Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
Signed-off-by: Kai Neuhaus <code@kaineuhaus.com>
@KaaNee KaaNee requested a review from lsiepel October 16, 2024 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback new binding If someone has started to work on a binding. For a new binding PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants