-
-
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
[gree] Initial contribution #7504
Conversation
4d61138
to
15f2e78
Compare
You can make Travis CI happier by adding openhab-addons/bundles/pom.xml Lines 101 to 102 in 15f2e78
🙂 |
done :-) |
...penhab.binding.gree/src/main/java/org/openhab/binding/gree/internal/handler/GreeHandler.java
Outdated
Show resolved
Hide resolved
...ab.binding.gree/src/main/java/org/openhab/binding/gree/internal/discovery/GreeAirDevice.java
Outdated
Show resolved
Hide resolved
Travis tests were successfulHey @markus7017, |
@alexander-po any other comments? |
Travis tests were successfulHey @markus7017, |
3 similar comments
Travis tests were successfulHey @markus7017, |
Travis tests were successfulHey @markus7017, |
Travis tests were successfulHey @markus7017, |
Travis tests were successfulHey @markus7017, |
@alexander-po any other comments? |
For me looks good |
@cpmeister Who could perform the review? |
@openhab/maintainers How could do the review? |
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.
Sorry for the many findings, but most of them are only minor improvements. I known the code base is not yours, but this is the chance to get a clean code when migrating to OH2.
There are several locations where you use complex types, where int
would be sufficient. I didn't mark all of them.
There are some formatting issues. You can view them with mvn spotless:check -Dspotless.check.skip=false
and fix them with mvn spotless:apply
.
There are some checkstyle warnings left. You could take a look at target/code-analysis/report.html
.
bundles/org.openhab.binding.gree/src/main/feature/feature.xml-e
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.gree/src/main/resources/ESH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.gree/src/main/resources/ESH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.gree/src/main/resources/ESH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.gree/src/main/resources/ESH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
@fwolter No worries, a challenge for both of us :-) The code was created by a different developer. I'm going to install a A/C and checked what options are supported by OH (one of my primary decision criteria, of course :-)). I found this binding, which was outdated, but community members were responding so I decided take over the code base, did a lot of re-factoring and quickly we have an up-to-date implementation, which was also tested with various models. I already did a lot of re-factoring to get rid of many things and make the code more efficient. Nevertheless you touch the primitives topic. I was already on the way to replace all of the Integer's, but had to learn that at some points the author uses the fact that they can be null. I didn't developed the code and without a unit to test with I decided to revert the changes and keep it for now as is. This could lead into many tiny issues impacting functionality and stability. Again I'll check and try to understand how that can be changed, but... |
You could replace all complex Integers with primitive ones that don't lead to compiler errors. And leave those, which can be null, untouched. If there's a reason for using complex types, you can simply stick to it. |
@fwolter Done with most of the changes |
Travis tests have failedHey @markus7017, |
719da78
to
d02afd6
Compare
Travis tests were successfulHey @markus7017, |
2 similar comments
Travis tests were successfulHey @markus7017, |
Travis tests were successfulHey @markus7017, |
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.
These are the final-final changes. The code looks good so I'm just double checking all the other stuff.
I'm just making sure I'm not missing anything since with @fwolter becoming a maintainer I've become the second maintainer to review this binding, thus making me responsible for merging it as well.
Sorry for all this back and forth, I can only review so much during a single sitting. Thanks for your patience.
bundles/org.openhab.binding.gree/src/main/resources/ESH-INF/thing/thing-types.xml
Show resolved
Hide resolved
Jenkins reported a build failure:
Any ideas? |
no, is there any kind of log output to identify the error? |
@cpmeister No problem, we all have and 2nd job and need to manage our time. I'm fine if we are making progress and once we are done with this one we could go back to MagentaTV :-) |
Signed-off-by: Markus Michels <markus7017@gmail.com>
Travis tests were successfulHey @markus7017, |
@cpmeister anything open before you could proceed with the merge? |
@cpmeister Hi, your "final review changes" were requested almost 2 weeks ago. Is there anything open? I want to complete this work here and start over with the next PR. @fwolter Maybe you could complete the review? |
You can start making changes by creating a branch based on this PR's branch |
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.
Sorry about the delay, I took some time off.
LGTM now.
Manually checked DTO |
@cpmeister @fwolter thanks for your support @cpmeister could you please check the status of the MagentaTV bindjng, we are also almost done there |
* re-factoring WIP Signed-off-by: Markus Michels <markus7017@gmail.com>
* re-factoring WIP Signed-off-by: Markus Michels <markus7017@gmail.com> Signed-off-by: CSchlipp <christian@schlipp.de>
* re-factoring WIP Signed-off-by: Markus Michels <markus7017@gmail.com> Signed-off-by: MPH80 <michael@hazelden.me>
* re-factoring WIP Signed-off-by: Markus Michels <markus7017@gmail.com>
* re-factoring WIP Signed-off-by: Markus Michels <markus7017@gmail.com>
* re-factoring WIP Signed-off-by: Markus Michels <markus7017@gmail.com>
* re-factoring WIP Signed-off-by: Markus Michels <markus7017@gmail.com>
* re-factoring WIP Signed-off-by: Markus Michels <markus7017@gmail.com> Signed-off-by: Daan Meijer <daan@studioseptember.nl>
* re-factoring WIP Signed-off-by: Markus Michels <markus7017@gmail.com>
This binding integrates GREE air conditioners using the WiFi remote control interface. Depending on the model it provides are functions of the regular remote (air control, temp, power, swing etc.)
I took over this binding from John Cunha, who stopped supporting the binding. Code has been re-factored, discovery and localization added. README is also updated.
Community discussions: https://community.openhab.org/t/new-gree-air-conditioner-binding/36429/123?u=markus7017