Skip to content
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

Closed
wants to merge 0 commits into from

Conversation

jsjames
Copy link
Contributor

@jsjames jsjames commented Oct 23, 2020

  • Implemented controller schedules (both read and write) implementation Various other fixes
  • Addressed many warning/errors and cleanup
  • Added support for units on temperatures, power, etc.
  • Added intelliflo gpm fixed spelling error added intelliflo status
  • Added direct support for motor (when controller is not present or in service mode)
  • Removed apache.commons dependency
  • Removed gnu.io dependency. Reworked some of the state changes in the basebridgehandler.
  • Added auto discovery

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

@TravisBuddy
Copy link

Travis tests were successful

Hey @jsjames,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@jsjames jsjames added the enhancement An enhancement or new feature for an existing add-on label Oct 23, 2020
@wborn wborn changed the title [pentair] Many quality and feature improvements to the binding for OH3. [pentair] Many quality and feature improvements Oct 24, 2020
@fwolter fwolter self-assigned this Nov 1, 2020
Copy link
Member

@fwolter fwolter left a 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.

@jsjames
Copy link
Contributor Author

jsjames commented Nov 30, 2020

Force pushed to jsjames/main

@jsjames jsjames reopened this Nov 30, 2020
@jsjames
Copy link
Contributor Author

jsjames commented Dec 1, 2020

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.

Comment on lines 154 to 160
@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;
}
Copy link
Contributor

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.

Copy link
Contributor Author

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?

@fwolter
Copy link
Member

fwolter commented Dec 1, 2020

Great that you solved your problem on your own, although using steamroller tactics :)

@jsjames
Copy link
Contributor Author

jsjames commented Dec 2, 2020

@fwolter @cpmeister - It appears the Jenkins check failed on my latest updates, however in looking at the logs, it looks like everything passed?

@kaikreuzer kaikreuzer added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Dec 4, 2020
@fwolter
Copy link
Member

fwolter commented Dec 6, 2020

Are you finished making all changes?

@jsjames
Copy link
Contributor Author

jsjames commented Dec 6, 2020

Yes, all changes are done.

@jsjames
Copy link
Contributor Author

jsjames commented Dec 8, 2020

all requested changes should be made at this point. Thanks.

bundles/org.openhab.binding.pentair/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.pentair/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.pentair/README.md Outdated Show resolved Hide resolved

<channel-type id="uomtype">
<item-type>String</item-type>
<label>Unit of measure (Celcius, Fahrenheit)</label>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

@jsjames
Copy link
Contributor Author

jsjames commented Dec 11, 2020

This should be ready to go now. Thanks for all the help!

Copy link
Contributor

@cpmeister cpmeister left a 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.

Comment on lines 175 to 177
if (syncTimeJob != null) {
syncTimeJob.cancel(true);
}
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@jsjames
Copy link
Contributor Author

jsjames commented Dec 15, 2020

Just pushed up a most recent set of requested modifications. Thanks.

@fwolter
Copy link
Member

fwolter commented Dec 16, 2020

Can you fix the missing sign-off?

@jsjames
Copy link
Contributor Author

jsjames commented Dec 17, 2020

Reopened after signing

Can you fix the missing sign-off?

Hi Fabian - I followed the instructions to follow the sign-off commit with the following:
git push --force-with-lease jsjames main

Unfortunately that seemed to mess up this PR and I can't seem to reopen. suggestions on what to do?

@fwolter
Copy link
Member

fwolter commented Dec 17, 2020

I can't say what happened here. Seems like there are missing some commits in between. Can you make a test commit?

@jsjames
Copy link
Contributor Author

jsjames commented Dec 17, 2020

Test commit to reopen

I can't say what happened here. Seems like there are missing some commits in between. Can you make a test commit?

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?

@fwolter
Copy link
Member

fwolter commented Dec 17, 2020

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 main branch, but from a new one, only for the PR. Before creating a new PR, maybe @cpmeister has an idea.

@fwolter
Copy link
Member

fwolter commented Dec 25, 2020

I think you can open a new PR, if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on (potentially) not backward compatible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants