getCommandCache(params: GetCommandCacheParams)

Requires:
@tuya-miniapp/cloud-api≥1.0.5

Description

Query the pending commands (DP set) cached in the cloud for the specified device. Supports Wi-Fi and ZigBee devices.

Parameters

ParameterTypeRequiredDescription
YesRequest body

Return Value

Type: Promise<GetCommandCacheResult>
CommandCache array; see this type’s comments for element fields

Referenced Types

typeGetCommandCacheResult
CommandCache[]

Examples

Request example

import { getCommandCache } from '@tuya-miniapp/cloud-api';

const result = await getCommandCache({
  devId: 'your_device_id',
});

Response example

[
  {
    "dps": {
      "switch_1": true
    },
    "pushStatus": false
  },
  {
    "dps": {
      "switch_2": true
    },
    "pushStatus": true
  }
]