-
-
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
[pentair] Many quality and feature improvements #8844
Conversation
Travis tests were successfulHey @jsjames, |
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 a lot of duplicate code in the ThingHandlers. That is why many review findings are also redundant. You already have the right class structure to abstract this code. You could utilize this.
If I see correctly you renamed a Thing and a Bridge. I commented on the renaming of the bridge below. This also applies to the Thing.
There are some checkstyle warnings left. You could take a look at target/code-analysis/report.html
.
bundles/org.openhab.binding.pentair/src/main/resources/OH-INF/thing/intellichem.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.pentair/src/main/resources/OH-INF/thing/intellichem.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.pentair/src/main/resources/OH-INF/thing/intellichem.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.pentair/src/main/resources/OH-INF/thing/serial_bridge.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.pentair/src/main/resources/OH-INF/thing/serial_bridge.xml
Outdated
Show resolved
Hide resolved
Force pushed to jsjames/main |
850c322
to
13cc346
Compare
Hi Fabian - I had lots of issues on my local git library which complicated squashing and checking things in. I ended up just checking out origin/main and then copying over the new files by hand and then recommitting to get a clean single commit (unfortunately, i am a newbie on git). Anyway, I hope things are done correctly. look forward to your review. |
...ing.pentair/src/main/java/org/openhab/binding/pentair/internal/PentairControllerCircuit.java
Outdated
Show resolved
Hide resolved
...ing.pentair/src/main/java/org/openhab/binding/pentair/internal/PentairControllerCircuit.java
Outdated
Show resolved
Hide resolved
@Override | ||
public Object clone() throws CloneNotSupportedException { | ||
PentairControllerStatus pcs = (PentairControllerStatus) super.clone(); | ||
|
||
pcs.circuits = new boolean[this.circuits.length]; | ||
System.arraycopy(this.circuits, 0, pcs.circuits, 0, this.circuits.length); | ||
|
||
return pcs; | ||
} |
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.
Please don't use clone()
if possible just write a custom copy method.
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.
Based on restructuring I did from feedback from Fabian, I no longer use clone and so I deleted. I'd be curious on recommendation to not use clone - which from my understanding would be the standard way to do this?
...ab.binding.pentair/src/main/java/org/openhab/binding/pentair/internal/PentairHeatStatus.java
Outdated
Show resolved
Hide resolved
...ng.pentair/src/main/java/org/openhab/binding/pentair/internal/PentairIntelliChlorPacket.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.pentair/src/main/resources/OH-INF/thing/intellichem.xml
Outdated
Show resolved
Hide resolved
...air/src/main/java/org/openhab/binding/pentair/internal/handler/PentairControllerHandler.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/openhab/binding/pentair/internal/handler/PentairIntelliChlorHandler.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/openhab/binding/pentair/internal/handler/PentairSerialBridgeHandler.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.pentair/src/main/resources/OH-INF/binding/binding.xml
Outdated
Show resolved
Hide resolved
Great that you solved your problem on your own, although using steamroller tactics :) |
@fwolter @cpmeister - It appears the Jenkins check failed on my latest updates, however in looking at the logs, it looks like everything passed? |
...ding.pentair/src/main/java/org/openhab/binding/pentair/internal/PentairControllerStatus.java
Outdated
Show resolved
Hide resolved
...penhab.binding.pentair/src/main/java/org/openhab/binding/pentair/internal/PentairParser.java
Outdated
Show resolved
Hide resolved
...air/src/main/java/org/openhab/binding/pentair/internal/handler/PentairBaseBridgeHandler.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/openhab/binding/pentair/internal/handler/PentairIntelliChlorHandler.java
Outdated
Show resolved
Hide resolved
f513104
to
b19553e
Compare
Are you finished making all changes? |
Yes, all changes are done. |
...penhab.binding.pentair/src/main/java/org/openhab/binding/pentair/internal/PentairParser.java
Outdated
Show resolved
Hide resolved
...penhab.binding.pentair/src/main/java/org/openhab/binding/pentair/internal/PentairParser.java
Outdated
Show resolved
Hide resolved
...penhab.binding.pentair/src/main/java/org/openhab/binding/pentair/internal/PentairParser.java
Outdated
Show resolved
Hide resolved
...air/src/main/java/org/openhab/binding/pentair/internal/handler/PentairBaseBridgeHandler.java
Outdated
Show resolved
Hide resolved
...air/src/main/java/org/openhab/binding/pentair/internal/handler/PentairBaseBridgeHandler.java
Outdated
Show resolved
Hide resolved
...air/src/main/java/org/openhab/binding/pentair/internal/handler/PentairBaseBridgeHandler.java
Outdated
Show resolved
Hide resolved
...air/src/main/java/org/openhab/binding/pentair/internal/handler/PentairBaseBridgeHandler.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/openhab/binding/pentair/internal/handler/PentairIntelliChlorHandler.java
Outdated
Show resolved
Hide resolved
...air/src/main/java/org/openhab/binding/pentair/internal/handler/PentairBaseBridgeHandler.java
Outdated
Show resolved
Hide resolved
...air/src/main/java/org/openhab/binding/pentair/internal/handler/PentairBaseBridgeHandler.java
Outdated
Show resolved
Hide resolved
all requested changes should be made at this point. Thanks. |
...ng.pentair/src/main/java/org/openhab/binding/pentair/internal/PentairControllerSchedule.java
Outdated
Show resolved
Hide resolved
...ng.pentair/src/main/java/org/openhab/binding/pentair/internal/PentairControllerSchedule.java
Outdated
Show resolved
Hide resolved
|
||
<channel-type id="uomtype"> | ||
<item-type>String</item-type> | ||
<label>Unit of measure (Celcius, Fahrenheit)</label> |
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.
See above
bundles/org.openhab.binding.pentair/src/main/resources/OH-INF/thing/controller.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.pentair/src/main/resources/OH-INF/thing/controller.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.pentair/src/main/resources/OH-INF/thing/controller.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.pentair/src/test/resources/log4j.xml
Outdated
Show resolved
Hide resolved
This should be ready to go now. Thanks for all the help! |
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.
For future code changes to the PR, please make them additional commits. Please don't append to the current commit and then force push. It is getting very difficult to track what changes you are making in response to our reviews. Thank you.
...ng.pentair/src/main/java/org/openhab/binding/pentair/internal/PentairControllerSchedule.java
Outdated
Show resolved
Hide resolved
...ntair/src/main/java/org/openhab/binding/pentair/internal/handler/PentairIPBridgeHandler.java
Outdated
Show resolved
Hide resolved
...ntair/src/main/java/org/openhab/binding/pentair/internal/handler/PentairIPBridgeHandler.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/openhab/binding/pentair/internal/handler/PentairIntelliChlorHandler.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/openhab/binding/pentair/internal/handler/PentairIntelliChlorHandler.java
Outdated
Show resolved
Hide resolved
...air/src/main/java/org/openhab/binding/pentair/internal/handler/PentairControllerHandler.java
Outdated
Show resolved
Hide resolved
if (syncTimeJob != null) { | ||
syncTimeJob.cancel(true); | ||
} |
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.
To make the null checker happy you need to store fields into local variables and perform your operations on those local variables instead.
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 several of these benign null check warnings where I didn't think its worth addressing since they aren't real issues (I'm hoping the null check tools will improve). I did address this one.
...air/src/main/java/org/openhab/binding/pentair/internal/handler/PentairControllerHandler.java
Outdated
Show resolved
Hide resolved
...air/src/main/java/org/openhab/binding/pentair/internal/handler/PentairControllerHandler.java
Outdated
Show resolved
Hide resolved
...air/src/main/java/org/openhab/binding/pentair/internal/handler/PentairControllerHandler.java
Outdated
Show resolved
Hide resolved
Just pushed up a most recent set of requested modifications. Thanks. |
Can you fix the missing sign-off? |
Reopened after signing
Hi Fabian - I followed the instructions to follow the sign-off commit with the following: Unfortunately that seemed to mess up this PR and I can't seem to reopen. suggestions on what to do? |
I can't say what happened here. Seems like there are missing some commits in between. Can you make a test commit? |
Test commit to reopen
I submitted a test commit and tried to "Reopen and comment" on this PR. I still get a "no new commits on jsjames:main". When i look at jsjames:main, it is clear there are commits - not sure what could be going on? Should I open a brand new PR? |
Seems like GitHub lost track between your branch and this PR. When you create a new PR it's a good idea not to create it from your |
I think you can open a new PR, if you want. |
Finished schedule implementation
Various other fixes
Addressed many warning/errors
More cleanup
Updated README with changes.
Added support for UOM
Added intelliflo gpm
fixed spelling error
added intelliflo status
Removed apache.commons import
Removed gnu.io dependency. Reworked some of the state changes in the basebridgehandler.
Added auto discovery