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

[salus] Initial contribution #16065

Merged
merged 196 commits into from
May 26, 2024
Merged

[salus] Initial contribution #16065

merged 196 commits into from
May 26, 2024

Conversation

magx2
Copy link
Contributor

@magx2 magx2 commented Dec 15, 2023

[salus] Initial contribution

Description

This is a new binding that is responsible to connect to Salus Cloud. Please refer to README.md to get more information.

@magx2 magx2 requested a review from a team as a code owner December 15, 2023 16:08
@lolodomo lolodomo added the new binding If someone has started to work on a binding. For a new binding PR. label Dec 15, 2023
@lsiepel lsiepel changed the title Salus [salus] Initial contribution Dec 15, 2023
@magx2

This comment was marked as resolved.

@magx2

This comment was marked as resolved.

Copy link
Member

@holgerfriedrich holgerfriedrich left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!
This is not a full review, just a few comments.

Besides that, a few things need to be resolved:

  • please check SAT warnings, mvn verify will create target/summary_report.html... it should be at least closer to 0
  • too many compilation warnings (Null) - maybe a few vanish when you resolve SAT warnings
  • SAT shows a forbidden package StringUtils - maybe @lolodomo can comment on this, we have some utils in core as well....

i18n seems ok, javadoc build is fine as well.

@magx2

This comment was marked as resolved.

@magx2

This comment was marked as resolved.

@magx2

This comment was marked as resolved.

@holgerfriedrich
Copy link
Member

@holgerfriedrich FYI the build is failing because if formatter, but those are not my classes (main build is also failing)

give it a few hours to settle, Kai is creating the 4.1 release....

Copy link
Member

@holgerfriedrich holgerfriedrich left a comment

Choose a reason for hiding this comment

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

Great progress, thanks!

Lets take a look at the other topics:

  • apache.commons should removed. See Removal of dependency on 'org.apache.commons.*' #7722. I marked a few easy things. Could you please care for replacing Pair?
  • Still a lot of null warnings, a few seem to be correct and need additional checks in the code. See also my comment in the source file for one example. I have also seen a null check before accessing a variable - but there is still a warning, as the variable might be changed in the background. To avoid the warning, work with a local copy, do the null check on the copy, call the methods on the copy.
    I think in the tests - especially when using mockito - the warnings could be suppressed, but I leave that to a maintainer.
  • I noticed that you are using type inference a lot (var). I was previously asked to remove this. But that is something for a maintainer to comment on as well....

@magx2

This comment was marked as resolved.

@holgerfriedrich
Copy link
Member

Pushed changes for nulls

Thanks, this is really good progress.
I think you could remove the suppression statements - as we have a very restricted set if allowed suppressions.

@magx2

This comment was marked as resolved.

@holgerfriedrich
Copy link
Member

I think you could remove the suppression statements - as we have a very restricted set if allowed suppressions.

Hmm, but they are suppressing staff

Did not check, I interpreted the warning as if they would have been ignored.....

@holgerfriedrich
Copy link
Member

@magx2 I think that is all I can help here. My comments have been addressed.

@magx2

This comment was marked as resolved.

@holgerfriedrich
Copy link
Member

Thanks! What's the next steps?

Wait for a maintainer to pick this up. This usually takes time...

@lsiepel
Copy link
Contributor

lsiepel commented Dec 30, 2023

It would also be usefull to add yourself to the codeowner file, so that in future PR's you are automatically added as reviewer.

@magx2

This comment was marked as resolved.

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.

Thanks for your contribution!
Ran out of time, so no full review, just quick comments. I reviewed the bridgehandler and when looking at the device handler i would repeat most comments. Please check if the comments also apply to other classes.
Ping when you're ready and i'll proceed with the review.

magx2 and others added 22 commits May 26, 2024 12:05
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: Martin <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: Martin <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
…nding/salus/internal/rest/SalusApiException.java

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: Martin <martin.grzeslowski@gmail.com>
…8n/salus.properties

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: Martin <martin.grzeslowski@gmail.com>
Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: Martin <martin.grzeslowski@gmail.com>
@magx2
Copy link
Contributor Author

magx2 commented May 26, 2024

@lsiepel I've applied your changes.

Also testing of the plugin was already done by my (after each major change I'm deploying Salus binding in my own OH instance)

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.

@lsiepel lsiepel merged commit 38e4f22 into openhab:main May 26, 2024
5 checks passed
@lsiepel lsiepel added this to the 4.2 milestone May 26, 2024
@magx2 magx2 deleted the salus branch June 3, 2024 14:03
psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Jun 15, 2024
* Init salus binding

Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
Co-authored-by: Holger Friedrich <mail@holger-friedrich.de>
Co-authored-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new binding If someone has started to work on a binding. For a new binding PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants