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

Dynamic change of attributes and/or features (CON-1134) #912

Closed
jzwyssig opened this issue Apr 29, 2024 · 5 comments
Closed

Dynamic change of attributes and/or features (CON-1134) #912

jzwyssig opened this issue Apr 29, 2024 · 5 comments

Comments

@jzwyssig
Copy link

Is it feasible to dynamically alter an attribute? For instance, let's take a color temperature light that's already paired. Through an OTA update, I add the capability to adjust the color temperature range. In esp-matter, I set ColorTempPhysicalMinMireds and ColorTempPhysicalMaxMireds, which functions well for newly added lights but not for existing ones.

Another scenario: Imagine a generic switch that initially only supports short-press functionality. With an OTA update, I also enable long-press functionality. However, the switch's UI in Apple Homekit doesn't adapt accordingly to support the long-press feature. This adjustment works seamlessly when adding a new generic switch.

I believe this applies to both bridged endpoints and standard nodes with endpoints. I would like to know if there's a way to refresh an existing endpoint without the need to remove and re-add it.

@github-actions github-actions bot changed the title Dynamic change of attributes and/or features Dynamic change of attributes and/or features (CON-1134) Apr 29, 2024
@jadhavrohit924
Copy link
Contributor

@jzwyssig You cannot alter the attributes/features after your endpoint is enabled. If you want to add new functionality to a existing light you should enable the attributes/features before matter starts.

If you want to add new attributes/features after matter starts you can always use esp_matter::start this will recreate the esp-matter data model

@jzwyssig
Copy link
Author

@jadhavrohit924 thank you but I think you misunderstood me. I call esp_matter::start after I have added the attributes or features. But the code that I added won't update the UI of an already paired fabric.
For example:

  1. Pair generic switch with short press only
  2. Change programm code such that long press is added as a feature
  3. Restart -> generic switch with feature long press is loaded, then esp_matter::start is called.

Problem: The Homekit UI does not update accordingly.

@jonsmirl
Copy link
Contributor

jonsmirl commented May 3, 2024

Did you change the feature map to add MSL? If you already had MSL set, you shouldn't have. It should only be set if LongPress is implemented.

@jonsmirl
Copy link
Contributor

jonsmirl commented May 3, 2024

3.2.7.20. ColorTempPhysicalMinMireds Attribute
The ColorTempPhysicalMinMireds attribute indicates the minimum mired value supported by the
hardware. ColorTempPhysicalMinMireds corresponds to the maximum color temperature in
kelvins supported by the hardware. ColorTempPhysicalMinMireds <= ColorTemperatureMireds.
3.2.7.21. ColorTempPhysicalMaxMireds Attribute
The ColorTempPhysicalMaxMireds attribute indicates the maximum mired value supported by the
hardware. ColorTempPhysicalMaxMireds corresponds to the minimum color temperature in
kelvins supported by the hardware. ColorTemperatureMireds <= ColorTempPhysicalMaxMireds.

Those probably should have been marked Fixed in the spec. They are hardware properties.

@jadhavrohit924
Copy link
Contributor

@jzwyssig Is this still an issue? If so, can you please update me?

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

3 participants