---
name: "SmartSupportAbility"
mode: "api"
versionRequirements:
  - { name: "@ray-js/panel-sdk", version: "1.10.0" }
title: "Usage"
summary: "SDM support capability guide for device type checks, DP feature checks, and capability-based adaptation."
---

# Usage

<div style={{ display: 'flex', gap: '8px', marginBottom: '16px' }}>
  <span style={{ backgroundColor: '#52c41a', color: 'white', padding: '2px 8px', borderRadius: '4px', fontSize: '12px' }}>Device Support</span>
  <span style={{ backgroundColor: '#52c41a', color: 'white', padding: '2px 8px', borderRadius: '4px', fontSize: '12px' }}>Group Support</span>
</div>

<Callout type="info" emoji="ℹ️">
  Current support capability sdk abstracts the following capabilities:
  - Determine the device type
  - Check whether dp is supported
  - Other abilities support judgment
</Callout>

## SmartSupportAbility

> [VERSION] @ray-js/panel-sdk >= 1.10.0

> 💡 Use after mounting via the SmartDeviceModel abilities configuration.
> Supports both single devices and groups.

### Description

Device capability check to determine supported DPs and protocol types

### Parameters

`(options: Function)`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `options` | `{ initDevInfo?: (devInfo) => void }` | No | Device capability check configuration |

### Return Value

Type: `SmartSupportAbility`

SmartSupportAbility instance

#### Methods

| Method | Description |
| --- | --- |
| `isSupportDp` | Check whether a given DP code is supported by the device |
| `isInGateway` | Determine whether the device has been added to a gateway |
| `isGroupDevice` | Determine whether the current device is a group device |
| `isSupportBright` | Determine whether the device supports the white brightness DP |
| `isSupportTemp` | Determine whether the device supports the color temperature DP |
| `isSupportColour` | Determine whether the device supports the color light DP |
| `isSupportCloudTimer` | Determine whether the device supports cloud timers |
| `isWifiDevice` | Determine whether it is a WiFi device |
| `isGprsDevice` | Determine whether it is a GPRS device |
| `isBluetoothDevice` | Determine whether it is a Bluetooth device |
| `isBleMeshDevice` | Determine whether it is a BLE Mesh device |
| `isZigbeeDevice` | Determine whether it is a Zigbee device |
| `isSigMeshDevice` | Determine whether it is a SIG Mesh device |
| `isBleDevice` | Determine whether it is a Bluetooth-class device (including Bluetooth, BLE Mesh, SIG Mesh) |
| `isCat1Device` | Determine whether it is a Cat.1 device |
| `isBeaconDevice` | Determine whether it is a Beacon device |
| `isLteCat4Device` | Determine whether it is an LTE Cat.4 device |
| `isLteCat10Device` | Determine whether it is an LTE Cat.10 device |
| `isLteCatMDevice` | Determine whether it is an LTE Cat.M device |
| `isThreadDevice` | Determine whether it is a Thread device |
| `isMatterDevice` | Determine whether it is a Matter device |
| `isTuyaMatterDevice` | Determine whether it is a Tuya Matter device |
| `isTripartiteMatter` | Determine whether it is a third-party Matter device |
| `isSupportMatterWhite` | Determine whether the device supports Matter white light |

### Examples

#### Example

```typescript
// Usage 1 (recommended)
import { SmartDeviceModel, SmartSupportAbility } from '@ray-js/panel-sdk';

const sdm = new SmartDeviceModel({ abilities: [new SmartSupportAbility()] });
const isSupportxxx = sdm.support.xxx()

// Usage 2 (not recommended)
const support = new SmartSupportAbility({
  initDevInfo: (devInfo) => {
    return {
      ...devInfo,
      isMatter: true,
    };
  },
});

await support.init({ deviceId: '1234567890' });
```
