Skip to main content

InfraredRemoter

1.InfraredRemoter.getState

Get Current InfraredRemoter State

BDDP

ParamValueDesc
methodInfraredRemoter.getStateGet Current State
targetDevice<String,Necessary>DeviceId of the InfraredRemoter you use;
token<String,Necessary>Net token of the InfraredRemoter you use;

BUDP*

ParamValueDesc
data.battery<int,Necessary>Battery Level ( 1 ~ 4), 1 is empty and 4 is Full
data.keys<boolean[64],Necessary>64 keys, true means this key is learned
data.version<string,Necessary>Firmware Version
data.tz<int,Necessary>Timezone of this device

2.InfraredRemoter.learn

Learn code of Infrared Remoter

BDDP

ParamValueDesc
methodInfraredRemoter.learnLearn code of Infrared Remoter
targetDevice<String,Necessary>DeviceId of the InfraredRemoter you use;
token<String,Necessary>Net token of the InfraredRemoter you use;
params.key<Integer,Necessary>The key (0~63) you want to learn code

BUDP*

ParamValueDesc
data.success<Boolean,Necessary>Result of learning
data.errorCode<String,Optional>The error code if learning fail;
"error" : "Unknow Error",
"keyError" : "The key is wrong",
"started" : "Is learning now",
"timeout" : "Timeout of learning"

3.InfraredRemoter.send

Send Infrared Code

BDDP

ParamValueDesc
methodInfraredRemoter.sendSend Infrared Code
targetDevice<String,Necessary>DeviceId of the InfraredRemoter you use;
token<String,Necessary>Net token of the InfraredRemoter you use;
params.key<Integer,Necessary>The key (0~63) you want to send

BUDP*

ParamValueDesc
data.success<Boolean,Necessary>Result of send
data.errorCode<String,Optional>The error code if learing fail;
"notLearn" : "This key is not learned",
"keyError" : "The key is wrong"

4.InfraredRemoter.setTimeZone

Set Timezone of this device

BDDP

ParamValueDesc
methodInfraredRemoter.setTimeZoneSet Timezone of this device, It's necessary if you enable schedules
targetDevice<String,Necessary>DeviceId of the InfraredRemoter you use;
token<String,Necessary>Net token of the InfraredRemoter you use;
params.tz<Integer,Necessary>The Timezone (-12 ~ +12) you want to set

BUDP*

ParamValueDesc
data.success<Boolean,Necessary>Result of send
data.errorCode<String,Optional>The error code if learing fail;
"notLearn" : "This key is not learned",
"keyError" : "The key is wrong"

5.InfraredRemoter.setSchedule

Send Infrared Code

BDDP

ParamValueDesc
methodInfraredRemoter.setScheduleCreate of Update some schedules
targetDevice<String,Necessary>DeviceId of the InfraredRemoter you use;
token<String,Necessary>Net token of the InfraredRemoter you use;
params.sches[index].*<Object,Necessary>The schedules you want to set, index ( 0 ~ 9) means you can set 10 scheduels at most
params.sches[index].isValid<boolean,Necessary>Is this schedule enable
params.sches[index].week<int,Necessary>Mask of valid weekdays. bit 0 ~ 6 means Sunday to Saturday. 1 is enable and 0 is disable. so 65("01000001") means this schedule work on Sunday and Saturday
params.sches[index].time<String,Necessary>"HH:mm" Formatted
params.sches[index].key<String,Necessary>The key (0~63) you want to work when schedule trigged

BUDP*

ParamValueDesc
data.sches[index].*<Object,Necessary>The schedules you want to set, index ( 0 ~ 9) means you can set 10 scheduels at more
data.sches[index].isValid<boolean,Necessary>Is this schedule enable
data.sches[index].week<int,Necessary>Mask of valid weekdays.
data.sches[index].time<String,Necessary>"HH:mm" Formatted
data.sches[index].key<String,Necessary>The key (0~63) you want to work when schedule trigged

6.InfraredRemoter.getSchedules

Send Infrared Code

BDDP

ParamValueDesc
methodInfraredRemoter.getSchedulesGet schedules
targetDevice<String,Necessary>DeviceId of the InfraredRemoter you use;
token<String,Necessary>Net token of the InfraredRemoter you use;
params.sches[index].*<Object,Necessary>The schedules you want to set, index ( 0 ~ 9) means you can set 10 scheduels at most
params.sches[index].isValid<boolean,Necessary>Is this schedule enable
params.sches[index].week<int,Necessary>Mask of valid weekdays. bit 0 ~ 6 means Sunday to Saturday. 1 is enable and 0 is disable. so 65("01000001") means this schedule work on Sunday and Saturday
params.sches[index].time<String,Necessary>"HH:mm" Formatted
params.sches[index].key<String,Necessary>The key (0~63) you want to work when schedule trigged

BUDP*

ParamValueDesc
data.sches[index].*<Object,Necessary>The schedules you want to set, index ( 0 ~ 9) means you can set 10 scheduels at most
data.sches[index].isValid<boolean,Necessary>Is this schedule enable
data.sches[index].week<int,Necessary>Mask of valid weekdays.
data.sches[index].time<String,Necessary>"HH:mm" Formatted
data.sches[index].key<String,Necessary>The key (0~63) you want to work when schedule trigged