Skip to content

Comments

[modbus.lambda] Initial contribution#18330

Closed
chilobo wants to merge 20 commits intoopenhab:mainfrom
chilobo:modbus-lambda-heatpump
Closed

[modbus.lambda] Initial contribution#18330
chilobo wants to merge 20 commits intoopenhab:mainfrom
chilobo:modbus-lambda-heatpump

Conversation

@chilobo
Copy link
Contributor

@chilobo chilobo commented Feb 26, 2025

Based on the Stiebel Eltron bundle by Paul Frank I contribute a bundle to manage Lambda Heat Pumps as a OSG addon to the Modbus Binding.

I did some testing by adding my jar to the local addon directory.
@agio tested it with two instances of heating circuits - thank you!

See the README.md for restrictions on usage.

The binding is based on the Modbus description of the manufacturer:
(https://lambda-wp.at/wp-content/uploads/2024/11/Modbus-Protokoll-und-Beschreibung.pdf)
A few parts of the description are not implemented. If you feel you need them, just open a request.

Compressed directory:
org.openhab.binding.modbus.lambda.zip

Edit: Supersedes: #18248

@chilobo chilobo requested a review from a team as a code owner February 26, 2025 20:51
@lsiepel lsiepel changed the title Add lambda heat pump based on modbus binding [modbus.lambda] Initial contribution Feb 26, 2025
@lsiepel lsiepel added the new binding If someone has started to work on a binding. For a new binding PR. label Feb 26, 2025
@chilobo chilobo force-pushed the modbus-lambda-heatpump branch 3 times, most recently from 710158b to d6872b1 Compare February 28, 2025 11:54
@chilobo
Copy link
Contributor Author

chilobo commented Feb 28, 2025

I resolved the git problems with the help of a friend and cleaned the copyright comments.
@isiepel: Could you look at it and - if possible - merge it?

@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/lambda-heat-pump-in-openhab/156799/37

@chilobo
Copy link
Contributor Author

chilobo commented Mar 20, 2025

I am not sure why nobody looks at this pull request.
Is anything missing?

@lsiepel
Copy link
Contributor

lsiepel commented Mar 20, 2025

I am not sure why nobody looks at this pull request. Is anything missing?

Sorry to keep you waiting. I'm a bit busy at the moment and currently finishing some other large PR's. Once they are done im happy to review this. To other reviewerss, don't wait for me.

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.

Thanks for this contribution. Left many similar comments. Please check the thing and channel labels. Please apply the suggestions for the handler also to the other handlers as i have not looked into the last 5 files (handlers). I need 1 more pass to complete the review and probably one more after all suggestions have been resolved.

Don;t forget to also run the i18n plugin after updating the labels.

The binding should also be added to the bom/openhab-addons/pom.xml and
features\openhab-addons\src\main\feature\feature.xml and
features\openhab-addons\src\main\resources\footer.xml

@chilobo
Copy link
Contributor Author

chilobo commented Apr 1, 2025

Thanks for this contribution. Left many similar comments. Please check the thing and channel labels. Please apply the suggestions for the handler also to the other handlers as i have not looked into the last 5 files (handlers). I need 1 more pass to complete the review and probably one more after all suggestions have been resolved.

I did the changes which I market resolved locally and will push them after completing all changes.

Don;t forget to also run the i18n plugin after updating the labels.

I did a
mvn i18n:generate-default-translations
Is that OK?

The binding should also be added to the bom/openhab-addons/pom.xml and features\openhab-addons\src\main\feature\feature.xml

This subdirectory ...\feature\ does not show up in my local copy.

and features\openhab-addons\src\main\resources\footer.xml

This shows up, I added lambda.

@chilobo chilobo force-pushed the modbus-lambda-heatpump branch from d6872b1 to 518c534 Compare April 1, 2025 13:04
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.

Had these pending comments. Will not another pass to be sure i have everything, as it has been a while, sorry i lost track of this PR.
Let's try to get this in oh5

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.

Some specific comment that can be applied to all things / groups / channels etc. We first need to get this sorted before i can look into the handlers.

Edit: Only thing i'm not sure about is wether all type id's should be prefixed with 'lambda' as these subbindings somehow share parts of the definitions. @jlaur or @lolodomo can you give me some guidance on this?

xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">

<channel-type id="boiler-error-number-type">
Copy link
Contributor

Choose a reason for hiding this comment

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

both prefix boiler- and suffix -type can be removed, applies to all channel types.

<supported-bridge-type-refs>
<bridge-type-ref id="tcp"/>
</supported-bridge-type-refs>
<label>Lambda General Group</label>
Copy link
Contributor

Choose a reason for hiding this comment

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

Marked as resolved, but i don't see it changed. Did you push your changes?

@chilobo chilobo force-pushed the modbus-lambda-heatpump branch from 518c534 to dbebfd9 Compare May 29, 2025 17:55
@lsiepel
Copy link
Contributor

lsiepel commented May 29, 2025

In extend to the previous review round:
Looking at the thing-type.xml files i notied all things haev just one channel group added and that group is not re-used.
Why is this group used? It can be just a plain set of channels per thing. No need to add it in groups. This can be simplified.

@chilobo chilobo force-pushed the modbus-lambda-heatpump branch from dbebfd9 to ef6a3cf Compare May 29, 2025 19:36
@chilobo
Copy link
Contributor Author

chilobo commented May 29, 2025

In extend to the previous review round: Looking at the thing-type.xml files i notied all things have just one channel group added and that group is not re-used. Why is this group used? It can be just a plain set of channels per thing. No need to add it in groups. This can be simplified.

I have to look into this.
I guess I can use the templates in
openhab-addons\bundles\org.openhab.binding.modbus.sunspec\src\main\resources\OH-INF\thing*.xml ???
It seems, that sunspec uses groups and channel-types too.

Do you have an example of a binding with several things and the suggested simplified code?
And are you sure that this doesn't cause problems because a user could have different heating circuits (with indexes 0, 1, ..)?

After getting a compiling working version it might be possible:

  • to simplify the thing-names (lambda-boiler .--> boiler)
  • but not to simplify the channel-names because lambda uses the same names in different sections. In openhab it seems random which channel name appears in which thing. So I will revert this and keep working with boiler-operating-state and so on.

@chilobo chilobo force-pushed the modbus-lambda-heatpump branch from ef6a3cf to 1659d92 Compare May 29, 2025 19:53
Signed-off-by: Christian Koch <christian@koch-bensheim.de>
Signed-off-by: Christian Koch <78686276+chilobo@users.noreply.github.com>
@chilobo chilobo force-pushed the modbus-lambda-heatpump branch from 1659d92 to b08963f Compare June 5, 2025 12:56
@chilobo
Copy link
Contributor Author

chilobo commented Jun 5, 2025

@isiepel: No need to ask @jlaur or @lolodomo because I resolved this.
I seem to have a version which takes care of the mentioned problems.
Please review again...
Thank you!

chilobo added 3 commits June 9, 2025 11:34
Signed-off-by: Christian Koch <christian@koch-bensheim.de>
Signed-off-by: Christian Koch <78686276+chilobo@users.noreply.github.com>
@chilobo chilobo force-pushed the modbus-lambda-heatpump branch from b08963f to b4a9771 Compare June 13, 2025 21:19
@chilobo chilobo force-pushed the modbus-lambda-heatpump branch from f677f9d to 6b30f45 Compare July 27, 2025 10:27
chilobo and others added 7 commits July 27, 2025 13:41
Signed-off-by: Christian Koch <christian@koch-bensheim.de>
Signed-off-by: Christian Koch <78686276+chilobo@users.noreply.github.com>
Signed-off-by: Christian Koch <christian@koch-bensheim.de>
Signed-off-by: Christian Koch <78686276+chilobo@users.noreply.github.com>
Signed-off-by: lsiepel <leosiepel@gmail.com>
@lsiepel
Copy link
Contributor

lsiepel commented Jul 27, 2025

I solved the conflict in footer.xml. It might need a spotless.

@chilobo
Copy link
Contributor Author

chilobo commented Jul 27, 2025

I read some stuff about the first step:

  1. Update your main branch from the openHAB main branch.
    and tried to work with github desktop after closing vsview.
    I did a rebase current branch ..
    and chose to use the file from my local version (?).

@chilobo
Copy link
Contributor Author

chilobo commented Jul 27, 2025

Then I tried to follow:
https://gist.github.com/whoisryosuke/36b3b41e738394170b9a7c230665e6b9
but
git checkout master
in the terminal produced
error: pathspec 'master' did not match any file(s) known to git

So I did a
git checkout main
and all my files disappeared in vsview.
Then I did a
git checkout -b modbus-lambda-heatpump
this gave me
fatal: a branch named 'modbus-lambda-heatpump' already exists
Now I am stuck again...
I have a local copy of the files of the last push.
My son who could help me is not available for a week.
Should we just wait until he comes back?

@lsiepel
Copy link
Contributor

lsiepel commented Jul 27, 2025

There are multiple workflows.

I prefer to do this on the web version of GitHub and later on your local clones.
if you browse to your main branch in GitHub you will see a similar notice as my screenshot but it will have a update/sync button next to it. Same for the feature branch

If you directly update your local you will

@chilobo
Copy link
Contributor Author

chilobo commented Jul 27, 2025

Your comment 2 hrs ago ended abruptly.
I used some of the commands we used to solve the problem with the signoffs some months ago. Could be this (and your change to footers.xml) resolved the git problems. Compiling with 5.1.0 went through, I comitted and pushed. Let's see if it works....

@lsiepel
Copy link
Contributor

lsiepel commented Jul 27, 2025

Cool. I see all your branches are up-to-date now.
Not sure what happened to my post, Atleast you got it sorted. Let’s finish this.

the build fails probably due to some other pom issue

…penhab-addons into modbus-lambda-heatpump

Changes in pom to 5.1.0

Signed-off-by: Christian Koch <78686276+chilobo@users.noreply.github.com>
@chilobo chilobo force-pushed the modbus-lambda-heatpump branch from 04bcfc6 to bdee2a2 Compare July 27, 2025 17:01
@chilobo
Copy link
Contributor Author

chilobo commented Jul 27, 2025

Let's see - I forgot to stage the change in pom.xml to 5.1.0

@lsiepel lsiepel requested a review from Copilot August 12, 2025 19:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new Lambda Heat Pump binding for the OpenHAB modbus ecosystem, providing comprehensive integration for Lambda heat pump systems. The binding enables monitoring and control of various heat pump components including the main heat pump unit, heating circuits, buffers, boilers, solar components, and general system information through Modbus TCP/IP communication.

  • Adds complete Lambda heat pump binding with support for multiple system components (heat pump, heating circuits, buffers, boilers, solar, general ambient/e-manager)
  • Implements modbus parsers and handlers for reading/writing heat pump data with proper scaling and unit conversion
  • Provides comprehensive channel definitions and internationalization support for all components

Reviewed Changes

Copilot reviewed 54 out of 55 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
features/openhab-addons/src/main/resources/footer.xml Adds lambda binding to feature bundle list
bundles/pom.xml Includes lambda modbus binding module in build
bundles/org.openhab.binding.modbus.lambda/src/main/resources/OH-INF/thing/*.xml Defines thing types, channels, and configurations for all heat pump components
bundles/org.openhab.binding.modbus.lambda/src/main/resources/OH-INF/i18n/*.properties Provides internationalization strings for UI labels and descriptions
bundles/org.openhab.binding.modbus.lambda/src/main/resources/OH-INF/addon/addon.xml Defines addon metadata and description
bundles/org.openhab.binding.modbus.lambda/src/main/java/org/openhab/binding/modbus/lambda/internal/parser/*.java Implements modbus data parsers for converting register data to structured blocks
bundles/org.openhab.binding.modbus.lambda/src/main/java/org/openhab/binding/modbus/lambda/internal/handler/*.java Implements thing handlers for managing communication and channel updates

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

Thank you for previously fixing the comments. I have now covered the remaining files and some additional ones to the copilot comments.

I think this iwll be the last review round before we can merge this binding

@chilobo
Copy link
Contributor Author

chilobo commented Aug 13, 2025

Thanks for the suggestions. It will take three weeks to fix the code because I 'm absent.

Signed-off-by: Christian Koch <christian@koch-bensheim.de>
Signed-off-by: Christian Koch <78686276+chilobo@users.noreply.github.com>
Signed-off-by: Christian Koch <christian@koch-bensheim.de>
Signed-off-by: Christian Koch <78686276+chilobo@users.noreply.github.com>
…penhab-addons into modbus-lambda-heatpump

Added changes requested by isiepel and Copilot

Signed-off-by: Christian Koch <christian@koch-bensheim.de>
@chilobo
Copy link
Contributor Author

chilobo commented Sep 2, 2025

I added the corrections suggested by Copilot and Isiepel. Hopefully I didn't mess up with github, the tree looks interesting from a topoligical standpoint ;)

tatus Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

It is still there. It is in the root of the project at the same level as the CODEOWNERS file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, didn't look that high up in the directory structure.

Copy link
Contributor

Choose a reason for hiding this comment

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

The file is still there....

Signed-off-by: Christian Koch <78686276+chilobo@users.noreply.github.com>
@chilobo
Copy link
Contributor Author

chilobo commented Sep 23, 2025

I've integrated all changes into a new branch and new PR #19378 as this branch was too much out of date and signoffs weren't easily possible, please review that PR.

@chilobo chilobo closed this Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants