After you configure a physical device, you can use IoT Platform to debug the device online. You can push commands to the device from the IoT Platform console.

Limit

Only devices that are connected over MQTT can be used for debugging.

Feature debugging

  1. Log on to the IoT Platform console.
  2. In the left-side navigation pane, choose Maintenance > Online Debug.
  3. On the Online Debug page, select the device that you want to debug.
  4. Click the Property Debugging or Service Calls tab. On this tab, select a TSL model from the Module drop-down list.
    Online debugging in IoT Platform
    Feature type Operation
    Property Debugging
    • Get: obtains the value of a specified property from the device

      On the right side of a property field, click Debugging. Then, click Get.

      The latest property value is displayed in the field. If the device does not have a value for the property, no value is displayed in the field.

    • Set: sends a command to set property values from IoT Platform to a device. After the device receives the command, the device sets the properties and submits the property values to IoT Platform.

      Enter a value in a property field and click Debugging. Then, click Set.

    • Set expectations: sends a command to set desired property values from IoT Platform to a device

      Enter a value in a property field and click Debugging. Then, click Set expectations.

      • If the device is online, the device receives the command, updates the property values, and then submits the new property values to IoT Platform.
      • If the device is offline, it obtains the desired property values after going online, updates the property values, and then submits the new property values to IoT Platform.
    Service Calls
    1. Select the service that you want to debug from the Debug Feature drop-down list.
    2. In the field, enter the input parameters of the service. Then, click Send Command.

      The input parameters must be in the JSON format. Example: {"Switch":0}.

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

    The following figure shows how to debug properties. Enter a property value, click Debugging on the right, and then click Set.

    Real-time logs