After you configure a physical device, you can use IoT Platform to debug the device online. You can directly dispatch commands onto the device from the IoT Platform console. Only physical devices that are connected by using the Message Queuing Telemetry Transport (MQTT) protocol are supported for online debugging.

Procedure

  1. In the left-side navigation pane of the IoT Platform console, choose Maintenance > Online Debug.
  2. On the Online Debug page, select the device to be debugged.

    After you select a device, the debugging page is displayed.

  3. Click Debug Physical Device.
  4. Dispatch the command.

    The following table lists the options for debugging a physical device.

    Option Procedure
    Set properties Set the properties of a physical device from the cloud. After the device receives the command, the device sets its properties and reports the property values to IoT Platform.
    1. Click Property Debugging.
    2. From the Debug Feature list, select the property to debug and set the method to Set.

      The format for the property data is automatically displayed in the text box, for example, {"Temperature":0}.

    3. Set a value for the property and click Dispatch Command.
    Get properties Obtain the property values of the device.
    1. Click Property Debugging.
    2. From the Debug Feature list, select the property to debug and set the method to Get.
    3. Click Dispatch Command.
      Note When you try to obtain the property of the device, you do not need to enter data in the text box.

    After you dispatch the command, the text box automatically shows the latest data of the property. If the device does not have a value for the property, the data is empty.

    Call services
    1. Click Service Calls.
    2. From the Debug Feature list, select the service to debug.
    3. In the text box, enter the input parameters for the service, and click Dispatch Command.

      The input parameters must be in JSON format, for example, {"Switch":0}.

Result

After you dispatch the command, you can view the operation logs in Real-time Logs that is located on the right side of the page.