Set Reporting Frequency of a Locator

Last Updated on : 2023-06-20 14:54:09download

Send a command to set the data reporting frequency of a locator. After receiving the command, the device will update the data reporting frequency.

API address

POST: /v1.0/fusion-locator/{device_id}/actions/set/frequency

Request parameter

Parameter name Type IN Required Description
device_id String uri true The ID of a Tuya device.

Description of body

Parameter name Type IN Required Description
interval Integer true The frequency or interval of reporting the data. Unit: minutes.
begin_at Long true The time when arming starts every day. The time is represented by the number of milliseconds from 0 o’clock. For example, 32400000 means 9 o’clock.
end_at Long true The time when arming ends every day. The time is represented by the number of milliseconds from 0 o’clock. For example, 32400000 means 9 o’clock.
action String true The operation type. Valid values:
  • open: Enable the data reporting.
  • close: Disable the data reporting.

Return parameter

Parameter name Type Description
result CmdIssueResultResponse The returned result.

Description of result

Parameter name Type Description
sn String The ID of the specified command record.

Request example

POST: /v1.0/fusion-locator/6ce****/actions/set/frequency
{
  "interval": 10,
  "beginAt": 32400000,
  "endAt": 64800000,
  "action": "open",
}

Return example

{
    "result": {
        "sn": "133****"
    },
    "t": 1561456817168,
    "success": true
}

Error code

For more information, see error code.