If you need to set a device target temperature and report device status information in a smart home scenario (this is not a real product but only used to demonstrate IoT Hub's capabilities), you can follow the steps in this document.
The management backend uses the cloud APIs provided by IoT Hub to update device shadow's configuration and registration parameters, and associate the corresponding callback function to update the configuration locally.
For the implementation of relevant TencentCloud APIs for device shadow, please download iotcloud_RestAPI_python.zip. You need to configure your profile according to the RESTful API description. You can customize the features by modifying the parameters in airConditionerCtrl.py
in the RestAPI
folder.
The device reports its own status data to the device shadow, and the home appliance management backend directly gets data from the device shadow through the RESTful API.
Was this page helpful?