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
-
Log on to the IoT Platform console.
-
On the Overview tab, click Public Instance.
-
In the left-side navigation pane, choose .
- On the Online Debug page, select the Streetlight product and the device1 device.
- 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 . Operating Current (LightCurrent) This property is read-only. - 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_REPORTlog type (thing.event.property.postmethod). Cloud-sent data uses thedownstream PROPERTY_SETTINGlog type (thing.service.property.setmethod). Both logs containLightSwitchand returncode:200, confirming successful device-cloud communication. - Choose . 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.
- In the Real-time Logs section of the Online Debug page, check upstream and downstream data. Device-reported data uses the
- (Optional) To set device properties from your own cloud application, download the SDK from the Cloud Developer Guide and call the appropriate API.
该文章对您有帮助吗?