-
-
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
[WlanThermo] Add support for new Nano V3, Mini V3, Link V1, Mini V1/V2(ESP32) devices [V3.x] #9579
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.
Your code doesn't build, because there are some checkstyle errors. You could take a look at target/code-analysis/report.html
.
...in/java/org/openhab/binding/wlanthermo/internal/api/esp32/WlanThermoEsp32CommandHandler.java
Outdated
Show resolved
Hide resolved
...in/java/org/openhab/binding/wlanthermo/internal/api/esp32/WlanThermoEsp32CommandHandler.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/openhab/binding/wlanthermo/internal/api/esp32/WlanThermoEsp32Handler.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/openhab/binding/wlanthermo/internal/api/esp32/WlanThermoEsp32Handler.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/openhab/binding/wlanthermo/internal/api/esp32/WlanThermoEsp32Handler.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.wlanthermo/src/main/resources/OH-INF/thing/channel-types.xml
Show resolved
Hide resolved
bundles/org.openhab.binding.wlanthermo/src/main/resources/OH-INF/thing/channel-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.wlanthermo/src/main/resources/OH-INF/thing/channel-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.wlanthermo/src/main/resources/OH-INF/thing/channel-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.wlanthermo/src/main/resources/OH-INF/thing/thing-types-mini.xml
Outdated
Show resolved
Hide resolved
1d81981
to
b164d7b
Compare
Thanks for the review! Local builds do not show any blocking checkstyle errors, let's wait for the Jenkins build... |
License Headers were missing. |
Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
further improved logging Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
Specify Quantity Type for Temperature and Power Channels Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
ae80ec0
to
65628c9
Compare
Revert to default scheduler Signed-off-by: Christian Schlipp <[email protected]>
The build failed during the Feed-Binding Integration Tests - seemingly unrelated to this binding or the changes within this PR. |
Signed-off-by: Christian Schlipp <[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
.
...ng.wlanthermo/src/main/java/org/openhab/binding/wlanthermo/internal/api/esp32/UtilEsp32.java
Outdated
Show resolved
Hide resolved
...in/java/org/openhab/binding/wlanthermo/internal/api/esp32/WlanThermoEsp32CommandHandler.java
Outdated
Show resolved
Hide resolved
...in/java/org/openhab/binding/wlanthermo/internal/api/esp32/WlanThermoEsp32CommandHandler.java
Outdated
Show resolved
Hide resolved
...in/java/org/openhab/binding/wlanthermo/internal/api/esp32/WlanThermoEsp32CommandHandler.java
Outdated
Show resolved
Hide resolved
...in/java/org/openhab/binding/wlanthermo/internal/api/esp32/WlanThermoEsp32CommandHandler.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.wlanthermo/src/main/resources/OH-INF/thing/channel-types.xml
Outdated
Show resolved
Hide resolved
...org.openhab.binding.wlanthermo/src/main/resources/OH-INF/thing/channel-group-types-esp32.xml
Show resolved
Hide resolved
.../src/main/java/org/openhab/binding/wlanthermo/internal/api/esp32/WlanThermoEsp32Handler.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/openhab/binding/wlanthermo/internal/api/esp32/WlanThermoEsp32Handler.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/openhab/binding/wlanthermo/internal/api/esp32/WlanThermoEsp32Handler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
Argh, missed the last spotless:apply commit. Would you label it for rebuild again, please? |
No problem. |
Actually, the potential null pointer access warnings I see there would be caused by using nullable fields directly instead of caching the field into a local variable first. The null checker assumes that any nullable field can become null at any time due to concurrency. And yes, I understand that it is often a wrong assumption but it is also the safest assumption. |
Ensure Gson objects are NonNull Generify Handlers Generify Utils Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[email protected]>
Guess I've found a quite pretty solution for the null pointer warnings. Would you please trigger a rebuild? Thanks! |
...ding.wlanthermo/src/main/java/org/openhab/binding/wlanthermo/internal/WlanThermoHandler.java
Outdated
Show resolved
Hide resolved
...ding.wlanthermo/src/main/java/org/openhab/binding/wlanthermo/internal/WlanThermoHandler.java
Outdated
Show resolved
Hide resolved
...ava/org/openhab/binding/wlanthermo/internal/api/esp32/WlanThermoEsp32CommandHandlerTest.java
Outdated
Show resolved
Hide resolved
...in/java/org/openhab/binding/wlanthermo/internal/api/nano/WlanThermoNanoV1CommandHandler.java
Outdated
Show resolved
Hide resolved
move test json to resources Signed-off-by: Christian Schlipp <[email protected]>
Signed-off-by: Christian Schlipp <[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
The build failed, looks like you need to run spotless. |
Signed-off-by: Christian Schlipp <[email protected]>
This is driving me nuts some day... |
Thanks again! |
…b#9579) * Add support for ESP32 devices * Add Unit Tests Ensure Gson objects are NonNull Generify Handlers Generify Utils Signed-off-by: Christian Schlipp <[email protected]> Signed-off-by: John Marshall <[email protected]>
…b#9579) * Add support for ESP32 devices * Add Unit Tests Ensure Gson objects are NonNull Generify Handlers Generify Utils Signed-off-by: Christian Schlipp <[email protected]>
…b#9579) * Add support for ESP32 devices * Add Unit Tests Ensure Gson objects are NonNull Generify Handlers Generify Utils Signed-off-by: Christian Schlipp <[email protected]>
This PR adds support for the new Nano V3, Mini V2 (with ESP32-Upgrade), and Link V1 devices.
The API of these hardware versions has changed compared to the previous devices, but is the same for the whole new platform (thus named "esp32"). This commit follows the same approach as the initial contribution and contains auto-generated classes for parsing the new JSON output.
The thing description xml has been spit up to different files to ease the future development.
No further changes to existing things, thus backwards compatible.
Configuration of different thing types has been merged to avoid duplicate code.
Backport of changes to 2.5.x branch via PR #9580 (same changes)