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

[dominoswiss] Initial contribution #11585

Merged
merged 7 commits into from
Dec 11, 2021
Merged

Conversation

Friesoch
Copy link
Contributor

Added new Binding "org.openhab.binding.dominoswiss" for a first initial commit of this binding

[dominoswiss][WIP] initial contribution

added new binding org.openhab.binding.dominoswiss for initial commit
This binding allows the controll of rollershutters, using an egate as gateway and dominoswiss radio receivers. The egate-gateway is connectet via ethernet to openhab and sends it's commands via radio to all rollershutters.

Announcement: https://community.openhab.org/t/announce-dominoswiss-binding/76503
Replaces Pull-Request #9837

Jar-File for Testing:
https://github.com/Friesoch/org.openhab.binding.dominoswiss

@Friesoch Friesoch requested a review from a team as a code owner November 14, 2021 08:00
@Friesoch
Copy link
Contributor Author

@fwolter here is the new Pull Request replacing the corrupted #9837

@wborn wborn added the new binding If someone has started to work on a binding. For a new binding PR. label Nov 14, 2021
bom/openhab-addons/pom.xml Outdated Show resolved Hide resolved
Signed-off-by: Frieso Aeschbacher <[email protected]>
Copy link
Member

@fwolter fwolter left a comment

Choose a reason for hiding this comment

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

There's one checkstyle warning left.

localSocket.connect(new InetSocketAddress(host, port));
localSocket.setSoTimeout(SOCKET_TIMEOUT_SEC);
BufferedWriter localWriter = writer;
localWriter = new BufferedWriter(new OutputStreamWriter(localSocket.getOutputStream()));
Copy link
Member

Choose a reason for hiding this comment

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

You need to close the BufferedWriter. You could use the auto-close feature:

Suggested change
localWriter = new BufferedWriter(new OutputStreamWriter(localSocket.getOutputStream()));
try(localWriter = new BufferedWriter(new OutputStreamWriter(localSocket.getOutputStream()))) {

If I see correctly, you create new BufferedWriter/OutputStreamWriter each poll. Why not create one when connecting and close it in dispose() or disconnect? Then, you can also re-use it in sendCommand().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I close the BufferedWriter. The redesign will be made with a later release, thanks for that hint.

Copy link
Member

Choose a reason for hiding this comment

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

The BufferedWriter is assigned to the local variable localWriter, but this variable is out of scope if the method pollingConfig is left. So, the BufferedWrite is never closed and you will end up with a resource leak.

As said, the assignment BufferedWriter localWriter = writer; has no effect.

Signed-off-by: Frieso Aeschbacher <[email protected]>
Signed-off-by: Frieso Aeschbacher <[email protected]>
Signed-off-by: Frieso Aeschbacher <[email protected]>
bom/openhab-addons/pom.xml Outdated Show resolved Hide resolved
Copy link
Member

@fwolter fwolter left a comment

Choose a reason for hiding this comment

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

LGTM

Now, you could add your binding's logo to the openHAB website. See https://www.openhab.org/docs/developer/bindings/#add-your-binding-s-logo-to-the-openhab-website

@fwolter fwolter merged commit 15b83cc into openhab:main Dec 11, 2021
@fwolter fwolter added this to the 3.2 milestone Dec 11, 2021
@Friesoch
Copy link
Contributor Author

LGTM

Now, you could add your binding's logo to the openHAB website. See https://www.openhab.org/docs/developer/bindings/#add-your-binding-s-logo-to-the-openhab-website

Dear @fwolter thanks a lot for your support and your input to bring the binding to the desired quality level :) A big thank you and cheers

NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this pull request Dec 30, 2021
* Added Dominoswiss to CODEOWNERS and POMs

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Intitial contribution of Dominoswiss Binding

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Typo in pom.xml

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed inputs from fwolter

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed inputs from fwolter

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed localWriter Issue

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Update bom/openhab-addons/pom.xml

Signed-off-by: Fabian Wolter <[email protected]>

Co-authored-by: Fabian Wolter <[email protected]>
Signed-off-by: Nick Waterton <[email protected]>
mischmidt83 pushed a commit to mischmidt83/openhab-addons that referenced this pull request Jan 9, 2022
* Added Dominoswiss to CODEOWNERS and POMs

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Intitial contribution of Dominoswiss Binding

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Typo in pom.xml

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed inputs from fwolter

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed inputs from fwolter

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed localWriter Issue

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Update bom/openhab-addons/pom.xml

Signed-off-by: Fabian Wolter <[email protected]>

Co-authored-by: Fabian Wolter <[email protected]>
Signed-off-by: Michael Schmidt <[email protected]>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Jan 28, 2022
* Added Dominoswiss to CODEOWNERS and POMs

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Intitial contribution of Dominoswiss Binding

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Typo in pom.xml

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed inputs from fwolter

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed inputs from fwolter

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed localWriter Issue

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Update bom/openhab-addons/pom.xml

Signed-off-by: Fabian Wolter <[email protected]>

Co-authored-by: Fabian Wolter <[email protected]>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
* Added Dominoswiss to CODEOWNERS and POMs

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Intitial contribution of Dominoswiss Binding

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Typo in pom.xml

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed inputs from fwolter

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed inputs from fwolter

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed localWriter Issue

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Update bom/openhab-addons/pom.xml

Signed-off-by: Fabian Wolter <[email protected]>

Co-authored-by: Fabian Wolter <[email protected]>
andan67 pushed a commit to andan67/openhab-addons that referenced this pull request Nov 6, 2022
* Added Dominoswiss to CODEOWNERS and POMs

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Intitial contribution of Dominoswiss Binding

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Typo in pom.xml

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed inputs from fwolter

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed inputs from fwolter

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed localWriter Issue

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Update bom/openhab-addons/pom.xml

Signed-off-by: Fabian Wolter <[email protected]>

Co-authored-by: Fabian Wolter <[email protected]>
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Nov 12, 2022
* Added Dominoswiss to CODEOWNERS and POMs

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Intitial contribution of Dominoswiss Binding

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Typo in pom.xml

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed inputs from fwolter

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed inputs from fwolter

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Fixed localWriter Issue

Signed-off-by: Frieso Aeschbacher <[email protected]>

* Update bom/openhab-addons/pom.xml

Signed-off-by: Fabian Wolter <[email protected]>

Co-authored-by: Fabian Wolter <[email protected]>
Signed-off-by: Andras Uhrin <[email protected]>
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