Generate Human Presence Detection Template (Switch On)

Last Updated on : 2023-06-21 07:12:58download

Generate a human presence detection scene linkage template. When the human presence sensor detects a person, the specified device will be automatically powered on.

API address

POST: /v1.0/iot-03/scene-templates/20010

Request parameter

Description of body

Parameter name Type IN Required Description
prototype_name String false The name of the template.
prototype_desc String false The description of the template.
effect_days String false The days in a week when the template is effective. The 7-digit string represents Sunday to Saturday in sequence. Valid values: 0: ineffective. 1: effective.
begin_time String false The start time.
end_time String false The end time.

Return parameter

Parameter name Type Description
result Boolean The operation result.

Request example

POST: /v1.0/iot-03/scene-templates/20010
{ "prototype_name": "Light On", "prototype_desc": "Turn on the light when human presence is detected.", "effect_days": "1111111", "begin_time": "00:00", "end_time": "23:59" }

Return example

{ "result": true, "t": 1623813304866, "success": true }

Error code

For more information, see error code.