-
-
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
[bticinosmarther] Initial contribution #7533
Conversation
Travis tests were successfulHey @MrRonfo, |
Travis tests were successfulHey @MrRonfo, |
1 similar comment
Travis tests were successfulHey @MrRonfo, |
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.
You put a lot of effort into this binding. There are only minor improvements, I found.
I'm not that familiar with servlets. Another reviewer should take a closer look into this part.
bundles/org.openhab.binding.smarther/src/main/resources/ESH-INF/binding/binding.xml
Outdated
Show resolved
Hide resolved
...java/org/openhab/binding/smarther/internal/api/exception/SmartherAuthorizationException.java
Outdated
Show resolved
Hide resolved
.../main/java/org/openhab/binding/smarther/internal/api/exception/SmartherGatewayException.java
Outdated
Show resolved
Hide resolved
.../java/org/openhab/binding/smarther/internal/api/exception/SmartherNotificationException.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.
Thanks @fwolter for your kind suggestions, I'll try to review them by today.
Hi @fwolter, after having accepted few of your PR reviews here via github I found more practical to apply all of them locally, review and just commit once. |
Before you can push your changes, you have to rebase your local branch to incorporate your changes you done via the GitHub webinterface. |
@fwolter thanks, done but had signoff issue, so DCO suggested to resolve with:
Applied on my local copy but I think it messed up something, as I can see commits added for other bindings which actually weren't on my branch :| Sorry to the other guys over there I accidentally requested a review to... |
Travis tests have failedHey @MrRonfo, |
Seems like you did a rebase on an old 2.5.x branch. First, make a backup of your local repo. Then, you can delete the five foreign commits by interactive rebase: |
@fwolter thank you so much for your kind support, it seems to me the binding codebase is now ok. |
Travis tests have failedHey @MrRonfo, |
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.
If you rename the package org.openhab.binding.smarther.internal.api.model
to org.openhab.binding.smarther.internal.api.dto
you'd get rid of several NonNullByDefault warnings.
You repalced the Joda calls with the old Date
API. The vast majority of Joda has been merged into Java. You don't have to re-implement e.g. plusDays
. Take a look at ZonedDateTime
or Instant
if UTC is sufficent.
...g.smarther/src/main/java/org/openhab/binding/smarther/internal/api/SmartherApiConnector.java
Outdated
Show resolved
Hide resolved
...ab.binding.smarther/src/main/java/org/openhab/binding/smarther/internal/util/StringUtil.java
Outdated
Show resolved
Hide resolved
...ab.binding.smarther/src/main/java/org/openhab/binding/smarther/internal/util/StringUtil.java
Outdated
Show resolved
Hide resolved
...ab.binding.smarther/src/main/java/org/openhab/binding/smarther/internal/util/StringUtil.java
Outdated
Show resolved
Hide resolved
Thanks again @fwolter for your code review. All suggestions merged and pushed here. I've noted that Travis CI is failing, it seems, due to my codebase being on OH 2.5.5 while it's now expecting to build agains OH 2.5.6. |
Correct, rebase will do the job. |
@fwolter noted, thanks. So no risk the whole locally rebased code of origin/2.5.x to be also added to this PR, when I'll push new code fixes to my remote Smarther branch ? |
Yes. If you're unsure, make a backup of your local repo. If you messed up something you can do a force-push from your backup, although it's not elegant. |
Travis tests were successfulHey @MrRonfo, |
Fixed the Bridge thing transition to Unknown status in initialize method, moving it after variables initialization so that handleCommand() is eventually called only after. Signed-off-by: Fabio Possieri <[email protected]>
Changed wrong use of NonNullByDefault with Nullable wherever found, removed OSGI component declaration in ThingHandlerService, fixed unit attribute in config.xml Signed-off-by: Fabio Possieri <[email protected]>
Signed-off-by: Fabio Possieri <[email protected]>
Added syntax exception handling to Json parsing calls, optimized reading new notification from servlet request, fixed module discovery service. Signed-off-by: Fabio Possieri <[email protected]>
Just refactored the binding naming to bticinosmarther (smarther alone was too generic), as BTicino also provides other protocols that can be integrated over time in OH by other developers Signed-off-by: Fabio Possieri <[email protected]>
Travis tests have failedHey @MrRonfo, |
Signed-off-by: Fabio Possieri <[email protected]>
Travis tests were successfulHey @MrRonfo, |
@cpmeister @fwolter
I see "changes approved": does that mean that the binding can be merged or is there anything else to be done here? |
@MrRonfo The renaming makes sense to me, thanks. |
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.
Thanks for your patience, @MrRonfo, here are my promised comments :-)
@kaikreuzer thanks for your suggestions, really appreciated. I've added few questions. I'll commit all the changes as soon as I get your feedback. |
Done - I hope I answered all questions. If I have missed any, please let me know :-) |
Aligned README to OH template, fixed config locations fetch channel for Bridge thing and config programs fetch channel for Module thing, moved accessToken info from channel to log at trace level. Signed-off-by: Fabio Possieri <[email protected]>
Travis tests were successfulHey @MrRonfo, |
Thanks a lot @kaikreuzer. |
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.
Thanks for your very quick updates, @MrRonfo - lgtm now, so let's merge! 👍
Signed-off-by: Fabio Possieri <[email protected]>
Signed-off-by: Fabio Possieri <[email protected]> Signed-off-by: CSchlipp <[email protected]>
Signed-off-by: Fabio Possieri <[email protected]> Signed-off-by: MPH80 <[email protected]>
Signed-off-by: Fabio Possieri <[email protected]>
Signed-off-by: Fabio Possieri <[email protected]>
Signed-off-by: Fabio Possieri <[email protected]>
Signed-off-by: Fabio Possieri <[email protected]>
Signed-off-by: Fabio Possieri <[email protected]> Signed-off-by: Daan Meijer <[email protected]>
Signed-off-by: Fabio Possieri <[email protected]>
[bticinosmarther] Initial contribution
The BTicino Smarther binding implements a bridge to the C2C Legrand/Bticino Smarther v2.0 API and allows users to control their BTicino Smarther chronothermostat units (all models) with openHAB.
BTicino Smarther units have their own API set and doesn't conform to the OpenWebNet protocol.
Main thread in openHAB Community on this binding:
Companion HABPanel widget for this binding:
Other threads in openHAB Community where the idea to build this binding came from:
Signed-off-by: Fabio Possieri [email protected]