-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Conversation
Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com>
Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com>
Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com>
There was a problem hiding this 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.
...binding.dominoswiss/src/main/java/org/openhab/binding/dominoswiss/internal/EGateHandler.java
Outdated
Show resolved
Hide resolved
localSocket.connect(new InetSocketAddress(host, port)); | ||
localSocket.setSoTimeout(SOCKET_TIMEOUT_SEC); | ||
BufferedWriter localWriter = writer; | ||
localWriter = new BufferedWriter(new OutputStreamWriter(localSocket.getOutputStream())); |
There was a problem hiding this comment.
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:
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().
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 <frieso.aeschbacher@gmail.com>
Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com>
419e978
to
6edcb5d
Compare
Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com>
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
There was a problem hiding this 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
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 |
* Added Dominoswiss to CODEOWNERS and POMs Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Intitial contribution of Dominoswiss Binding Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Typo in pom.xml Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed inputs from fwolter Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed inputs from fwolter Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed localWriter Issue Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Update bom/openhab-addons/pom.xml Signed-off-by: Fabian Wolter <github@fabian-wolter.de> Co-authored-by: Fabian Wolter <github@fabian-wolter.de> Signed-off-by: Nick Waterton <n.waterton@outlook.com>
* Added Dominoswiss to CODEOWNERS and POMs Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Intitial contribution of Dominoswiss Binding Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Typo in pom.xml Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed inputs from fwolter Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed inputs from fwolter Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed localWriter Issue Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Update bom/openhab-addons/pom.xml Signed-off-by: Fabian Wolter <github@fabian-wolter.de> Co-authored-by: Fabian Wolter <github@fabian-wolter.de> Signed-off-by: Michael Schmidt <mi.schmidt.83@gmail.com>
* Added Dominoswiss to CODEOWNERS and POMs Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Intitial contribution of Dominoswiss Binding Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Typo in pom.xml Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed inputs from fwolter Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed inputs from fwolter Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed localWriter Issue Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Update bom/openhab-addons/pom.xml Signed-off-by: Fabian Wolter <github@fabian-wolter.de> Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
* Added Dominoswiss to CODEOWNERS and POMs Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Intitial contribution of Dominoswiss Binding Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Typo in pom.xml Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed inputs from fwolter Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed inputs from fwolter Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed localWriter Issue Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Update bom/openhab-addons/pom.xml Signed-off-by: Fabian Wolter <github@fabian-wolter.de> Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
* Added Dominoswiss to CODEOWNERS and POMs Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Intitial contribution of Dominoswiss Binding Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Typo in pom.xml Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed inputs from fwolter Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed inputs from fwolter Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed localWriter Issue Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Update bom/openhab-addons/pom.xml Signed-off-by: Fabian Wolter <github@fabian-wolter.de> Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
* Added Dominoswiss to CODEOWNERS and POMs Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Intitial contribution of Dominoswiss Binding Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Typo in pom.xml Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed inputs from fwolter Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed inputs from fwolter Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Fixed localWriter Issue Signed-off-by: Frieso Aeschbacher <frieso.aeschbacher@gmail.com> * Update bom/openhab-addons/pom.xml Signed-off-by: Fabian Wolter <github@fabian-wolter.de> Co-authored-by: Fabian Wolter <github@fabian-wolter.de> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
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