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

Update ZB-RGBCW.md #2730

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update ZB-RGBCW.md #2730

wants to merge 1 commit into from

Conversation

Woody14619
Copy link

Small change to add details about XY/RGB conversion used for this bulb (and possibly others.)

@Woody14619
Copy link
Author

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
Copy link
Owner

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.

Copy link
Author

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.

Copy link
Owner

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?

Copy link
Author

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.

Copy link
Owner

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?

Copy link
Author

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.

Copy link
Owner

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 -->?

Copy link
Author

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.
Copy link
Contributor

github-actions bot commented Nov 4, 2024

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

@github-actions github-actions bot added the Stale label Nov 4, 2024
@github-actions github-actions bot removed the Stale label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants