Update Scheduled Task

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

Modify a scheduled task based on the scheduled task ID, such as the scheduled time and operation.

API address

PUT: /v2.0/infrareds/{infrared_id}/remotes/{remote_id}/timers

Request parameter

Parameter nameTypeINRequiredDescription
infrared_idStringuritrueThe device ID.
remote_idStringuritrueThe ID of a specified remote control.
timer_idLongquerytrueThe ID of a scheduled task.

Description of body

Parameter nameTypeINRequiredDescription
powerInteger falseThe power supply.
modeInteger falseThe mode.
tempInteger falseThe temperature.
swingInteger falseThe swing.
windInteger falseThe wind speed.
keyInteger falseThe key ID.
timeString falseThe specified execution time.
dateString falseThe date. When the date is entered, the value of loops is 0000000, and the date format is 20181212.
loopsString falseThe loop configuration. A seven-digit number consisting of 0 and 1. 0 means disabled and 1 means enabled. For example, 0000010 means that the scheduled task is disabled on Sunday, Monday, Tuesday, Wednesday, Thursday, and Friday, and it is enabled on Saturday.
timezone_idString falseThe time zone ID. Example: Asia/Shanghai.

Return parameter

Parameter nameTypeDescription
resultBooleanThe operation result.

Request example

PUT: /v2.0/infrareds/vdevo15345926009****/remotes/d5s65ca55/timers?timer_id=1111
  "key": 1,
  "loops": "0000000",
  "timezone_id": "Asia/Shanghai",
  "time_zone": "+8:00",
  "time": "19:06"

Return example

    "result": true,
    "t": 1631239134759,
    "success": true

Error code

For more information, see error code.