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 enhancements since original commit, including #13485

Merged
merged 4 commits into from
Jul 8, 2024

Conversation

jsjames
Copy link
Contributor

@jsjames jsjames commented Oct 4, 2022

- changed to more generic "controller" name vs. specific to "easytouch" - not backwards compatible
- Integrated the "feature" support in to new controller groups.
- 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
- 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

Closes 13485

@jsjames jsjames added enhancement An enhancement or new feature for an existing add-on (potentially) not backward compatible labels Oct 4, 2022
@jsjames jsjames linked an issue Oct 4, 2022 that may be closed by this pull request
22 tasks
@lolodomo
Copy link
Contributor

lolodomo commented Oct 4, 2022

If you have created one PR for each new feature/enhancement rather than one enormous PR of almost 8000 new lines, you will have encouraged a faster review.
I will be honnest with you, I will not start a review myself of such a big PR.

@jsjames
Copy link
Contributor Author

jsjames commented Oct 4, 2022

If you have created one PR for each new feature/enhancement rather than one enormous PR of almost 8000 new lines, you will have encouraged a faster review. I will be honnest with you, I will not start a review myself of such a big PR.

The majority was reviewed in this PR: [https://github.com//pull/8844]. Many of the changes were as a result of that review and many hours were spent to address the comments (even when they were just stylistic comments). Unfortunately, github got out of sync with my branch and the suggestion was to submit a new review - where I ran out of time. As a recent comment was made on removing gnu.io and the Pentair binding was listed as not having made the change, I decided to resubmit now.

@lolodomo
Copy link
Contributor

lolodomo commented Oct 4, 2022

@fwolter was apparently involved in the previous PR, I hope he will continue with this new PR.

@jsjames jsjames added the work in progress A PR that is not yet ready to be merged label Nov 14, 2022
@fwolter
Copy link
Member

fwolter commented Nov 20, 2022

Is this ready for review again? You added the work in progress label?

@jsjames
Copy link
Contributor Author

jsjames commented Nov 20, 2022

After the review process for a different binding (juicenet), I decided to take a once over the code and address some of the same types of edits suggested in that review. Its taking a little longer than anticipated and in the process cleaning up some of the code. It will probably be several days before i'm done, but it should "hopefully" make your review much simpler.

@jsjames
Copy link
Contributor Author

jsjames commented Nov 29, 2022

@fwolter, I've submitted a new version. There are quite a few changes to clean up and restructure the code. I think it reads much better and fixed a lot of the style issues. Unfortunately, the changes were fairly large in number.

@lsiepel lsiepel added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Dec 23, 2022
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.

I reviewed the readme and the first code file for now. Here is my feedback.

There are some checkstyle warnings left. You could take a look at target/code-analysis/report.html after building it with mvn clean install.

There are some compiler warnings about null access left. You could take a look at mvn clean install. To fix these, you need to store the field to a local variable and do the null check on that.

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
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
Comment on lines 196 to 197
| tank1 | Number | R | Tank 1 level. |
| tank2 | Number | R | Tank 2 level. |
Copy link
Member

Choose a reason for hiding this comment

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

Is this in percent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, these are values between 1-7. I added this in the description.

Comment on lines 202 to 203
| mode1 | Number | R | Mode 1 status. |
| mode2 | Number | R | Mode 2 status. |
Copy link
Member

Choose a reason for hiding this comment

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

Do you know what this is about?

(byte) ControllerCommand.SET_CIRCUIT_SWITCH.send, (byte) 0x02, (byte) circuit,
(byte) ((state) ? 1 : 0) };

logger.debug("setCircuitSwitch: {}, {}", circuit, state);
Copy link
Member

Choose a reason for hiding this comment

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

Can this message be replaced by using the debugger? See point 4 https://www.openhab.org/docs/developer/guidelines.html#f-logging


