Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2652R7: contact-sensor-app insists on representing state with “open” / “closed” terminology.

Part Number: CC2652R7

We notice that the example contact-sensor-app presents to the Matter Client (HomeKit) as a device icon with UI strings that seem overly constraining. For example after using my iPhone, and the QRcode reported by the contact-sensor-app on boot, the Matter accessory is added to our HomeKit environment, and an icon is presented to the user with both a name value, and a state value, presented like this:

Name: Contact Sensor
Value: Open (or Closed)

But we wonder if the naming chosen here simply represents the defaults that the Matter Client (HomeKit) will use if the Matter Client (contact-sensor) doesn’t specify otherwise. We would like to know if there is something additional we can specify at build-time such that our Contact-sensor server specifically overrides the default Open/Closed state terminology (for example) to instead be the naming of our choosing. Up/Down, or maybe North/South, or maybe Forward/Backward, etc, etc, depending on the device actually implemented. You get the idea, it’s a two state accessory that might aim to serve a purpose by which Open/Closed is not natural terminology for expressing the state of the device. And likewise, with regard to the naming of the device icon, we have a similar question, the “Contact Sensor” name currently displayed is hopefully just the default used by the Matter Client (HomeKit), but possibly there is a way for the Matter Server (contact-sensor) to override that default and specify something more particular to the the actual type of device implemented.

In attempting to answer our own question, we noticed that the build of the contact-sensor-app (Matter-TI repo) will use the *.zap files located in the contact-sensor-common portion of the tree. It’s a huge file with a lot of settings that were probably auto-generated, and which pertain to how the Matter server is described to the Matter client. We would like to know more about the variety of controls we have for specifying things like the Name and Value presented by the Matter Client. So as just an example, is there anything we can do at build-time to insure that when the contact-sensor accessory is added to HomeKit, that the resulting HomeKit UI device icon presented to the user would instead be:

Name: Orientation Sensor
Value: Up (or Down)

Thanks in Advance!
Steve K.

  • Hi Steve,

    The semantics are defined by the Matter Device Library, from Section 7.1.4:

    The semantics of the boolean value reported by this cluster are:
    • FALSE=open or no contact
    • TRUE=closed or contact

    HomeKit is likely populating the Name and Value based on the cluster information it reads from the Matter device.  Strings are not read from the Matter device itself to represent these values.  You would need to contact HomeKit support to discover whether custom semantics can be used.

    Regards,
    Ryan