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

[knx] Add support for RGBW represented by HSBType #16078

Merged
merged 1 commit into from Jan 26, 2024

Conversation

holgerfriedrich
Copy link
Member

Allow lossy conversion from RGBW to HSBType and back instead of using separate items for RGB and W.
Select via DPT 251.60600.

RGBW (DPT 251.600) can either be converted to HSBType, or be represented two items: a HSBType for RGB and an additional PercentType for W channel.
Default handling for RGBW is to use separate items.
Note that this also requires two frames being sent out separately when these elements are sent to the bus, as the binary representation uses a partially populated KNX frame.
Alternatively, a single HSB item can be used. Conversion to a single HSBType will loose the exact setting for W, and will reconstruct it when a conversion to RGBW is required.
This option can be selected using the special DPT 251.60600.

@holgerfriedrich holgerfriedrich added the enhancement An enhancement or new feature for an existing add-on label Dec 18, 2023
@holgerfriedrich
Copy link
Member Author

@genesis81 Sorry this comes way later than expected. It replaces #15773 and comes with the benefit that users can choose between using 2 items to control RGB and W separately or converting to a single HSBType. Would you like to test it?

@genesis81
Copy link
Contributor

@genesis81 Sorry this comes way later than expected. It replaces #15773 and comes with the benefit that users can choose between using 2 items to control RGB and W separately or converting to a single HSBType. Would you like to test it?

Thank you for the support. I'm this week a little bit busy but i try to test and give you a feedback

Allow lossy conversion from RGBW to HSBType and back instead
of using separate items for RGB and W.
Select via DPT 251.60600.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
@lsiepel
Copy link
Contributor

lsiepel commented Jan 18, 2024

@genesis81 Sorry this comes way later than expected. It replaces #15773 and comes with the benefit that users can choose between using 2 items to control RGB and W separately or converting to a single HSBType. Would you like to test it?

Thank you for the support. I'm this week a little bit busy but i try to test and give you a feedback

You had any luck testing the change?

@genesis81
Copy link
Contributor

@genesis81 Sorry this comes way later than expected. It replaces #15773 and comes with the benefit that users can choose between using 2 items to control RGB and W separately or converting to a single HSBType. Would you like to test it?

I have tested and works very well.
Thank you for the support.

Short video of my test:
https://github.com/openhab/openhab-addons/assets/382387/d8d355fa-a0aa-4c2c-a5c3-6609b03a1b96

@holgerfriedrich
Copy link
Member Author

Nice demo, @genesis81, thank you!

@lsiepel Could you go forward and review / merge this one? Thanks!

@lsiepel
Copy link
Contributor

lsiepel commented Jan 20, 2024

Nice demo, @genesis81, thank you!

@lsiepel Could you go forward and review / merge this one? Thanks!

LGTM, but I prefer a comment from @kaikreuzer as codeowner before I merge. He is also more familiar to rgbw/hsb conversions discussions from the past, not sure if they apply here.

@holgerfriedrich
Copy link
Member Author

@lsiepel Fine for me, let's wait for @kaikreuzer s input. Maybe he has additional comments.
FYI: Since the last big restructuring last year we both are code owners of KNX binding.

Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

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

LGTM

@holgerfriedrich
Copy link
Member Author

@lsiepel Could we continue with this one, please? Video and approval by J-N-K should be fine for a merge...

@lsiepel
Copy link
Contributor

lsiepel commented Jan 26, 2024

@lsiepel Could we continue with this one, please? Video and approval by J-N-K should be fine for a merge...

Yes, had some busy days.

@lsiepel lsiepel merged commit e68897c into openhab:main Jan 26, 2024
3 checks passed
@lsiepel lsiepel added this to the 4.2 milestone Jan 26, 2024
@holgerfriedrich holgerfriedrich deleted the pr-knx-rgbwspecial branch January 26, 2024 21:20
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Jan 27, 2024
Allow lossy conversion from RGBW to HSBType and back instead
of using separate items for RGB and W.
Select via DPT 251.60600.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
ulbi pushed a commit to ulbi/openhab-addons that referenced this pull request Jan 28, 2024
Allow lossy conversion from RGBW to HSBType and back instead
of using separate items for RGB and W.
Select via DPT 251.60600.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: René Ulbricht <rene_ulbricht@outlook.com>
austvik pushed a commit to austvik/openhab-addons that referenced this pull request Mar 27, 2024
Allow lossy conversion from RGBW to HSBType and back instead
of using separate items for RGB and W.
Select via DPT 251.60600.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
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
Development

Successfully merging this pull request may close these issues.

[knx] Add support for DPT 251.600 for RGBW colour
4 participants