-
-
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
[Qbus] Initial contribution #9191
Conversation
The link to "Manual openHAB - Qbus" leads to a RPI page. What is the reason for keeping the "core" of this binding in a separate repository? |
The first page of the manual indeed shows a rpi, as an example of a device capable of runnin openHAB and the Qbus client/server. The reason for the seperated core is that this core excistetd before i knew about openHAB and was the only way to communicate to the Qbus system. The protocol of the TCP communication with Qbus is a closed protocol for security reasons. Therefore a C# DLL was created to give people with knowledge of using the DLL the possibility to communicate with Qbus. So, that's why i decided to use the 'core' as a bridge between Qbus and openHAB. |
Just to get an idea. Is the client/server application used in other projects? Are there other maintainers than you? |
The client/server will be used in other projects, but for the moment only in openHAB, and i'm the only maintainer (for the moment - don't know what the future will bring ;-)). Maybe it is usefull for you to know that i'm an employee of Qbus. I started on the support departement, but with my earlier expieriences in programming and system integration if spend more time in that section. I started experminting to make our system more open. |
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.
IMHO, your client/server/mono approach is good to go, as the alternative would be to re-implement the DLLs.
I reviewed 6 of 30 files, that you get an impression what needs to be done.
There are some checkstyle warnings left. You could take a look at target/code-analysis/report.html
.
EDIT: Please add yourself to the CODEOWNERS file.
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
@fwolter Thanks for reviewing my binding! |
I will have a look into it soon. This PR will be used for all further review loops concerning this code, so please don't close it. You need to sign-off all your commits. The necessary commands are listed when you click on "Details" at the DCO check below. |
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.
Here is the review feedback for the readme and the first few code files.
There are some checkstyle warnings left. You could take a look at target/code-analysis/report.html
.
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
@fwolter Thanks for reviewing my binding again! |
Can you please click on "Resolve conversation" on those you fixed? The DCO check failed. You need to sign-off your commits. See https://www.openhab.org/docs/developer/contributing.html#sign-your-work The necessary commands are listed when you click on "Details" at the DCO check below. |
@fwolter Many Thanks! |
Signed-off-by: Koen Schockaert <[email protected]> Signed-off-by: QbusKoen <[email protected]>
This reverts commit da86aae. Signed-off-by: QbusKoen <[email protected]>
Signed-off-by: QbusKoen <[email protected]>
Had some issues in first commit. Fixed the bugs. Signed-off-by: QbusKoen <[email protected]>
Solved issues reported by fwolter and changed a lot of code, based on the comments. Signed-off-by: QbusKoen <[email protected]> modified: CODEOWNERS Signed-off-by: QbusKoen <[email protected]>
Signed-off-by: QbusKoen <[email protected]>
Signed-off-by: QbusKoen <[email protected]>
Signed-off-by: QbusKoen <[email protected]>
Update code like requested by fwolter on 3/1/2021 Signed-off-by: QbusKoen <[email protected]>
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 are some checkstyle warnings left. You could take a look at target/code-analysis/report.html
.
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
...nding.qbus/src/main/java/org/openhab/binding/qbus/internal/handler/QbusBistabielHandler.java
Outdated
Show resolved
Hide resolved
...nding.qbus/src/main/java/org/openhab/binding/qbus/internal/handler/QbusBistabielHandler.java
Outdated
Show resolved
Hide resolved
...nding.qbus/src/main/java/org/openhab/binding/qbus/internal/handler/QbusBistabielHandler.java
Outdated
Show resolved
Hide resolved
<context>network-address</context> | ||
</parameter> | ||
<parameter name="sn" type="text" required="true"> | ||
<label>Serial nr</label> |
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.
Words in labels should be capitalized (except prepositions and so on). See https://www.openhab.org/docs/developer/bindings/thing-xml.html#formatting-labels-and-descriptions
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.
Can you work on this? Please check all.
bundles/org.openhab.binding.qbus/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.qbus/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.qbus/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.qbus/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
Please note, that your sign-off message must contain your real name. |
Updated requested changes by fwolter on 10/02/2021 Signed-off-by: Koen Schockaert <[email protected]> Signed-off-by: QbusKoen <[email protected]>
Hi @fwolter, i've updated my code with your proposals and pushed changes to git. |
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 are some checkstyle warnings left. You could take a look at target/code-analysis/report.html
.
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
...openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusHandlerFactory.java
Outdated
Show resolved
Hide resolved
....binding.qbus/src/main/java/org/openhab/binding/qbus/internal/handler/QbusDimmerHandler.java
Outdated
Show resolved
Hide resolved
....binding.qbus/src/main/java/org/openhab/binding/qbus/internal/handler/QbusDimmerHandler.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.qbus/src/main/resources/OH-INF/i18n/qbus_nl.properties
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.qbus/src/main/resources/OH-INF/i18n/qbus_nl.properties
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.qbus/src/main/resources/OH-INF/i18n/qbus_nl.properties
Outdated
Show resolved
Hide resolved
<context>network-address</context> | ||
</parameter> | ||
<parameter name="sn" type="text" required="true"> | ||
<label>Serial nr</label> |
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.
Can you work on this? Please check all.
bundles/org.openhab.binding.qbus/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
Updated requested changes by fwolter on 10/02/2021 Signed-off-by: Koen Schockaert <[email protected]> Signed-off-by: QbusKoen <[email protected]>
…o main Signed-off-by: Koen Schockaert <[email protected]>
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 single missing DCO is ok.
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
...nding.qbus/src/main/java/org/openhab/binding/qbus/internal/handler/QbusBistabielHandler.java
Outdated
Show resolved
Hide resolved
...hab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/handler/QbusRolHandler.java
Outdated
Show resolved
Hide resolved
...ding.qbus/src/main/java/org/openhab/binding/qbus/internal/handler/QbusThermostatHandler.java
Outdated
Show resolved
Hide resolved
...binding.qbus/src/main/java/org/openhab/binding/qbus/internal/protocol/QbusCommunication.java
Outdated
Show resolved
Hide resolved
...binding.qbus/src/main/java/org/openhab/binding/qbus/internal/protocol/QbusCommunication.java
Outdated
Show resolved
Hide resolved
// Delay after sending data to improve scene execution | ||
try { | ||
TimeUnit.MILLISECONDS.sleep(250); | ||
} catch (InterruptedException e) { |
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.
Can you work on this?
bundles/org.openhab.binding.qbus/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.qbus/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
Updated changes as requested by Fwolter on 24/02/2021 Signed-off-by: Koen Schockaert <[email protected]>
Hi @fwolter As usually I updated the changes you requested an pushed them. 2 warnings are left, but i'm not sure if i can do something about them: Please advice... |
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
....binding.qbus/src/main/java/org/openhab/binding/qbus/internal/handler/QbusGlobalHandler.java
Outdated
Show resolved
Hide resolved
...b.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/handler/QbusSceneHandler.java
Outdated
Show resolved
Hide resolved
|
||
try { | ||
startCommunication(); | ||
} catch (InterruptedException | IOException e) { |
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 remove the InterruptedException
from the catch clause to let it be thrown.
...binding.qbus/src/main/java/org/openhab/binding/qbus/internal/protocol/QbusCommunication.java
Outdated
Show resolved
Hide resolved
...binding.qbus/src/main/java/org/openhab/binding/qbus/internal/protocol/QbusCommunication.java
Outdated
Show resolved
Hide resolved
...binding.qbus/src/main/java/org/openhab/binding/qbus/internal/protocol/QbusCommunication.java
Outdated
Show resolved
Hide resolved
...binding.qbus/src/main/java/org/openhab/binding/qbus/internal/protocol/QbusCommunication.java
Outdated
Show resolved
Hide resolved
Updated changes reqeusted by fwolter on 25/02/2021 Signed-off-by: Koen Schockaert <[email protected]>
@fwolter |
Hi @fwolter, any news on the update yet? Should I perform further actions for this Binding? |
...hab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/handler/QbusRolHandler.java
Outdated
Show resolved
Hide resolved
...b.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/handler/QbusSceneHandler.java
Outdated
Show resolved
Hide resolved
|
||
try { | ||
startCommunication(); | ||
} catch (InterruptedException | IOException e) { |
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.
Can you work on this?
...binding.qbus/src/main/java/org/openhab/binding/qbus/internal/protocol/QbusCommunication.java
Outdated
Show resolved
Hide resolved
Updated changes as requested by fwolter on 2/3/2021 Signed-off-by: Koen Schockaert <[email protected]>
Dear @fwolter, |
....openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/QbusBridgeHandler.java
Outdated
Show resolved
Hide resolved
...g.openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/protocol/QbusCO2.java
Outdated
Show resolved
Hide resolved
...g.openhab.binding.qbus/src/main/java/org/openhab/binding/qbus/internal/protocol/QbusCO2.java
Outdated
Show resolved
Hide resolved
...binding.qbus/src/main/java/org/openhab/binding/qbus/internal/protocol/QbusCommunication.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.qbus/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.qbus/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
Updates changes as requested by FWolter on 27/03/2021 Signed-off-by: Koen Schockaert <[email protected]>
@fwolter as requested i updated the binding. |
bundles/org.openhab.binding.qbus/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
Update requested as suggested by FWolter on 28/03/2021 Signed-off-by: Koen Schockaert <[email protected]>
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 it's time to wait for another review, before this can be merged. Please don't add any new features in the meantime.
Great, thank you very much for your patience and your great advicei I really appreciete this! |
Every new addon needs to be reviewed by two openHAB addons maintainers. The |
Due to lack of review capacity, the rules for new bindings were weakened. New bindings need only the approval of one reviewer instead of two from now on. |
I think this PR broke the website build, since it attempts to load a huge logo file in a doc folder. Maybe the codeowner can remove this jpg from the readme (and repo) and provide a smaller (not 3500 x 2400 px please) logo picture as a pull request on the openHAB docs repository. Here is an example of how to add a logo to the documentation properly: The file must be named like the bundle name. "qbus" in this case. |
Signed-off-by: Koen Schockaert <[email protected]> Signed-off-by: John Marshall <[email protected]>
Signed-off-by: Koen Schockaert <[email protected]>
Signed-off-by: Koen Schockaert <[email protected]>
Signed-off-by: Koen Schockaert <[email protected]>
Thist is te initial contribution for the Qbus binding. This binding has been tested already by multiple users. Especially for openHAB2 an by some people for openHAB(3). The support for this binding was done on the Qbus forum.
This binding does not communicate directly to the home automation controller, but indirectly by a Client/Server application more info can be found here: https://github.com/QbusKoen/QbusClientServer.
We also made an online user guide, explaining the client/server and the basic principles of openHAB on Manual openHAB - Qbus
The JAR file for testing can be found here: https://github.com/QbusKoen/QbusOH3-JAR
Signed-off-by: Koen Schockaert [email protected]