---
name: "onDpDataChange"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "1.2.6" }
platform:
  - "iOS"
  - "Android"
async: true
---

## onDpDataChange

> [VERSION] DeviceKit >= 1.2.6

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

DP change

### Parameters

`(listener: Function)`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `listener` | `(params: DpsChanged) => void` | Yes | - | Event listener callback function |

### Referenced Types

##### `interface` DpsChanged

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `deviceId` | `string` | `1.2.6` | Device ID corresponding to the dps |
| `gwId` | `string` | `1.2.6` | Gateway device ID corresponding to the sub-device; use this to refresh the gateway panel status |
| `dps` | `Record<string, Record<string, any>>` | `1.2.6` | dps Changed data |
| `dpsTime` | `Record<string, number>` | `4.11.0` | dpsTime Timestamp of the dp change (may be empty) |
| `options` | `Record<string, Record<string, any>>` | `1.2.6` | options Reserved flags for future use, e.g., to distinguish sources |
