Creating custom matter devices using python

117 Views Asked by At

I'm reaching out seeking advice on a project I'm working on, and I believe this community might be able to provide valuable insights.

I am in the process of developing a custom device that supports the Matter protocol. The primary functionality I'm aiming for is relatively straightforward: upon saying "OK Google, do something," I want Google Home to send a corresponding command to my custom device, triggering an API call.

To get started, I successfully built and integrated an example of a light from the Connected Home IP repository (found here: https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/python). By modifying the lighting.py script in the example, I can now make API calls when I say "OK Google, turn on/off the light," and everything is functioning as expected.

However, I've reached a point where I could use some guidance. The API call support for my device will vary, and I need to configure the device before commissioning. If my understanding of the Matter standard is correct, I believe I need to use the zap tool to specify endpoints and clusters for the device. Unfortunately, I've encountered challenges in successfully running the zap tool.

Specifically, I'm aiming to define custom endpoints like Action 1, Action 2, Action 3, etc., each associated with a unique ID and room. This way, when I say "OK Google, Action 1," the home assistant will send a command to my device with the corresponding ID for Action 1.

I'm seeking guidance on how to proceed with specifying custom endpoints, clusters, and device types. Is this even possible within the Matter framework?

Any assistance or pointers you can provide would be greatly appreciated.

Thank you for your time and consideration.

1

There are 1 best solutions below

1
On BEST ANSWER
  • You can refer to the following page to guide you through the usage of the ZAP tool to specify endpoints and clusters for the device.
  • ZCL Advanced Platform (ZAP) is a node.js template engine that's based on Matter Clusters.
  • ZAP provides the following features for Matter apps and SDKs: Configure Matter Endpoints, Clusters, Attributes, and other device features from a GUI interface.
  • Create templates that automatically generate Data Model definitions, callbacks, and other Matter source code. Create and use preconfigured ZAP files to include with your SDKs

.