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

How to set the range of light color temperature and physical properties #126

Open
cheng5230 opened this issue Jun 17, 2024 · 6 comments
Open

Comments

@cheng5230
Copy link

How to Set Lamp Color Temperature Range of Physical Properties ColorTempPhysicalMaxMireds
ColorTempPhysicalMinMireds Adapt to the maximum and minimum values ​​of color temperature under different device apps
image

thanks。

@xshuqun
Copy link
Collaborator

xshuqun commented Jun 19, 2024

Do you mean to set values for your lamp according to ColorControl attribute ColorTempPhysicalMaxMireds and ColorTempPhysicalMinMireds?

Thank you.

@cheng5230
Copy link
Author

Do you mean to set values for your lamp according to ColorControl attribute ColorTempPhysicalMaxMireds and ColorTempPhysicalMinMireds?

Thank you.

yes ;Set the range of ColorTempPhysicalMaxMireds and ColorTempPhysical MinMireds in the ColorControl property to limit the distribution value of the app's color temperature。
Thanks

@xshuqun
Copy link
Collaborator

xshuqun commented Jun 24, 2024

You can adjust the range in the zap file and during runtime, you can use the following to Set and Get the attribute, if needed.

getstatus = Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::Set(1, SetMaxTemp);
VerifyOrExit(getstatus == Status::Success, err = CHIP_ERROR_INTERNAL);

getstatus = Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::Set(1, SetMinTemp);
VerifyOrExit(getstatus == Status::Success, err = CHIP_ERROR_INTERNAL);

getstatus = Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::Get(1, &GetMaxTemp);
VerifyOrExit(getstatus == Status::Success, err = CHIP_ERROR_INTERNAL);

getstatus = Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::Get(1, &GetMinTemp);
VerifyOrExit(getstatus == Status::Success, err = CHIP_ERROR_INTERNAL);

Thank you

@cheng5230
Copy link
Author

You can adjust the range in the zap file and during runtime, you can use the following to Set and Get the attribute, if needed.

getstatus = Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::Set(1, SetMaxTemp);
VerifyOrExit(getstatus == Status::Success, err = CHIP_ERROR_INTERNAL);

getstatus = Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::Set(1, SetMinTemp);
VerifyOrExit(getstatus == Status::Success, err = CHIP_ERROR_INTERNAL);

getstatus = Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::Get(1, &GetMaxTemp);
VerifyOrExit(getstatus == Status::Success, err = CHIP_ERROR_INTERNAL);

getstatus = Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::Get(1, &GetMinTemp);
VerifyOrExit(getstatus == Status::Success, err = CHIP_ERROR_INTERNAL);

Thank you
log err
chip[ZCL] 0xe1412a6 ep 1 clus 0x0000_0300 attr 0x0000_400C not supported
chip[ZCL] 0xe1412a6 ep 1 clus 0x0000_0300 attr 0x0000_400B not supported
微信截图_20240624114940
thanks

@xshuqun
Copy link
Collaborator

xshuqun commented Jun 24, 2024

Which endpoint have you enabled ColorControl?
The code Get/Set(1, SetMaxTemp), 1 is the endpoint, and SetMaxTemp is the value, you can change according to your application.

Thank you

@cheng5230
Copy link
Author

Which endpoint have you enabled ColorControl? The code Get/Set(1, SetMaxTemp), 1 is the endpoint, and SetMaxTemp is the value, you can change according to your application.

Thank you
endpoint 1 enabled ColorControl
image
thanks

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

No branches or pull requests

2 participants