Send commands from the cloud to a device

更新时间:
复制 MD 格式

After a device reports messages to the cloud, you can send commands to it. Use the Online Debug feature in the IoT Platform console to set the properties of a streetlight device.

Procedure

  1. Log on to the IoT Platform console.

  2. On the Overview tab, click Public Instance.

  3. In the left-side navigation pane, choose Maintenance > Online Debug.

  4. On the Online Debug page, select the Streetlight product and the device1 device.
  5. On the Property Debugging tab, set the parameters and send the command.
    Parameter Actions
    Module Select Default Module.
    Main Light Switch (LightSwitch) Select On-1, and then click Debug > Set.
    Operating Current (LightCurrent) This property is read-only.
  6. View the device property status.
    • In the Real-time Logs section of the Online Debug page, check upstream and downstream data. Device-reported data uses the upstream PROPERTY_REPORT log type (thing.event.property.post method). Cloud-sent data uses the downstream PROPERTY_SETTING log type (thing.service.property.set method). Both logs contain LightSwitch and return code:200, confirming successful device-cloud communication.
    • Choose Devices > Devices. Find the device and click View.
      On the Device Details page, click the TSL Data tab and click Status. The Main Light Switch property shows 1 (On), confirming the device reported its property data.
  7. (Optional) To set device properties from your own cloud application, download the SDK from the Cloud Developer Guide and call the appropriate API.