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

[shelly] BLU Motion, optimize ShellyManager for BLU devices #15401

Merged
merged 6 commits into from
Nov 18, 2023

Conversation

markus7017
Copy link
Contributor

@markus7017 markus7017 commented Aug 10, 2023

The PR includes the following enhancements and fixes. Most changes are related to device discovery and initialization as well as BLU motion support. The other topics are small fixes, we were able to catch a bunch of them.

Signed-off-by: Markus Michels [email protected]

@markus7017 markus7017 added bug An unexpected problem or unintended behavior of an add-on enhancement An enhancement or new feature for an existing add-on labels Aug 10, 2023
@markus7017 markus7017 self-assigned this Aug 10, 2023
@markus7017
Copy link
Contributor Author

@lsiepel changes applied

@markus7017
Copy link
Contributor Author

@lsiepel anything missing?

@lsiepel
Copy link
Contributor

lsiepel commented Aug 16, 2023

@lsiepel anything missing?

I don't have shelly devices and this binding is not known area to me, so i guess it's better for others to review.

@markus7017
Copy link
Contributor Author

@openhab/add-ons-maintainers Could somebody please pick-up this PR

@lolodomo
Copy link
Contributor

@markus7017 : why you don't create different small PRs for each fixed issue or new enhancement ? I am sure you will get quicker feedback. Recommendation for new PRs.

@markus7017
Copy link
Contributor Author

@lolodomo 90% (about 270 lines) are dependent on BLU motion, required changes to general initialization and decided to do
some cleanup related to that. The remaining 30 lines are related to small fixes I found along the way.

Creating a separate PR for every logic change or bug fix creates a lot of overhead and makes it hard to manage PRs in parallel. Due to longer response times I have already a bunch of new changes I kept out of this PR to keep it small. Allterco is delivering a lot of nee devices, which change a) in direct changes b) require changes to the generic logic and c) maybe bugs need to be fixed. So it's unrealistic to serialize those changes, complete one by the other and the create a dozen 50 line PRs.

Do I need to remove the 30 lines bug fixes and crate another PR for those?

@lolodomo
Copy link
Contributor

Do I need to remove the 30 lines bug fixes and crate another PR for those?

Let's keep them.
My comment was only an advice for the future.

@lolodomo
Copy link
Contributor

Note that there is one file in conflict.

@lolodomo
Copy link
Contributor

lolodomo commented Oct 8, 2023

@markus7017 : I reviewed fully your PR. There is one important comment to consider. Please also note that a file conflict has to be resolved.

@lolodomo
Copy link
Contributor

lolodomo commented Oct 8, 2023

@markus7017 : I do not know if you are available now. There is a new milestone build that will start in few hours. If you can consider my comments and resolve the conflict, I will try to merge your PR just in time for the new milestone.

@markus7017
Copy link
Contributor Author

@lolodomo I was busy the last weeks, just working on this PR and 2 important fixes

@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/oh4-runs-out-of-memory/148699/93

@markus7017
Copy link
Contributor Author

@lolodomo one question: pom.xml still includes a dependency on org.eclipse.jetty.websocket. Is this still required? Should I keep it for backward compatibility?

@jlaur
Copy link
Contributor

jlaur commented Oct 21, 2023

Do I need to remove the 30 lines bug fixes and crate another PR for those?

Let's keep them. My comment was only an advice for the future.

[...]

I was busy the last weeks, just working on this PR and 2 important fixes

I will not interfere with the agreement between you and @lolodomo, but just add that if those fixes are important/critical for 4.0 as well, I would advise you to create a separate PR with them so we can cherry-pick them into 4.0.x.

Also, I noticed many issues mentioned in the PR description. @markus7017, can you link those issues that will be closed by this PR? When they are linked, they will be automatically closed when the PR is merged, so it would make it easier to manage.

@lolodomo
Copy link
Contributor

@lolodomo one question: pom.xml still includes a dependency on org.eclipse.jetty.websocket. Is this still required? Should I keep it for backward compatibility?

