---
name: "offDpDataChange"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "1.2.7" }
  - { name: "@ray-js/ray", version: "0.6.23" }
platform:
  - "iOS"
  - "Android"
async: true
---

## offDpDataChange

> [VERSION] DeviceKit >= 1.2.7 | @ray-js/ray >= 0.6.23

> [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 | - |  |

### Referenced Types

##### `interface` DpsChanged

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `deviceId` | `string` | `1.2.6` | dps Corresponding device ID |
| `gwId` | `string` | `1.2.6` | Gateway device ID corresponding to the sub-device; can be used 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 differentiating sources, etc. |


### Examples

#### Basic usage

```tsx
import { device } from '@ray-js/ray'

const { offDpDataChange } = device;

offDpDataChange((result) => {
  console.log('offDpDataChange', result);
});
```
