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
[Broadlinkthermostat] Initial contribution #9260
Conversation
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.
Thanks for your contribution! I reviewed your code and here is my feedback.
There are some checkstyle warnings left. You could take a look at target/code-analysis/report.html
.
...java/org/openhab/binding/broadlinkthermostat/internal/BroadlinkThermostatHandlerFactory.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.broadlinkthermostat/src/main/resources/OH-INF/config/config.xml
Show resolved
Hide resolved
bundles/org.openhab.binding.broadlinkthermostat/src/main/resources/OH-INF/config/config.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.broadlinkthermostat/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.broadlinkthermostat/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.broadlinkthermostat/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
Thank You for your fast feedback. I incorporated the quick wins and will take care about the dateformatter in the next days. |
You're welcome. Shouldn't run any much older JAR version with the current Java version? |
You're completely right, I was mistaken on that. I thought it would be missing the jaxb lib, but it seems to not miss that one "transitively". Also the handling in the feature.xml file seems to be not needed anymore... so the lib is not bundled anymore, but just referenced as compile dependency in the pom. |
That the transitive dependency isn't missing is a coincidence as it is propably used somewhere else in OH. The transitive dependencies need to be added to the pom.xml. |
|
...java/org/openhab/binding/broadlinkthermostat/internal/BroadlinkThermostatHandlerFactory.java
Outdated
Show resolved
Hide resolved
...nhab/binding/broadlinkthermostat/internal/discovery/BroadlinkThermostatDiscoveryService.java
Outdated
Show resolved
Hide resolved
...nhab/binding/broadlinkthermostat/internal/discovery/BroadlinkThermostatDiscoveryService.java
Outdated
Show resolved
Hide resolved
...java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java
Show resolved
Hide resolved
...java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.broadlinkthermostat/src/main/resources/OH-INF/config/config.xml
Outdated
Show resolved
Hide resolved
...java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java
Outdated
Show resolved
Hide resolved
...ava/org/openhab/binding/broadlinkthermostat/internal/handler/BroadlinkThermostatHandler.java
Outdated
Show resolved
Hide resolved
Just to avoid confusion, did you click on "Load more ..." in my review comments? Because you fixed all visible but none of the hidden comments. |
🤦 indeed, I missed them in the first place. They are now processed. |
Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
…org/openhab/binding/broadlinkthermostat/internal/discovery/BroadlinkThermostatDiscoveryService.java Accept review suggestion. Signed-off-by: Florian Mueller <f.l.o.mueller@web.de> Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
…org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java Accept review suggestion. Signed-off-by: Florian Mueller <f.l.o.mueller@web.de> Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
…org/openhab/binding/broadlinkthermostat/internal/BroadlinkThermostatHandlerFactory.java Accept review suggestion. Signed-off-by: Florian Mueller <f.l.o.mueller@web.de> Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
Simplify timestamp method Format fixes Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
Signed-off-by: Florian Mueller <f.l.o.mueller@web.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.
There is one checkstyle warning left. You could take a look at target/code-analysis/report.html
.
There are some compiler warnings about null access left. To fix these, you need to store the field to a local variable and do the null check on that.
...java/org/openhab/binding/broadlinkthermostat/internal/BroadlinkThermostatHandlerFactory.java
Outdated
Show resolved
Hide resolved
...nhab/binding/broadlinkthermostat/internal/discovery/BroadlinkThermostatDiscoveryService.java
Outdated
Show resolved
Hide resolved
...java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java
Outdated
Show resolved
Hide resolved
...java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java
Outdated
Show resolved
Hide resolved
...java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java
Outdated
Show resolved
Hide resolved
...java/org/openhab/binding/broadlinkthermostat/internal/BroadlinkThermostatHandlerFactory.java
Outdated
Show resolved
Hide resolved
Fix regex Use QuantityType for temperatures. Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
Cool, I was always wondering how to deal with the null checks -> Should all be solved. I did not have a checkstyle warning - is it still present? |
...nhab/binding/broadlinkthermostat/internal/discovery/BroadlinkThermostatDiscoveryService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
...nhab/binding/broadlinkthermostat/internal/discovery/BroadlinkThermostatDiscoveryService.java
Outdated
Show resolved
Hide resolved
...nhab/binding/broadlinkthermostat/internal/discovery/BroadlinkThermostatDiscoveryService.java
Outdated
Show resolved
Hide resolved
...nhab/binding/broadlinkthermostat/internal/discovery/BroadlinkThermostatDiscoveryService.java
Outdated
Show resolved
Hide resolved
...nhab/binding/broadlinkthermostat/internal/discovery/BroadlinkThermostatDiscoveryService.java
Outdated
Show resolved
Hide resolved
...nhab/binding/broadlinkthermostat/internal/discovery/BroadlinkThermostatDiscoveryService.java
Outdated
Show resolved
Hide resolved
...ava/org/openhab/binding/broadlinkthermostat/internal/handler/BroadlinkThermostatHandler.java
Outdated
Show resolved
Hide resolved
...ava/org/openhab/binding/broadlinkthermostat/internal/handler/BroadlinkThermostatHandler.java
Outdated
Show resolved
Hide resolved
...java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java
Outdated
Show resolved
Hide resolved
...java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
Did you finished making all changes? |
As far as I can see, yes, everything is pushed. |
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
As this is a new binding, another maintainer needs to review your code before it can be merged.
Sorry but how time ussualy take to merge an addon? |
It depends on when another maintainer finds time to do the second review. But the forum link might bring you to a JAR file, so that you can install the add-on in advance. |
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 second review. One additional comment. You need to update the copyright year. You can do this by running mvn license:format
on your binding.
...nhab/binding/broadlinkthermostat/internal/discovery/BroadlinkThermostatDiscoveryService.java
Outdated
Show resolved
Hide resolved
...ava/org/openhab/binding/broadlinkthermostat/internal/handler/BroadlinkThermostatHandler.java
Show resolved
Hide resolved
...java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java
Outdated
Show resolved
Hide resolved
...java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java
Show resolved
Hide resolved
...java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java
Show resolved
Hide resolved
...java/org/openhab/binding/broadlinkthermostat/internal/handler/FloureonThermostatHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
* introduce cache for AdvanceStatusInfo * Move authentication outside of initialize step Signed-off-by: Florian Mueller <f.l.o.mueller@web.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
Signed-off-by: Florian Mueller <f.l.o.mueller@web.de> Signed-off-by: John Marshall <john.marshall.au@gmail.com>
Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
Signed-off-by: Florian Mueller <f.l.o.mueller@web.de>
This is a new binding to support thermostats that are based on a broadlink chips and sold with different brand names (see https://community.openhab.org/t/electronic-heating-thermostat-reverse-engineering-beok-floureon-decdeal/39251).
While there is already another broadlink binding in development (https://community.openhab.org/t/broadlink-binding-for-rmx-a1-spx-and-mp-any-interest/22768) they both focus on different things, that's why I decided to create a separate binding.
Unfortunately the binding includes a library in the lib folder which is not an osgi bundle. The distributed version is a jdk11 patched version of https://github.com/mob41/broadlink-java-api/
Myself and other users have been using this binding for quite a while, that's why I'd like to get this into the official distribution.
Discussion for this binding takes place at https://community.openhab.org/t/broadlink-floureon-hysen-thermostat-binding/81921