How to get the Matter device abilities list by Google Home Service Mobile SDK?

188 views Asked by At

By Google Home Sample App for Matter, it seems nothing we can know about the device clusters from the device after commissioning.

// commission
Matter.getCommissioningClient(context)
        .commissionDevice(commissionDeviceRequest)

After commissioning, it did the addDeviceState.

    val newDeviceState =
        DeviceState.newBuilder()
            .setDeviceId(deviceId)
            .setDateCaptured(getTimestampForNow())
            .setOnline(isOnline)
            .setOn(isOn)
            .build()

But why it knows there is a setOn() for the device? How to know what clusters the device has?

I have read the Google Play service Matter API but there are only commission and share APIs. Are there Matter devices setting function list?

1

There are 1 answers

1
pdel On

As mentioned in https://developers.home.google.com/samples/matter-app?hl=en

Note: The sample app currently only supports devices that have the On/Off server attribute, for example lights, smart plugs, and fans.

Due to this, the app always assumes that any Matter device that is commissioned via GHSAFM supports the on/off cluster.