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

[ISM8] New binding for Wolf heating systems using an ISM8 interface #6336

Merged
merged 19 commits into from
Sep 19, 2020

Conversation

Hans-Reiner
Copy link

[ISM8] Initial contribution

I was looking into the available options to integrate my heating system into OpenHab. As I didn't want to place own hardware modifications or 3rd party interfaces into my heating system, I decided to create a binding communicating with the original Wolf interface. The ISM8 interface sends a set of parameters and values to a partner using standard TCP/IP protocols.

With this binding, you are able to integrate your Wolf heating system. This allows you to check the temperature values as well as changing set points.

As this is my first new binding as well as I'm usually not working with Java, I'd like to ask you to contribute as well in the development of this binding if this is in any interest..

@Hans-Reiner Hans-Reiner requested a review from a team as a code owner November 3, 2019 13:37
@TravisBuddy
Copy link

TravisBuddy commented Nov 3, 2019

Travis tests were successful

Hey @Hans-Reiner,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@TravisBuddy
Copy link

Travis tests were successful

Hey @Hans-Reiner,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@Hans-Reiner Hans-Reiner changed the title New binding for Wolf heating systems using an ISM8 interface [ISM8] New binding for Wolf heating systems using an ISM8 interface Nov 3, 2019
@Hilbrand Hilbrand added the new binding If someone has started to work on a binding. For a new binding PR. label Nov 3, 2019
@cpmeister cpmeister changed the base branch from master to 2.5.x March 21, 2020 01:51
Copy link
Contributor

@cpmeister cpmeister left a comment

Choose a reason for hiding this comment

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

Before I get too far in the review I just want you to look at openhab's coding guidelines and make sure that you adhere to those guidelines as much as possible.
There are several places that you are going against the guidelines for logging levels and the naming guidelines.
You should avoid catching Exceptions and instead should catch specific exceptions.
Also if you can please format the code such that you minimize nested indentations.

Once you have addressed as much as you can please ping me for a review again.

Comment on lines 76 to 68
} catch (Exception e) {
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What are you expecting to catch here?

Copy link
Author

Choose a reason for hiding this comment

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

Basically nothing, but Eclipse initially requested this in order to build it successfully. I could solve this by reviewing the Exception handling as previously were a lot of methods decorated by the ‘throws Exception’ statement. I removed them at all possible methods and only a few had to stay.

Comment on lines 31 to 35
private int __Id;
private String __KnxDataType = new String();
private String __Description = new String();
private T __Value;
private String __Unit = new String();
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make sure that all field and variable names are camelcase.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, instead of new String() just use an empty string ""

Copy link
Author

Choose a reason for hiding this comment

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

Done

logger.debug("Ism8: Channel Link {}", channelUID.getId());
}

@SuppressWarnings("null")
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove all warning suppressions from your code

Copy link
Author

Choose a reason for hiding this comment

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

I removed the suppressions, but received afterwards a few warnings in Eclipse. There were null-checks in an IF statement, but I could only solve it by copying the object reference in a local variable. Please let me know if this is the right way (e.g. Ism8Handler.java line 61, 69, 78).

@TravisBuddy
Copy link

Travis tests were successful

Hey @Hans-Reiner,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

1 similar comment
@TravisBuddy
Copy link

Travis tests were successful

Hey @Hans-Reiner,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@Hilbrand
Copy link
Member

Can you fix the conflict and CODEOWNERS today (19 September 2020)? So it can be shipped with 2.5.9. 2.5.9 is planned for 20 September.

Hans-Reiner and others added 18 commits September 19, 2020 17:19
ISM8 Binding added

Signed-off-by: Hans-Reiner <57272516+Hans-Reiner@users.noreply.github.com>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
…changes

Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
… the UI. Removed write-blocking for read-only parameter.

Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
@Hans-Reiner
Copy link
Author

I hope the merge was executed correctly. After the --rebase I was using git rebase --continue and checking the files after each step. Finally it was resulting back in having the latest files of the binding and there was only 2 files left to be checked in. Surprisingly now are all steps/commits listed above again. Please let me know if this was correct or what to do if not. I created manually a copy to be sure to not loose any file.

bundles/pom.xml Outdated Show resolved Hide resolved
Copy link
Member

@Hilbrand Hilbrand left a comment

Choose a reason for hiding this comment

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

LGTM. rebase went well. There was a indentation in the bundle pom, but I applied the fix so that should work. The build should work now.

Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
@Hans-Reiner
Copy link
Author

Hilbrand, Fabian, many thanks for your great support, hints and to be so patient. This was my first code in Java and in contributing in an open source project. Very much appreciated.
As it looks that the code is accepted could you shortly give me a hint if there anything more I need to do now or basically what will happen next. Will this directly become part of the master?

@fwolter
Copy link
Member

fwolter commented Sep 19, 2020

Good job! As two maintainers approved your code, it's ready to merge in general. When Travis and Jenkins have built the code sucessfully, your PR will be merged into the 2.5.x branch. That means your binding will be released with openHAB 2.5.9 tomorrow as part of the official openHAB distro.

@kaikreuzer
Copy link
Member

Travis and Jenkins are both happy! 👍

@kaikreuzer kaikreuzer merged commit ee6537c into openhab:2.5.x Sep 19, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Oct 8, 2020
…penhab#6336)

Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cre Coordinated Review Effort 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.

6 participants