-
-
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
[sleepiq] Rework cloud API and other enhancements #14180
[sleepiq] Rework cloud API and other enhancements #14180
Conversation
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/sleepiq-binding-issue-polling-sleep-number-api/85094/72 |
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 the improvements made here. I have provided some initial comments, but haven't looked through any of the 3rdparty code yet.
...inding.sleepiq/src/3rdparty/java/org/openhab/binding/sleepiq/api/CommunicationException.java
Outdated
Show resolved
Hide resolved
...inding.sleepiq/src/3rdparty/java/org/openhab/binding/sleepiq/api/CommunicationException.java
Outdated
Show resolved
Hide resolved
...ding.sleepiq/src/main/java/org/openhab/binding/sleepiq/internal/SleepIQBindingConstants.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.sleepiq/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.sleepiq/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
....sleepiq/src/main/java/org/openhab/binding/sleepiq/internal/handler/SleepIQCloudHandler.java
Outdated
Show resolved
Hide resolved
....sleepiq/src/main/java/org/openhab/binding/sleepiq/internal/handler/SleepIQCloudHandler.java
Outdated
Show resolved
Hide resolved
....sleepiq/src/main/java/org/openhab/binding/sleepiq/internal/handler/SleepIQCloudHandler.java
Outdated
Show resolved
Hide resolved
@jlaur I've migrated all the 3rd party source code (including tests) into the official binding code. As part of that, I've (hopefully) taken care of all the license headers, null annotations, Javadocs, author tags, SAT issues, etc. I'm now moving on to address your other review feedback. |
Signed-off-by: Mark Hilbush <[email protected]>
Signed-off-by: Mark Hilbush <[email protected]>
Signed-off-by: Mark Hilbush <[email protected]>
Signed-off-by: Mark Hilbush <[email protected]>
b5c9556
to
4599e28
Compare
Signed-off-by: Mark Hilbush <[email protected]>
I've pushed the changes from your review feedback. I believe there's only 1 question outstanding (the removal of the single-chamber bed constants that are currently commented out, and the single-chamber bed thing type in thing-types.xml. Just let me know what you want to do. Edit: I hope I didn't miss any feedback. With all the changes from moving the 3rd party code, it's possible I might've missed some feedback. |
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 this massive refactoring! The code already looks really good, so I have provided only a few minor findings.
...g.sleepiq/src/main/java/org/openhab/binding/sleepiq/internal/api/dto/SleepNumberRequest.java
Outdated
Show resolved
Hide resolved
....sleepiq/src/main/java/org/openhab/binding/sleepiq/internal/api/enums/SleepDataInterval.java
Outdated
Show resolved
Hide resolved
....sleepiq/src/main/java/org/openhab/binding/sleepiq/internal/api/enums/SleepDataInterval.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Mark Hilbush <[email protected]>
The only thing remaining at this point is the commented constants and thing type for the single-chamber bed? Remove them? |
Signed-off-by: Mark Hilbush <[email protected]>
PR description has been updated. |
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.
I have been away from openHAB dev for awhile, so I can't speak to project standards being followed. However, the code looks good and the improvements over my original implementation make sense.
Great job @mhilbush! Glad to see the binding getting a significant refresh.
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: Mark Hilbush <[email protected]>
Signed-off-by: Mark Hilbush <[email protected]>
Signed-off-by: Mark Hilbush <[email protected]>
Fixes #11764
This PR replaces the JAX-RS implementation with Jetty due to the unreliability of the binding when calling the SleepIQ API. See the issue description for more details on the issues encountered with the JAX-RS implementation.
This PR also adds new functionality to the binding (also described in the issue description).
There are significant changes to the binding code. The 3rd party library source code and tests have been integrated into the official source code for the binding. The 3rd party library source has ben modified to conform to openHAB standards/style.
The binding has been running very stable for me and several other users for over a year. Unfortunately, my schedule in 2022 prevented me from submitting this PR sooner.
Signed-off-by: Mark Hilbush [email protected]