---
title: Device Tools
---

# Device Tools

<Image 
  src="https://images.tuyacn.com/content-platform/hestia/1729067836ae475c48245.png" 
  style={{
    borderRadius: '10px',
    boxShadow: '0 0 5px rgba(0,0,0,0.3)',
  }}
/>

Run the program in the Tuya MiniApp IDE, introduce the virtual system environment environment environment, and at the same time the panel, and at the same time, it can be more convenient and convenient to debug and debug. Development and development By scanning the code and binding the virtual device under the product to the Tuya MiniApp IDE, code debugging in the Tuya MiniApp IDE can be realized, and a small amount of dependence on the real machine can be reduced during the development period.

In addition to device DP debugging, the plugin also provides:

1. Multilingual field view, check, search, upload
2. Device log query
3. Smart device model data injection

> **Note**: Since the Tuya MiniApp IDE currently only implements a few kit APIs necessary for panel operation, it may not be able to directly satisfy the simulation of all kit interfaces. The special kit interface still needs to rely on the real machine for debugging.

<Image src='https://images.tuyacn.com/content-platform/hestia/17290679666ee167a3bd0.png'/>

## Usage

### Download Tuya MiniApp IDE

First make sure that the Device Tools feature is supported in the Tuya MiniApp IDE. [Download latest version of Tuya MiniApp IDE tools](/en/miniapp/devtools/tools/download)。

### New Project

Start and open the applet Tuya MiniApp IDE, click New Project,

<Image src='/images/panel/virtual-device-import.en-US.png'/>

Click the associated applet, select the type of `Panel Applet`, click Next, associate the product you created in [IoT Platform](https://iot.tuya.com/pmg/list), click Next, and select what you need template for:

> Here we take the universal panel as an example

<Image src='https://images.tuyacn.com/content-platform/hestia/1729068065b39ca6ff2d2.png'/>

Click Create, enter the panel to run, if you have already used the App for authorization login, at this time, the device debugging plug-in will default to display the list of devices in the family at the time of authorization under the authorized account:

> Note that it is necessary to ensure that the SmartLife App account has the management authority of the current family. (See FAQ 4)

<Image src='https://images.tuyacn.com/content-platform/hestia/1729068192d8ebbf0f183.png'/>

The functions in the interface are in order of the above diagram:

1. Authorize the current family name of the logged-in account by scanning the code in the SmartLife App, and click the name to expand the list of all families under the current account. You can switch homes by checking the list item. After switching, the list of rooms and devices will be refreshed. 2.
2. All the rooms under the current family, click to switch the room to filter the device list. 3.
3. If the pid of the device in the selected room under the current family is the same as the pid of the product bound to the project, it will appear in the relevant device group. If the device pid is the same as the product pid bound to the project, it will appear in the relevant device group. If the device pid is not consistent with the product pid bound to the project, a pop-up window will be displayed, and you can enter the debugging interface of the specified device only after confirming it **DP debugging interface**. When you return to the home page again from the debugging interface, the last selected device will be highlighted with a blue border, as shown in the figure above.

<Image src='https://images.tuyacn.com/content-platform/hestia/172906828082e70336673.png'/>

Enter the **DP debugging interface**. The red area in the figure below is the virtual device plug-in part, the left side is the product function point control panel, which allows you to perform DP downstream operation, and the right side area is the product and log information:

<Image src='https://images.tuyacn.com/content-platform/hestia/17290683744a5b08ac01f.png'/>

4. The current plug-in version, mouse hover can display the list of switchable plug-in version, select the version you need to switch to pop-up version of the switching prompts, the user can confirm the switch to the specified version and reload the new version of the plug-in.

<Image src='https://images.tuyacn.com/content-platform/hestia/172906845774ece3f5327.png'/>

5. device list interface refresh button, used to refresh the device list under the current family.

6. Add virtual device portal, click to enter the virtual device sweep interface.

<Image src='https://images.tuyacn.com/content-platform/hestia/17290685218e109b9d9a2.png'/>

After successfully adding a device by scanning the code using the SmartLife App, you will jump to the virtual device control interface.

<Image src='https://images.tuyacn.com/content-platform/hestia/17290679666ee167a3bd0.png'/>

Click the 5th button on the top toolbar to control the display and hiding of virtual device plug-ins:

<Image src='https://images.tuyacn.com/content-platform/hestia/172906864519d07a9b76e.png'/>

### Device control

- In Device Tools Commissioning, **Control Panel**, you can operate the product's function point DP Send Device Command, enter or select the data value and click the `Send` button below, you can see the specific command information in the `Communication Log`.

> Note: The real device does not support the reporting function, you can use the **Virtual Panel** for DP sending.

<Image src='https://images.tuyacn.com/content-platform/hestia/17290687396e87c729c56.png'/>

- Click **Virtual Panel** to preview the DP function point form of the current product.

<Image src='https://images.tuyacn.com/content-platform/hestia/17290688177db9e52216a.png'/>

### Device information and status logs

In addition to virtual reporting, the right side of IDE also provides functions such as device information display, device state simulation, device DP reporting, downstream logging, virtual device unbinding, device communication channel reconnection and plug-in version switching, etc. The specific functions are as follows:

<Image src='https://images.tuyacn.com/content-platform/hestia/1729068948c64bdecca8f.png'/>

1. current plug-in version: mouse hovering can display the switchable plug-in version list, select the version to be switched to pop-up version switching prompts, the user can confirm the switch to the specified version and reload the new version of the plug-in (the same as the device list page operation).
2. device information
   It mainly provides the display of some information related to the equipment: - Product name - Product id - Device id / Group id - The environment in which the current account is authorized to log in (pre:pre/online:prod) - The environment in which the current device is running (pre:pre/online:prod)
3. Device state
   Primarily provides simulation of device state switching:
   - App Network Status: Simulate the situation of App with or without network, the `networkStatusChange` event will be triggered when switching.
   - Device online status: simulate the switch of device online status, when switching, it will trigger `onDeviceOnlineStatusUpdate` event.
   - App bluetooth status: simulate the system bluetooth on or off, when switching, it will trigger the `bluetoothAdapterStateChange` event.
4. Communication log
   It mainly displays the logs of dp point status reporting and sending during the debugging process, which can be used to judge whether the reporting and sending of the original data are normal or not.
5. unbind/reconnect
   - Unbind: Unbind the current device when the device under operation is a virtual device. This function is not available for real devices and group devices.
   - Device reconnection: When the device report or send function can not be used normally, you can try to re-establish the communication with the device.
6. Extension management
   - You can view the list of plug-ins supported by the current ide. You can download and install them into the ide.

### I18N

For viewing, checking, searching, and uploading of panel applets in multiple languages.

<Image src='https://images.tuyacn.com/content-platform/hestia/1729069058636aeae0260.png'/>
- View: The list will show the cloud multi-language corresponding to the current panel applet and the merged multi-language content corresponding to the local multi-language file, when the local multi-language and cloud multi-language fields are in conflict, the cloud multi-language will take precedence.
- Check: Used to check whether the fields configured in the multi-language have been used, whether the Chinese and English are missing, when the configuration is incorrect, there will be different prompts, you can refer to the corresponding content for modification.
- Search: Input the content in the search box to retrieve the multilingual field key or the corresponding multilingual value.
- Upload: Merge the current multilingual into the corresponding cloud multilingual of the current panel applet.

<Callout type="warning" emoji="⚠️">
Multi-language block will only upload the multi-language entries of the panel applet dimension, the products bound to the panel applet will take effect at the same time, if you want to customize its multi-language in the product dimension, please go to Product Multi-language of the IoT platform to configure it.
</Callout>

### Device Log

It is used to display and query the logs of equipment event reporting and sending, and the logs can be searched according to the function point, type and time.

<Image src='https://images.tuyacn.com/content-platform/hestia/17290691005650617ebca.png'/>

### Smart Device Model

Used to display the smart device data model, which can be injected into the project to facilitate business development.

<Image src='/images/panel/virtual-device-sdm.en-US.png'/>

### Complex protocol parsing

It is used to parse and display the [complex protocol](https://developer.tuya.com/en/docs/iot/complex-protocol-description?id=Kbabmb54ueujl) reported by the device as a data table, making it easier for developers to view the data reported by the device.

<Image src='/images/panel/raw-protocol-en.gif'/>

> Note: The function points being resolved require protocol resolution rules to be configured in the product function points.

- To check whether the products under your io t account support complex protocol resolution, you can choose io t Platform > Product Development Process > Function Definition > Standard Function > Remarks > Protocol parsing specification.

<Image src='/images/panel/raw_analyze_en.png' />

- If the device supports complex protocol resolution, click **Protocol parsing specification** to enter the following interface to view the list of supported function points.

<Image src='/images/panel/raw_protocol_en.png' />

### Extension Management

Used for managing device capability-related extensions, including the installation, uninstallation, and updating of these extensions. The functionality can be published and updated independently of the IDE and device tools.

<Image src="https://images.tuyaus.com/content-platform/hestia/17304301320d9c61a8185.png" />


## Common problem

### 1. Failed to load the panel, failed to get `devInfo`, reported error `DeviceId is invalid`?

If it expires, use the SmartLife App to re-scan the code to authorize. Or click **Device Tools Debugging**, unbind the device, scan the code again, exit the applet and enter again.

> If the `DeviceId is invalid` problem occurs, please confirm whether the authorized login App is the same as the App that created the virtual device.

### 2. DP delivery and reporting failed?

On the premise that the virtual device has been scanned to create a virtual device and the MQTT connection is successful, confirm whether `productId` is a product under your own account, or whether it has been switched to the IoT authorization space.

### 3. Communication log shows MQTT connection failed?

Check if your Tuya MiniApp IDE login has expired, or try logging into the Tuya MiniApp IDE again.

### 4. Scanning the QR code of the virtual device prompts that there is no permission

Check whether the SmartLife App account has the management authority of the current family. This problem usually occurs when the family invites members.

### 5. Some devices are shown online in the App, but there is no related device in IDE or the device is shown offline?

For some Bluetooth single-point devices, the devices cannot be directly connected to IDE, so they may not be shown in IDE device list. zigbee, sigMesh, beacon, etc., if the devices are connected to the gateway, they are usually shown as online. If the device is also directly connected to the cell phone, it may be displayed as offline in the IDE.
If you encounter this kind of problem, you can use the real machine debugging form for development.