That's strange, why did you do that first ?? You should rely on current version of Jetty "packaged" with OH server. We are currently at 9.4.52.v20230823 after upgrading to Karaf 4.4.4.
openhab/openhab-core#3814

@lolodomo
Copy link
Contributor

@markus7017 : you marked all my comments as resolved without pushing any changes !

@markus7017 markus7017 added the work in progress A PR that is not yet ready to be merged label Oct 22, 2023
@markus7017
Copy link
Contributor Author

Also, I noticed many issues mentioned in the PR description. @markus7017, can you link those issues that will be closed by this PR? When they are linked, they will be automatically closed when the PR is merged, so it would make it easier to manage.

Hmm, I reviewed the above list, which is correct. Most of them were tiny fixes, one line or so.
#15393 is not a must, more a simplified handling for the user
#15398 caused duplicate entries in the Inbox
#15397 is a must for firmware 1.0+ and password protected devices due to strict RFC-based implementation
#15932 is cosmetics
#15350 an enhancement for new device
#15396 improved user experience
#15395 caused initialization failure for the Plus HT sensor
#15394 enhancement
#15393 fixes an initialization problem for TRV

and this one includes 2 fixes for resource leaks when discovery handler fails (NOE+IPv6)

All of them would be useful to fixes (serious) issues or little improvements. So would make sense also to get into 4.0.
@jlaur @lolodomo Let me now to to proceed. I could create another PR and fiddle out those lines included to the agreed list.

@markus7017
Copy link
Contributor Author

I know, I need to do a rebase and to double check that all resource leak fixes are included

@markus7017 markus7017 changed the title [shelly] Fixes Gen2 Auth, add BLU Motion, improve discovery, optimize ShellyManager for BLU devices [shelly] BLU Motion, improve discovery, optimize ShellyManager for BLU devices Nov 15, 2023
@markus7017 markus7017 changed the title [shelly] BLU Motion, improve discovery, optimize ShellyManager for BLU devices [shelly] BLU Motion, il, optimize ShellyManager for BLU devices Nov 15, 2023
@markus7017 markus7017 changed the title [shelly] BLU Motion, il, optimize ShellyManager for BLU devices [shelly] BLU Motion, optimize ShellyManager for BLU devices Nov 15, 2023
@markus7017 markus7017 added the awaiting other PR Depends on another PR label Nov 15, 2023
Signed-off-by: Markus Michels <[email protected]>
Signed-off-by: Markus Michels <[email protected]>
Signed-off-by: Markus Michels <[email protected]>
Signed-off-by: Markus Michels <[email protected]>
@markus7017
Copy link
Contributor Author

@lolodomo This is the left-over based one the 2 PRs before :-)

Signed-off-by: Markus Michels <[email protected]>
@markus7017
Copy link
Contributor Author

@lolodomo requested changes applied

@lolodomo
Copy link
Contributor

@lolodomo requested changes applied

One comment in README you marked as resolved but you did not fix.

Please add these kind of entries in the future for an automatic closing of issues.

Closes #15359
Closes #15396

Signed-off-by: Markus Michels <[email protected]>
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

LGTM, thank you

@markus7017
Copy link
Contributor Author

@lolodomo requested changes applied

One comment in README you marked as resolved but you did not fix.

Please add these kind of entries in the future for an automatic closing of issues.

Closes #15359 Closes #15396

@lolodomo
Isn't that done automatically when I add the issues under "Development" on the right side?
In addition Closes #15909

changes applied

@lolodomo lolodomo merged commit a535caa into openhab:main Nov 18, 2023
3 checks passed
@lolodomo lolodomo added this to the 4.1 milestone Nov 18, 2023
@markus7017
Copy link
Contributor Author

@lolodomo thank you!!

@lolodomo
Copy link
Contributor

@lolodomo thank you!!

As you can notice, small PR = faster review

andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Nov 26, 2023
austvik pushed a commit to austvik/openhab-addons that referenced this pull request Mar 27, 2024
@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/shelly-binding/56862/3892

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
Projects
None yet
7 participants