-
-
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
[opensprinkler] Improvements: Remove apache.commons, fix bugs and warnings #9869
Conversation
...er/src/main/java/org/openhab/binding/opensprinkler/internal/api/OpenSprinklerApiFactory.java
Outdated
Show resolved
Hide resolved
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.
Apart from that I didn't see anything, yet, where I would say it should block the merge. However, two caveats, though:
- I don't have an easy way anymore to check if the binding still works as expected with a real opensprinkler device :/
- This PR got a bit big :D It's hard to review it in one shoot tbh. This is, however, only a side note and maybe next time we can split up the PR in multiple smaller ones :-)
Thanks for your contribution!
.../src/main/java/org/openhab/binding/opensprinkler/internal/OpenSprinklerBindingConstants.java
Show resolved
Hide resolved
Thank you for looking it over.
|
All requested changes have been addressed. |
Signed-off-by: Matthew Skinner <matt@pcmus.com>
…enhab/binding/opensprinkler/internal/discovery/OpenSprinklerDiscoveryService.java Signed-off-by: Matthew Skinner <matt@pcmus.com> Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
What's the reason for the force-push? That lead to marking the whole code as changed. So, what did you really change? |
I did a rebase with openhab main and changed it to 3.2snapshot so it will be fine to merge now that 3.1 stable is released. I also did one small change as a separate commit after the force push to remove a suppress warnings. This can be seen as it is a separate commit. |
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.
OK! LGTM
…nings (openhab#9869) * Fix: current channel would not get added. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix: online and offline now detect correctly. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Improve discovery. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Bug fixes. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Misc Improvements and log cleanup. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Make current sensor channel dynamically get removed if not supported. Signed-off-by: Matthew Skinner <matt@pcmus.com> * fix compiler warning. Signed-off-by: Matthew Skinner <matt@pcmus.com> * readme updates. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Shift refresh() Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add RSSI and water flow meter count channels. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Change to flowSensorCount Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix bug Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix NPE on parsing jsReplies. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add new programs channel. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix wrong api use. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Change to using max time if the time is null. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add device withRepresentationProperty Signed-off-by: Matthew Skinner <matt@pcmus.com> * update readme Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix rain sensor not working in 219 firmware. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Spotless fixes. Signed-off-by: Matthew Skinner <matt@pcmus.com> * fix gson double up error. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add more channels Signed-off-by: Matthew Skinner <matt@pcmus.com> * refresh completed before bridge goes online. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Simplify. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Allow non default password to not stop discovery. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add ignoresRain channel Signed-off-by: Matthew Skinner <matt@pcmus.com> * Simplify commands in station handler. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add new rainDelay channel. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Make constants consistent. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add categories. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Changes requested by FlorianSW Signed-off-by: Matthew Skinner <matt@pcmus.com> * Stop catching and throwing new exp. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Create a state class. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Update bundles/org.openhab.binding.opensprinkler/src/main/java/org/openhab/binding/opensprinkler/internal/discovery/OpenSprinklerDiscoveryService.java Signed-off-by: Matthew Skinner <matt@pcmus.com> Co-authored-by: Connor Petty <mistercpp2000@gmail.com> * Fix for EOF exception that stops polling with bad wifi. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Change signal strength over to 0-4 range Signed-off-by: Matthew Skinner <matt@pcmus.com> * Handle toUnit null returns. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Support discovery on subnets that are not /24 Signed-off-by: Matthew Skinner <matt@pcmus.com> * update readme for recent changes to signalStrength channel. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix code anal issue and readme. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Remove info logging. Signed-off-by: Matthew Skinner <matt@pcmus.com> * remove traces of old dependancy. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Changes for fwolter Signed-off-by: Matthew Skinner <matt@pcmus.com> * support RSSI and rssi Signed-off-by: Matthew Skinner <matt@pcmus.com> * Update after new command sent. Signed-off-by: Matthew Skinner <matt@pcmus.com> * improve delayedRefresh Signed-off-by: Matthew Skinner <matt@pcmus.com> * Remove supressWarnings Signed-off-by: Matthew Skinner <matt@pcmus.com> Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
…nings (openhab#9869) * Fix: current channel would not get added. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix: online and offline now detect correctly. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Improve discovery. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Bug fixes. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Misc Improvements and log cleanup. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Make current sensor channel dynamically get removed if not supported. Signed-off-by: Matthew Skinner <matt@pcmus.com> * fix compiler warning. Signed-off-by: Matthew Skinner <matt@pcmus.com> * readme updates. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Shift refresh() Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add RSSI and water flow meter count channels. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Change to flowSensorCount Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix bug Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix NPE on parsing jsReplies. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add new programs channel. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix wrong api use. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Change to using max time if the time is null. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add device withRepresentationProperty Signed-off-by: Matthew Skinner <matt@pcmus.com> * update readme Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix rain sensor not working in 219 firmware. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Spotless fixes. Signed-off-by: Matthew Skinner <matt@pcmus.com> * fix gson double up error. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add more channels Signed-off-by: Matthew Skinner <matt@pcmus.com> * refresh completed before bridge goes online. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Simplify. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Allow non default password to not stop discovery. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add ignoresRain channel Signed-off-by: Matthew Skinner <matt@pcmus.com> * Simplify commands in station handler. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add new rainDelay channel. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Make constants consistent. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add categories. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Changes requested by FlorianSW Signed-off-by: Matthew Skinner <matt@pcmus.com> * Stop catching and throwing new exp. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Create a state class. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Update bundles/org.openhab.binding.opensprinkler/src/main/java/org/openhab/binding/opensprinkler/internal/discovery/OpenSprinklerDiscoveryService.java Signed-off-by: Matthew Skinner <matt@pcmus.com> Co-authored-by: Connor Petty <mistercpp2000@gmail.com> * Fix for EOF exception that stops polling with bad wifi. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Change signal strength over to 0-4 range Signed-off-by: Matthew Skinner <matt@pcmus.com> * Handle toUnit null returns. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Support discovery on subnets that are not /24 Signed-off-by: Matthew Skinner <matt@pcmus.com> * update readme for recent changes to signalStrength channel. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix code anal issue and readme. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Remove info logging. Signed-off-by: Matthew Skinner <matt@pcmus.com> * remove traces of old dependancy. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Changes for fwolter Signed-off-by: Matthew Skinner <matt@pcmus.com> * support RSSI and rssi Signed-off-by: Matthew Skinner <matt@pcmus.com> * Update after new command sent. Signed-off-by: Matthew Skinner <matt@pcmus.com> * improve delayedRefresh Signed-off-by: Matthew Skinner <matt@pcmus.com> * Remove supressWarnings Signed-off-by: Matthew Skinner <matt@pcmus.com> Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
…nings (openhab#9869) * Fix: current channel would not get added. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix: online and offline now detect correctly. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Improve discovery. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Bug fixes. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Misc Improvements and log cleanup. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Make current sensor channel dynamically get removed if not supported. Signed-off-by: Matthew Skinner <matt@pcmus.com> * fix compiler warning. Signed-off-by: Matthew Skinner <matt@pcmus.com> * readme updates. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Shift refresh() Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add RSSI and water flow meter count channels. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Change to flowSensorCount Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix bug Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix NPE on parsing jsReplies. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add new programs channel. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix wrong api use. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Change to using max time if the time is null. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add device withRepresentationProperty Signed-off-by: Matthew Skinner <matt@pcmus.com> * update readme Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix rain sensor not working in 219 firmware. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Spotless fixes. Signed-off-by: Matthew Skinner <matt@pcmus.com> * fix gson double up error. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add more channels Signed-off-by: Matthew Skinner <matt@pcmus.com> * refresh completed before bridge goes online. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Simplify. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Allow non default password to not stop discovery. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add ignoresRain channel Signed-off-by: Matthew Skinner <matt@pcmus.com> * Simplify commands in station handler. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add new rainDelay channel. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Make constants consistent. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add categories. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Changes requested by FlorianSW Signed-off-by: Matthew Skinner <matt@pcmus.com> * Stop catching and throwing new exp. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Create a state class. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Update bundles/org.openhab.binding.opensprinkler/src/main/java/org/openhab/binding/opensprinkler/internal/discovery/OpenSprinklerDiscoveryService.java Signed-off-by: Matthew Skinner <matt@pcmus.com> Co-authored-by: Connor Petty <mistercpp2000@gmail.com> * Fix for EOF exception that stops polling with bad wifi. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Change signal strength over to 0-4 range Signed-off-by: Matthew Skinner <matt@pcmus.com> * Handle toUnit null returns. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Support discovery on subnets that are not /24 Signed-off-by: Matthew Skinner <matt@pcmus.com> * update readme for recent changes to signalStrength channel. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix code anal issue and readme. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Remove info logging. Signed-off-by: Matthew Skinner <matt@pcmus.com> * remove traces of old dependancy. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Changes for fwolter Signed-off-by: Matthew Skinner <matt@pcmus.com> * support RSSI and rssi Signed-off-by: Matthew Skinner <matt@pcmus.com> * Update after new command sent. Signed-off-by: Matthew Skinner <matt@pcmus.com> * improve delayedRefresh Signed-off-by: Matthew Skinner <matt@pcmus.com> * Remove supressWarnings Signed-off-by: Matthew Skinner <matt@pcmus.com> Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
…nings (openhab#9869) * Fix: current channel would not get added. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix: online and offline now detect correctly. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Improve discovery. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Bug fixes. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Misc Improvements and log cleanup. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Make current sensor channel dynamically get removed if not supported. Signed-off-by: Matthew Skinner <matt@pcmus.com> * fix compiler warning. Signed-off-by: Matthew Skinner <matt@pcmus.com> * readme updates. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Shift refresh() Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add RSSI and water flow meter count channels. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Change to flowSensorCount Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix bug Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix NPE on parsing jsReplies. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add new programs channel. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix wrong api use. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Change to using max time if the time is null. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add device withRepresentationProperty Signed-off-by: Matthew Skinner <matt@pcmus.com> * update readme Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix rain sensor not working in 219 firmware. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Spotless fixes. Signed-off-by: Matthew Skinner <matt@pcmus.com> * fix gson double up error. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add more channels Signed-off-by: Matthew Skinner <matt@pcmus.com> * refresh completed before bridge goes online. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Simplify. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Allow non default password to not stop discovery. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add ignoresRain channel Signed-off-by: Matthew Skinner <matt@pcmus.com> * Simplify commands in station handler. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add new rainDelay channel. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Make constants consistent. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Add categories. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Changes requested by FlorianSW Signed-off-by: Matthew Skinner <matt@pcmus.com> * Stop catching and throwing new exp. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Create a state class. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Update bundles/org.openhab.binding.opensprinkler/src/main/java/org/openhab/binding/opensprinkler/internal/discovery/OpenSprinklerDiscoveryService.java Signed-off-by: Matthew Skinner <matt@pcmus.com> Co-authored-by: Connor Petty <mistercpp2000@gmail.com> * Fix for EOF exception that stops polling with bad wifi. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Change signal strength over to 0-4 range Signed-off-by: Matthew Skinner <matt@pcmus.com> * Handle toUnit null returns. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Support discovery on subnets that are not /24 Signed-off-by: Matthew Skinner <matt@pcmus.com> * update readme for recent changes to signalStrength channel. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Fix code anal issue and readme. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Remove info logging. Signed-off-by: Matthew Skinner <matt@pcmus.com> * remove traces of old dependancy. Signed-off-by: Matthew Skinner <matt@pcmus.com> * Changes for fwolter Signed-off-by: Matthew Skinner <matt@pcmus.com> * support RSSI and rssi Signed-off-by: Matthew Skinner <matt@pcmus.com> * Update after new command sent. Signed-off-by: Matthew Skinner <matt@pcmus.com> * improve delayedRefresh Signed-off-by: Matthew Skinner <matt@pcmus.com> * Remove supressWarnings Signed-off-by: Matthew Skinner <matt@pcmus.com> Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
Remove: apache commons library #7722
Refactor: Auto Discovery to improve experience and now uses withRepresentationProperty.
Refactor: All classes now use nonNullByDefault and fixed many compiler warnings from this change.
Refactor: Use a single file for all constants to make it easier to find them.
Fix: Online and Offline detection was not working correctly. #8942
Fix: Password could get MD5 hashed twice in a row causing the binding to stop working.
Fix: Current sensing channel was not getting displayed in OH3 due to being added on the fly to the thing. #9664
Fix: Many NPE errors were occurring and not getting caught, reported on forum.
Fix: java.lang.IndexOutOfBoundsException When the station Index is higher than the total number of stations.
Improve: Added bindings ability to report to the user when the password was wrong and not crash with a NPE.
Improve: Added new RSSI signalStrength channel.
Improve: Added new flowSensorCount channel so openHAB can see when the flow sensor detects water or not.
Improve: Added new channel
programs
to allow a selectable list of programs to be displayed and run.Improve: Added new channel
stations
to allow a selectable list of stations to be displayed and run.Improve: Added new channel
rainDelay
.Improve: Added new channel
resetStations
to stop all stations and remove everything from the queue.Improve: Added new channel
enablePrograms
.Signed-off-by: Matthew Skinner matt@pcmus.com