getDeviceDetailsById(params: QueryGetDeviceDetailsById)
Requires:
@tuya-miniapp/cloud-api≥1.0.5
Description
View details of a single device
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Yes | Request body |
Return Value
Type: Promise<DeviceDetails>
Device details (see DeviceDetails)
Referenced Types
interface
DeviceDetails| Property | Type | Description |
|---|---|---|
haveAvailableService | 0 | 1 | Whether a service is available (0: not activated; 1: activated) |
activeStockIdList | string[] | List of stockId values for activated services |
productId | string | Product ID |
| Device service plan list | ||
isUseFreeService | 0 | 1 | Whether a subscription product with a free first period has been purchased (0: not purchased, 1: purchased) |
isUseCommonUserTrail | 0 | 1 | Whether an account-level free product for a standard trial has ever been purchased (0: not purchased, 1: purchased) |
isUseCommonDeviceTrail | 0 | 1 | Whether a device-level free product for a standard trial has ever been purchased (0: not purchased, 1: purchased) |
isTried | 0 | 1 | Whether the product has been tried (0: not tried, 1: tried) |
hasServiceOrder | boolean | Whether a service ticket exists |
icon | string | Device icon |
name | string | Device name |
ownerId | string | ID of the home the device belongs to |
uuid | string | Unique device ID |
roomName | string | Room name |
deviceId | string | Device deviceId |
isBind | DeviceBindStatus | Binding status (bound / unsupported / unbound) |
status | boolean | Device status |
aiSmartFreeDev | boolean | Whether the current device is on the aiSmart capability allowlist |
Valid Values
DeviceDetails.haveAvailableService
| Value | Description | Since |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.planList.isSubscribe
| Value | Description | Since |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.planList.isCanceled
| Value | Description | Since |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.planList.isAdditional
| Value | Description | Since |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.isUseFreeService
| Value | Description | Since |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.isUseCommonUserTrail
| Value | Description | Since |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.isUseCommonDeviceTrail
| Value | Description | Since |
|---|---|---|
0 | - | - |
1 | - | - |
DeviceDetails.isTried
| Value | Description | Since |
|---|---|---|
0 | - | - |
1 | - | - |