logger.debug("setCircuitSwitch: {}, {}", circuit, state);
if (!getWriter().writePacket(packet, ControllerCommand.SET_CIRCUIT_SWITCH.response, 1)) {
logger.trace("setCircuitSwitch: Timeout");
Copy link
Member

Choose a reason for hiding this comment

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

Logging. Same as above. Please check all.

@wborn
Copy link
Member

wborn commented Jul 24, 2023

Hi @jsjames! Can you fix the review comments and merge conflicts?

@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/pentair-serial-connection-not-working/149860/5

@lsiepel
Copy link
Contributor

lsiepel commented Jan 15, 2024

@jsjames can you resolve the conflicts?

@jsjames jsjames force-pushed the pentair2 branch 2 times, most recently from 2f4d091 to ff99c67 Compare January 16, 2024 02:29
@jsjames jsjames removed the work in progress A PR that is not yet ready to be merged label Jan 16, 2024
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

Might come back to some parts later on. Finished all files. Can you also update your branch to main as that makes it easier to checkout and build locally agains current main.

@lsiepel
Copy link
Contributor

lsiepel commented May 31, 2024

@jsjames are you able to proceed with this PR?

@jsjames
Copy link
Contributor Author

jsjames commented May 31, 2024 via email

@jsjames jsjames force-pushed the pentair2 branch 2 times, most recently from 167810d to 3660df8 Compare June 2, 2024 16:51
Signed-off-by: Jeff James <jeff@james-online.com>
Signed-off-by: Jeff James <jeff@james-online.com>
Signed-off-by: Jeff James <jeff@james-online.com>
@jsjames
Copy link
Contributor Author

jsjames commented Jun 10, 2024

@isiepel, should be ready to go.

@lsiepel
Copy link
Contributor

lsiepel commented Jun 10, 2024

nu.io dependency. Reworked some of the state changes in the basebridgehandler.

As there is only one milestone left with just a few days before stable release, i hope you can confirm this PR is well tested and confirmed by atleast some users to work well. If so, i can merge this. Otherwise i would prefer to postpone a merge to after the stable release.

@jsjames
Copy link
Contributor Author

jsjames commented Jun 10, 2024 via email

@lsiepel
Copy link
Contributor

lsiepel commented Jun 10, 2024

I have been using this for awhile and have shared built version for others to try over time. I can’t say it was exhaustively tested by others, but in my home system it works 1000% better than original. Having said that, if you want to do right after the the milestone, that is fine with me as well.

On Jun 10, 2024, at 1:11 PM, lsiepel @.***> wrote: nu.io dependency. Reworked some of the state changes in the basebridgehandler. As there is only one milestone left with just a few days before stable release, i hope you can confirm this PR is well tested and confirmed by atleast some users to work well. If so, i can merge this. Otherwise i would prefer to postpone a merge to after the stable release. — Reply to this email directly, view it on GitHub <#13485 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHUUTKSLBLBFHNL22UN4PLZGYB5ZAVCNFSM6AAAAAAQ4C6B46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJZGE4TQNJSHE. You are receiving this because you were mentioned.

That means it won’t be in 4.2 stable. It will be included in first 4.3 milestone. If that is ok, I’ll merge it later, but would be nice if we can get some feedback in the next two weeks and get it in 4.2

@lsiepel lsiepel added this to the 4.3 milestone Jun 28, 2024
@lsiepel
Copy link
Contributor

lsiepel commented Jul 8, 2024

Can you resolve the conflict? I will then merge this

@jsjames
Copy link
Contributor Author

jsjames commented Jul 8, 2024

Can you resolve the conflict? I will then merge this

This conflict was introduced when the PR to update the spelling in a log message. That log message no longer exists which caused the conflict. You can just overwrite the change in the master when you checkin this PR.

@lsiepel
Copy link
Contributor

lsiepel commented Jul 8, 2024

is conflict was introduced when the PR to update the spelling in a log message. That log message no longer exists which caused the conflict. You can just overwrite the change in the master when you checkin this PR.

I'm not comitting changes to this PR, as by then i can't merge this.

@jsjames
Copy link
Contributor Author

jsjames commented Jul 8, 2024

is conflict was introduced when the PR to update the spelling in a log message. That log message no longer exists which caused the conflict. You can just overwrite the change in the master when you checkin this PR.

I'm not comitting changes to this PR, as by then i can't merge this.

Okay - i was hoping you could just overwrite the previous accepted change. I'm not a git expert, so I'll try to figure out how to resolve the conflict.

Signed-off-by: jsjames <jeff@james-online.com>
@lsiepel lsiepel merged commit c0d2638 into openhab:main Jul 8, 2024
5 checks passed
@lsiepel
Copy link
Contributor

lsiepel commented Jul 8, 2024

Now this is merged, can you create an upgrade notice for the breaking change?
Should go here: https://github.com/openhab/openhab-distro/blob/main/distributions/openhab/src/main/resources/bin/update.lst#L1491

@jsjames
Copy link
Contributor Author

jsjames commented Jul 8, 2024

an also delete th

I added a [4.3.0] tag, hopefully that was correct.

@jsjames jsjames deleted the pentair2 branch July 8, 2024 22:27
psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Jul 12, 2024
…#13485)

* Updated per design review comments
* Added unitHint to Dimensionless items

Signed-off-by: Jeff James <jeff@james-online.com>
pgfeller pushed a commit to pgfeller/openhab-addons that referenced this pull request Sep 29, 2024
…#13485)

* Updated per design review comments
* Added unitHint to Dimensionless items

Signed-off-by: Jeff James <jeff@james-online.com>
Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
joni1993 pushed a commit to joni1993/openhab-addons that referenced this pull request Oct 15, 2024
…#13485)

* Updated per design review comments
* Added unitHint to Dimensionless items

Signed-off-by: Jeff James <jeff@james-online.com>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Oct 18, 2024
…#13485)

* Updated per design review comments
* Added unitHint to Dimensionless items

Signed-off-by: Jeff James <jeff@james-online.com>
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.

[pentair] Improvements to binding
8 participants