-
Notifications
You must be signed in to change notification settings - Fork 8.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
Update ZB-RGBCW.md #2730
base: master
Are you sure you want to change the base?
Update ZB-RGBCW.md #2730
Conversation
Small add to make it easier to use RGB settings for this bulb (and maybe others). |
@@ -93,3 +95,36 @@ It's not possible to read (`/get`) or write (`/set`) this value. | |||
The minimal value is `0` and the maximum value is `255`. | |||
The unit of this value is `lqi`. | |||
|
|||
### Conversion from returned XY to RGB |
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 don't think this should be documented here.
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 knew how hard it was to find how to do this conversion, I think you'd change your mind on that. There are well over 8 different ways to convert between X/Y and sRGB, and the way Z2M has chosen is not one of the "standard" methods.
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.
But this is generic for all bulbs, right?
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.
The formula in Z2M code for RGB to XY is treating them all the same. But the response curves for even Singled vs Hue bulbs are quite different.
The point being, when you put RGB into this bulb, Z2M creates an XY to send. The bulb replies with a reflection of the XY it achieved. If you're looking to get RGB back (to validate against what you sent), you never get it, which some home control systems treat as a failure.
If you don't think this should be documented here, I'm fine with placing it elsewhere.
Do you have any suggestions on where should it go? Minimally though I'd like to link to it from here as reference, since the bulb does exhibit the "takes RGB, but replies in XY" behavior. And this is where people are going to look first for hints on odd behavior.
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 I understand correctly, this formula is just for this device?
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.
It is for this and a few other generics (and many LED strips). It's explicitly not for a number of other bulbs that have their own specific color space (Hue, Linkind, and a couple others). Most of the latter will reply back with RGB if the user asks for RGB settings. This one replies to all requests (RGB, raw, etc) with the XY setting only. So the only way to validate that the RGB/raw value you sent was honored is by converting the returned XY to RGB.
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.
Then let's include it, can you move it above Notes END: Do not edit below this line -->
?
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.
Sorry. This fell through the cracks. Just seeing the e-mail of it going stale. Will update this week when I get the chance.
Add details about XY/RGB conversion.
This pull request is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days |
Small change to add details about XY/RGB conversion used for this bulb (and possibly others.)