-
-
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
[nanoleaf] Refactored code to use core features and more #10101
Conversation
@stefan-hoehn Would be great if you could also review & test with your setup. |
This is a bigger refactoring bringing these (breaking) changes: - System channel types are used where applicable - Obsolete channels (such as power) were removed - Some channel types were marked "advanced" - "Tap" channels were converted to a trigger channel type providing a "system button" behavior - Layout can now be requested by a console command - Command options for effect channel are dynamically provided - Log level has been reduced where appropriate - HTTP request timeouts were reduced - handleRemoval now returns quickly as expected - Fixed hanging thread / infinite loop when requesting layouts for non-square panels - Various other smaller enhancements and fixes - Documentation has been adapted accordingly Signed-off-by: Kai Kreuzer <kai@openhab.org>
First of all, Kai, thanks a lot for working on the binding. I really appreciate that. I am eager to review but I probably need to take some time to understand what you have done (though I am sure that there hardly will be any comment from my side as you are much more experienced that I am). How quickly do you need my review? And second question: How would I actually try out the pull request? What is the right way to do that? Just do a "git clone" from your repo fork onto my machine and test it? And third question: Are all chances backward compatible? In some cases I was hesitant to change something because I was afraid people would need to recreate things (or items) as at least in one case I know that a user has around 200 of them? |
It is enough if you roughly scan through it - I just wanted to make sure to keep you in the loop of code changes as you are actively working on it as well. If you only want to test it to ensure that nothing is broken with your devices, that'll be just fine as well.
If you want to test it from source code in your IDE you can do
Otherwise just use this jar for testing: org.openhab.binding.nanoleaf-3.1.0-SNAPSHOT.zip (rename it to .jar)
As mentioned in the description ("partially breaking"), unfortunately no. |
I just checked - the ThingUID actually stays the same upon re-discovery, so I revert my comment that it might be nasty. Only the use of the changed channels might be required to be adapted, but overall the setup should still work. @openhab/add-ons-maintainers I'd hence say it should be good to merge and I'll add a PR for distro wrt mentioning the breaking change. |
First of all, Kai, I am really sorry for delay. I currently have a lot of business and private obligations and as I take the development binding seriously I just wanted to do the review thoroughly. The reason I am a bit hesitant is the breaking change of the channels as you mentioned which I wanted to test first. I always tried not to break anything for the user, so two things about that:
I have reviewed all the non-breaking changes and I am sure given your expertise this is more than welcome for the binding. I unfortunately haven't had the chance to actually try out the binding. I intend to do so during the next week. thanks for taking the your time on the nanoleaf binding changes, |
No worries, @stefan-hoehn, we are all very busy with other things in life besides openHAB ;-) Wrt your questions:
Hope this clarifies your questions a bit! |
Signed-off-by: Kai Kreuzer <kai@openhab.org>
Sorry for the long delay but as discussed offline I experienced a lot of issues during test not caused but some revealed by this PR, so I wanted to make sure that I know what is happening. For the curious here is a link to the related thread: |
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 Kai for taking the time to improve the binding. Everything looks fine from my perspective.
@openhab/add-ons-maintainers Would be nice to get a review then, so that this can be finally merged! |
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.
I think it looks good! I have a few minor comments:
...af/src/main/java/org/openhab/binding/nanoleaf/internal/command/NanoleafCommandExtension.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Wouter Born <github@maindrain.net>
Co-authored-by: Wouter Born <github@maindrain.net>
Co-authored-by: Wouter Born <github@maindrain.net>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
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.
Thank you!
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.
Fine from my side
This is a bigger refactoring bringing these (breaking) changes: - System channel types are used where applicable - Obsolete channels (such as power) were removed - Some channel types were marked "advanced" - "Tap" channels were converted to a trigger channel type providing a "system button" behavior - Layout can now be requested by a console command - Command options for effect channel are dynamically provided - Log level has been reduced where appropriate - HTTP request timeouts were reduced - handleRemoval now returns quickly as expected - Fixed hanging thread / infinite loop when requesting layouts for non-square panels - Various other smaller enhancements and fixes - Documentation has been adapted accordingly Signed-off-by: Kai Kreuzer <kai@openhab.org> Signed-off-by: John Marshall <john.marshall.au@gmail.com>
This is a bigger refactoring bringing these (breaking) changes: - System channel types are used where applicable - Obsolete channels (such as power) were removed - Some channel types were marked "advanced" - "Tap" channels were converted to a trigger channel type providing a "system button" behavior - Layout can now be requested by a console command - Command options for effect channel are dynamically provided - Log level has been reduced where appropriate - HTTP request timeouts were reduced - handleRemoval now returns quickly as expected - Fixed hanging thread / infinite loop when requesting layouts for non-square panels - Various other smaller enhancements and fixes - Documentation has been adapted accordingly Signed-off-by: Kai Kreuzer <kai@openhab.org>
This is a bigger refactoring bringing these (breaking) changes: - System channel types are used where applicable - Obsolete channels (such as power) were removed - Some channel types were marked "advanced" - "Tap" channels were converted to a trigger channel type providing a "system button" behavior - Layout can now be requested by a console command - Command options for effect channel are dynamically provided - Log level has been reduced where appropriate - HTTP request timeouts were reduced - handleRemoval now returns quickly as expected - Fixed hanging thread / infinite loop when requesting layouts for non-square panels - Various other smaller enhancements and fixes - Documentation has been adapted accordingly Signed-off-by: Kai Kreuzer <kai@openhab.org>
This is a bigger refactoring bringing these (breaking) changes: - System channel types are used where applicable - Obsolete channels (such as power) were removed - Some channel types were marked "advanced" - "Tap" channels were converted to a trigger channel type providing a "system button" behavior - Layout can now be requested by a console command - Command options for effect channel are dynamically provided - Log level has been reduced where appropriate - HTTP request timeouts were reduced - handleRemoval now returns quickly as expected - Fixed hanging thread / infinite loop when requesting layouts for non-square panels - Various other smaller enhancements and fixes - Documentation has been adapted accordingly Signed-off-by: Kai Kreuzer <kai@openhab.org>
This is a bigger refactoring bringing these (partially breaking) changes:
Signed-off-by: Kai Kreuzer kai@openhab.org