-
Notifications
You must be signed in to change notification settings - Fork 155
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
Need guide for using manufacturer-specific clusters (CON-235) #187
Comments
I tried coding this up in the CHIP source tree. It is not so hard to add the XML to define a custom cluster. But... once you do that you then have to rebuild the IOS and Android (and C?) client libraries which is a pain to do since they experience constant breakage. For example the code generated for Android is not just java code, there are hundreds of lines of C code generated too and this C code has to be in the Android CHIP libraries for the custom cluster to work. The bigger problem here is reliably rebuilding the IOS and Android client libraries every time you make a tweak to your custom cluster. I consider this poor design on the part of CHIP to require a rebuild of the IOS/Android client libraries to implement a custom cluster. |
Current status: On IOS there is no issue building an app using custom CHIP clusters. That's because IOS supports accessing the cluster by number (instead of name). Since the Android libs don't support access by ID number you have to edit the CHIP tree and add the names. To do this you need to supply the XML definition and then touch up three other files. Recompile to get the Android binaries. This is not a trivial thing to do and it requires you to have significant knowledge about how to build CHIP. There is also no easy way to automate the process since one of the steps requires using interactive ZAP to enable the custom cluster in the zap file. It would be very helpful if the Android people were encouraged to support numerical access. I have filed bugs on them, but they will just ignore my bugs. Maybe you can push harder. |
IOS is easy, they provided an API I have written up an example procedure for Android here. This procedure is complex and error prone. I am hoping Android will provide an API like Apple did. |
A lot of useful info in this issue: #216 |
@jonsmirl Do you want to provide the latest update about the Android side implementation of the manufacturer-specific cluster and close this issue? |
Well, Espressif probably still needs to write up a guide and demo of how to do this. I can make it work myself but I don't suspect any of the other people using esp-matter can make it work without assistance. The Rainmaker project works as a vehicle to do this. The guide needs to include:
|
I am able to fully build manufacturer specific clusters but doing it is a complex process. I do which this was easier to do. |
esp-matter/components/esp_matter_rainmaker shows how to make a custom cluster.
But... that is only half the battle. To use this cluster from IOS/Android you are going to need to make an XML description of it and then use zap to generate the IOS/Java code needed to use it. It might be possible to write this by hand, but it is hundreds of lines of code.
So for the rainmaker case on Java, it would generate a Java class that extends BaseChipCluster and implements the wrappers for the various attributes, commands and events. Parallel activity needed for IOS.
This procedure is complex, there needs to be a guide written on how to do it.
The text was updated successfully, but these errors were encountered: