Develop a virtual device

Updated at:
Copy as MD

Virtual devices simulate real devices to generate business data to help you quickly experience the development features of IoT Studio.

Background

The typical development workflow for a device on IoT Platform involves device-side development, data submission from the device, data reception in the cloud, and subsequent cloud-side development. This process is longer and more time-consuming than using a virtual device.

Procedure

  1. In the general project list, find the target project and click the project card.

    You can also click Global resource project to go to the project details page.

  2. On the project page, click Devices in the left-side navigation pane.

  3. Above the device list, select the Temperature Detector product.

    After you select the product, the device list shows one device in the inactive state under this product.

  4. Find the newly added Temperature Detector device and click View in the Actions column.

  5. On the device details page, select Use device simulator to submit TSL data.

  6. Use the device simulator to submit simulated properties to the cloud.

    In the Device Debugging section, select the Uplink data tab, click Submit properties, enter 20 in the temperature (temperature) field, and then turn on the online status switch to submit the simulated properties to the cloud.

Results

After the data is submitted, you can view the device log in the Device log section on the right. The Device log section displays records for both cloud-to-device message and device-to-cloud message, confirming a successful data submission.

After the data is submitted successfully, click View cloud log to go to the Cloud run log tab, where you can view the related cloud run logs.

For more information, see Cloud run log.

The log page shows four records. The business types are tsl model, tsl model message, cloud-to-device message, and device-to-cloud message. The status of all records is 200. Click the View link in the Message content column to view the message details.