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

## unregisterMQTTDeviceListener

> [VERSION] DeviceKit >= 2.3.1

> [PLATFORM] iOS, Android

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

### Method signature

```typescript
unregisterMQTTDeviceListener(params: Object)
```

### Description

Unregister the listener for device MQTT information

### Parameters

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `deviceId` | `string` | Yes | - | deviceId device ID Supports retrieving other devices' information across panels. The current panel can pass the current device's ID to retrieve it |
| `complete` | `() => void` | No | - | Complete callback (runs on both success and failure) |
| `success` | `() => void` | No | - | Success callback |
| `fail` | `(params: Object) => void` ↓see below | No | - | Failure callback |

#### fail callback parameters

| Property | Type | Description |
| --- | --- | --- |
| `errorMsg` | `string` | Error message |
| `errorCode` | `string \| number` | Error code |
| `innerError` | `Object` | Error extension |

##### fail(params).innerError properties

| Property | Type | Description |
| --- | --- | --- |
| `errorCode` | `string \| number` | Extended error code |
| `errorMsg` | `string` | Extended error information |


### Examples

```tsx
ty.device.unregisterMQTTDeviceListener({
  deviceId: "xx",
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});
```
