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 add product_appearance attribute to the basic information cluster (CON-1248) #1002

Closed
FMistrorigo opened this issue Jul 12, 2024 · 5 comments

Comments

@FMistrorigo
Copy link

Hi,
I wanted to add to my product the informations about color and finish, I found out this is possible in the attribute "product_appearance" of the cluster "basic information".
In my case the root node is created with the cluster basic information but the only attributes are node_label and cluster_revision, I know that using the function create_product_appearance it's possible to create the attribute.
image

I couldn't fins an example where this function is used, and in the documentation is not clear what parameters I have to provide in "value", "length" and "count".

What parameters do I have to provide if I want to display color: white and finish: satin when in the chip tool i use the command "./chip_tool basicinformation read product-appearance 1 0"?

Thanks

@github-actions github-actions bot changed the title How to add product_appearance attribute to the basic information cluster How to add product_appearance attribute to the basic information cluster (CON-1248) Jul 12, 2024
@shripad621git
Copy link
Contributor

@FMistrorigo , thanks for reporting the issue. The product appearance attribute can be set by creating a factory_partiton using esp-matter-mfg-tool. It is read using the DeviceInstanceInfoProvider implementation. We will add the support for the attribute soon.

@shripad621git
Copy link
Contributor

@FMistrorigo ,the change is now present in connectedhomeip here.
The product-appearanace attribute is read using the platform specific DeviceInstanceInfoProvider implementation
Till we update the submodule, you can apply do these changes accordingly in your connectedhomeip submodule and try out the product-appearance attribute in esp-matter.
For trying this out, you need to create factory partition containing the product-finish and product-color attributes.
For e.g:

  ./generate_esp32_chip_factory_bin.py -d 3434 -p 99663300 \
                                    --product-name ESP-lighting-app --product-id 0x8001 \
                                    --vendor-name Test-vendor --vendor-id 0xFFF2 \
                                    --hw-ver 1 --hw-ver-str DevKit  --product-finish polished --product-color navy

You can try out the factory script present here with the changes in the above PR for generating the factory partition.
You will have to enable the following options in the menuconfig for testing out the prodcut-appearance attribute.

CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER=y
CONFIG_ENABLE_ESP32_DEVICE_INSTANCE_INFO_PROVIDER=y

For more information on factory data, you can refer this link.

@shripad621git
Copy link
Contributor

@FMistrorigo , any updates on the issue.

@FMistrorigo
Copy link
Author

FMistrorigo commented Aug 7, 2024

Hi @shripad621git,

I didn't want to create a Factory partition only for these attributes, for the Device Instance Info Provider I use a custom one and I tried to implement the two functions in this way, so when the get functions were called the output was what I wanted, but it didn't work.
image

I decided to go back to the function create_product_appearance and did this:
image
(0x02 is Satin, and 0x0E is White)

Everything in the chip tool was working so I left it like this.

Tell me if ther's any problem in what I did.
Thanks.

@shripad621git
Copy link
Contributor

shripad621git commented Aug 28, 2024

@FMistrorigo , the above changes looks good to me if you don't want to use factory partition.

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