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

[Qbus] Initial contribution #9191

Merged
merged 18 commits into from
Apr 11, 2021
Merged

[Qbus] Initial contribution #9191

merged 18 commits into from
Apr 11, 2021

Conversation

Qbus-Koen
Copy link
Contributor

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]

@Qbus-Koen Qbus-Koen requested a review from a team as a code owner December 1, 2020 10:35
@fwolter fwolter added the new binding If someone has started to work on a binding. For a new binding PR. label Dec 1, 2020
@fwolter
Copy link
Member

fwolter commented Dec 8, 2020

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?

@Qbus-Koen
Copy link
Contributor Author

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.
I created a client/server application from the DLL that allows communication by json data, which makes it easier for people with less programming experience to communicate with Qbus.

So, that's why i decided to use the 'core' as a bridge between Qbus and openHAB.

@fwolter
Copy link
Member

fwolter commented Dec 9, 2020

Just to get an idea. Is the client/server application used in other projects? Are there other maintainers than you?

@Qbus-Koen
Copy link
Contributor Author

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.
So now i'm more the IoT specialist for Qbus rather than a support engineer, although i still offer support on our forum but less for Qbus spefic questions - more for openHAB related questions.

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.

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.

@fwolter fwolter self-assigned this Dec 13, 2020
@Qbus-Koen
Copy link
Contributor Author

@fwolter Thanks for reviewing my binding!
I've updated my code with your requests and checked and changed the other files.
Pushed the changes to github.
Should I now close this pull request and create a new one?
Please advice. Thx!

@fwolter
Copy link
Member

fwolter commented Jan 3, 2021

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.

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.

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.

@Qbus-Koen
Copy link
Contributor Author

@fwolter Thanks for reviewing my binding again!
I've updated my code with your requests.
Just one thing i can't figure out. Left a comment above.

@fwolter
Copy link
Member

fwolter commented Jan 19, 2021

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.

@Qbus-Koen
Copy link
Contributor Author

@fwolter
It took me some time to make the requested changes to my code, but i completed them now.
Can you check again if you find the time?

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]>
Update code like requested by fwolter on 3/1/2021

Signed-off-by: QbusKoen <[email protected]>
@Qbus-Koen Qbus-Koen requested a review from fwolter February 10, 2021 09:14
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 are some checkstyle warnings left. You could take a look at target/code-analysis/report.html.

bundles/org.openhab.binding.qbus/README.md Outdated Show resolved Hide resolved
<context>network-address</context>
</parameter>
<parameter name="sn" type="text" required="true">
<label>Serial nr</label>
Copy link
Member

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

Copy link
Member

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.

@fwolter
Copy link
Member

fwolter commented Feb 10, 2021

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]>
@Qbus-Koen
Copy link
Contributor Author

Hi @fwolter, i've updated my code with your proposals and pushed changes to git.
If you would be so kind to review the code once more...
Thx!

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 are some checkstyle warnings left. You could take a look at target/code-analysis/report.html.

<context>network-address</context>
</parameter>
<parameter name="sn" type="text" required="true">
<label>Serial nr</label>
Copy link
Member

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.

Updated requested changes by fwolter on 10/02/2021

Signed-off-by: Koen Schockaert <[email protected]>
Signed-off-by: QbusKoen <[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.

The single missing DCO is ok.

// Delay after sending data to improve scene execution
try {
TimeUnit.MILLISECONDS.sleep(250);
} catch (InterruptedException e) {
Copy link
Member

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?

Updated changes as requested by Fwolter on 24/02/2021

Signed-off-by: Koen Schockaert <[email protected]>
@Qbus-Koen
Copy link
Contributor Author

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:
[WARNING] C:\Users\ks\Documents\GitHub\openhab-addons\bundles\org.openhab.binding.qbus\pom.xml [0:0]: Unused Export-Package instructions: [org.openhab.]
[WARNING] C:\Users\ks\Documents\GitHub\openhab-addons\bundles\org.openhab.binding.qbus\pom.xml [0:0]: Unused Import-Package instructions: [io.swagger.v3.oas.annotations.
, javax.annotation.security., org.eclipse.jdt.annotation., org.openhab.core.automation.annotation., com.google.common.]

Please advice...
Thx!
Kind regards,
Koen


try {
startCommunication();
} catch (InterruptedException | IOException e) {
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 remove the InterruptedException from the catch clause to let it be thrown.

Updated changes reqeusted by fwolter on 25/02/2021

Signed-off-by: Koen Schockaert <[email protected]>
@Qbus-Koen
Copy link
Contributor Author

@fwolter
Check! Updated requested changes.

@Qbus-Koen
Copy link
Contributor Author

Hi @fwolter, any news on the update yet? Should I perform further actions for this Binding?
Thankx in advance for answering.


try {
startCommunication();
} catch (InterruptedException | IOException e) {
Copy link
Member

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?

Updated  changes as requested by fwolter on 2/3/2021

Signed-off-by: Koen Schockaert <[email protected]>
@Qbus-Koen
Copy link
Contributor Author

Dear @fwolter,
I took some time to rework this binding. You will probably notice a lot of changes. When i test the binding now, it works great ;-).
Can you be so kind to do antother review please?

Updates changes as requested by FWolter on 27/03/2021

Signed-off-by: Koen Schockaert <[email protected]>
@Qbus-Koen
Copy link
Contributor Author

@fwolter as requested i updated the binding.
Can you do another check when you find the time?
Many thankx!

Update requested  as suggested by FWolter on 28/03/2021

Signed-off-by: Koen Schockaert <[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.

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.

@fwolter fwolter added the cre Coordinated Review Effort label Mar 28, 2021
@Qbus-Koen
Copy link
Contributor Author

Great, thank you very much for your patience and your great advicei I really appreciete this!
What do you mean with another review? Does one of your collegue's will check this to? Or do I have to ask users to test the binding and give comments?

@fwolter
Copy link
Member

fwolter commented Mar 28, 2021

Every new addon needs to be reviewed by two openHAB addons maintainers. The cre label indicates that a second review is pending. You probably need some patience as the backlog is quite full.

@fwolter
Copy link
Member

fwolter commented Apr 11, 2021

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.

@fwolter fwolter merged commit 16ffeec into openhab:main Apr 11, 2021
@fwolter fwolter removed the cre Coordinated Review Effort label Apr 11, 2021
@fwolter fwolter added this to the 3.1 milestone Apr 11, 2021
@Confectrician
Copy link
Contributor

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:
openhab/openhab-docs#1523

The file must be named like the bundle name. "qbus" in this case.

themillhousegroup pushed a commit to themillhousegroup/openhab2-addons that referenced this pull request May 10, 2021
Signed-off-by: Koen Schockaert <[email protected]>
Signed-off-by: John Marshall <[email protected]>
computergeek1507 pushed a commit to computergeek1507/openhab-addons that referenced this pull request Jul 13, 2021
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this pull request Nov 7, 2021
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
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