Questions about displaying sensor data (Temperature/HCHO/TVOC) for Matter device in HomeKit

I am currently developing an air quality monitoring device that supports the Matter protocol and is intended to integrate with HomeKit. During the development process, I've encountered a couple of issues regarding sensor data display within the Home app and would appreciate any insights from the community.

Issue 1: Temperature Sensor Display We have observed that when the temperature sensor is implemented as a cluster within the device, its data fails to appear in the Home app interface. However, if it is configured as an independent endpoint, it displays correctly. Is this a specific requirement of HomeKit regarding the structure of clusters and endpoints in Matter devices?

Issue 2: Support for HCHO and TVOC Sensor Display Does HomeKit currently support displaying real-time data from HCHO (Formaldehyde) and TVOC sensors? If so, are there specific cluster specifications or data types that need to be followed?

Answered by DTS Engineer in 861430022

Issue 1: Temperature Sensor Display We have observed that when the temperature sensor is implemented as a cluster within the device, its data fails to appear in the Home app interface. However, if it is configured as an independent endpoint, it displays correctly.

Please file a bug on this and post the bug number back here (see details below).

Is this a specific requirement of HomeKit regarding the structure of clusters and endpoints in Matter devices?

So, there are actually two different issues at work here:

  1. Compared to Matter, "HAP" (HomeKit Accessory Protocol, the protocol HomeKit was originally built around) is much more rigidly "structured", with every service including a specific characteristic set that HomeKit is built to "expect". More the point, the accessory approval process meant that every licensed HAP accessory has a "known" configuration that Home.app/HomeKit can be designed around. HomeKit's Matter support works by bridging the Matter configuration into HomeKit's existing APIs, but that does mean there are cases where that bridge doesn't support configuration that it "should".

  2. The Matter specification itself is sufficiently broad and complex that, in practice, I'm not sure it will ever really be possible to create a high-quality controller app* that actually supports EVERY possible accessory configuration in the way that actually provides a high-quality user experience. To put that somewhat more bluntly, I think it will always be possible to create an accessory configuration that will make an app like Home.app* look broken/silly/wrong. In practice, that means that accessories that want to "work right" in Home.app will need to conform to its "expectations" about how they should be configured.

*You can write a "generic" Matter control app that "blindly" presents the accessory configuration, but that's a very different user experience than what Home.app provides. As a concrete example of these issues, I'm not sure what Matter's cluster/endpoint limits are, but I'm sure they're MUCH higher than Home.app can "reasonably" display.

In the long run, the solution here is to "complete" our "core" Matter implementation (#1) and then document accessory "expectations" (#2). However, ongoing improvements to our implementation have made that difficult. At the moment, all I can really recommend is to experiment with different configurations and ship what "works".

Reversing your questions for clarity:

Issue 2: If so, are there specific cluster specifications or data types that need to be followed?

I don't know the Matter specification well enough to provide specific recommendations, but my general advice here would be to use the HAP specification as a general "reference" to what is/is not supported by Home.app. If you're an MFi licensee, you can download the current specification, but non-licensees can also find copies of our non-commercial by searching for it on the web. While the non-commercial is not complete, it does cover every air sensor type we've released.

Looking at your specific questions:

Support for HCHO and TVOC Sensor Display Does HomeKit currently support displaying real-time data from HCHO (Formaldehyde)?

No, HCHO is not supported by HAP/HomeKit.

and TVOC sensors?

HAP includes "VOC Density", which is what I think you're referring to. For reference, the HAP spec defines the service "8.3 Air Quality Sensor" as having one or more of these sensor characteristics:

”9.71 Ozone Density” (page 191)
”9.64 Nitrogen Dioxide Density” (page 189)
”9.106 Sulphur Dioxide Density” (page 221)
”9.66 PM2.5 Density” (page 190)
”9.72 PM10 Density” (page 192)
”9.126 VOC Density” (page 233)

...with separate services for carbon monoxide and dioxide.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Issue 1: Temperature Sensor Display We have observed that when the temperature sensor is implemented as a cluster within the device, its data fails to appear in the Home app interface. However, if it is configured as an independent endpoint, it displays correctly.

Please file a bug on this and post the bug number back here (see details below).

Is this a specific requirement of HomeKit regarding the structure of clusters and endpoints in Matter devices?

So, there are actually two different issues at work here:

  1. Compared to Matter, "HAP" (HomeKit Accessory Protocol, the protocol HomeKit was originally built around) is much more rigidly "structured", with every service including a specific characteristic set that HomeKit is built to "expect". More the point, the accessory approval process meant that every licensed HAP accessory has a "known" configuration that Home.app/HomeKit can be designed around. HomeKit's Matter support works by bridging the Matter configuration into HomeKit's existing APIs, but that does mean there are cases where that bridge doesn't support configuration that it "should".

  2. The Matter specification itself is sufficiently broad and complex that, in practice, I'm not sure it will ever really be possible to create a high-quality controller app* that actually supports EVERY possible accessory configuration in the way that actually provides a high-quality user experience. To put that somewhat more bluntly, I think it will always be possible to create an accessory configuration that will make an app like Home.app* look broken/silly/wrong. In practice, that means that accessories that want to "work right" in Home.app will need to conform to its "expectations" about how they should be configured.

*You can write a "generic" Matter control app that "blindly" presents the accessory configuration, but that's a very different user experience than what Home.app provides. As a concrete example of these issues, I'm not sure what Matter's cluster/endpoint limits are, but I'm sure they're MUCH higher than Home.app can "reasonably" display.

In the long run, the solution here is to "complete" our "core" Matter implementation (#1) and then document accessory "expectations" (#2). However, ongoing improvements to our implementation have made that difficult. At the moment, all I can really recommend is to experiment with different configurations and ship what "works".

Reversing your questions for clarity:

Issue 2: If so, are there specific cluster specifications or data types that need to be followed?

I don't know the Matter specification well enough to provide specific recommendations, but my general advice here would be to use the HAP specification as a general "reference" to what is/is not supported by Home.app. If you're an MFi licensee, you can download the current specification, but non-licensees can also find copies of our non-commercial by searching for it on the web. While the non-commercial is not complete, it does cover every air sensor type we've released.

Looking at your specific questions:

Support for HCHO and TVOC Sensor Display Does HomeKit currently support displaying real-time data from HCHO (Formaldehyde)?

No, HCHO is not supported by HAP/HomeKit.

and TVOC sensors?

HAP includes "VOC Density", which is what I think you're referring to. For reference, the HAP spec defines the service "8.3 Air Quality Sensor" as having one or more of these sensor characteristics:

”9.71 Ozone Density” (page 191)
”9.64 Nitrogen Dioxide Density” (page 189)
”9.106 Sulphur Dioxide Density” (page 221)
”9.66 PM2.5 Density” (page 190)
”9.72 PM10 Density” (page 192)
”9.126 VOC Density” (page 233)

...with separate services for carbon monoxide and dioxide.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Questions about displaying sensor data (Temperature/HCHO/TVOC) for Matter device in HomeKit
 
 
Q