Update Learning Code

Last Updated on : 2023-06-15 05:17:42

Update the information about infrared codes learned by a remote control based on the remote control ID.

API address

PUT: /v2.0/infrareds/{infrared_id}/remotes/{remote_id}/learning-codes

Request parameter

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

Description of body

Parameter nameTypeINRequiredDescription
category_idInteger falseThe ID of a specified category.
brand_idInteger falseThe ID of a specified brand.
brand_nameString falseThe name of a specified brand.
remote_nameString falseThe name of a specified remote control.
codesList falseThe list.

Description of codes

Parameter nameTypeINRequiredDescription
category_idInteger falseThe ID of a specified category.
key_nameString falseThe name of a specified key.
keyString trueThe key of a specified infrared code.
codeString trueThe infrared code.
idLong falseThe key ID.

Return parameter

Parameter nameTypeDescription
resultStringThe operation result.

Request example

PUT: /v2.0/infrareds/vdevo15345926009****/remotes/d5s65ca55/learning-codes
{
  "category_id": 1,
  "remote_name": "test",
  "codes": [
    {
      "code": "c42230112602f401260226022602260226022602260226022602260226027206260226022602720626027206260272062602720626027206260272065802f401260272062602260226027206260226022602260226024006260226022602260226022602260272062602260226027206260272062602260258024006260272062602720626024c9af62266082602****",
      "name": "test"
    }
  ]
}

Return example

{
    "result": "d5s65ca55",
    "t": 1631089922125,
    "success": true
}

Error code

For more information, see error code.